/* website/public/assets/styles.css */

/* -------------------------------------------------------------
 * Design tokens — single source of truth
 * ------------------------------------------------------------- */
:root {
  --paper: #FBFAF7;
  --ink: #0F0F0F;
  --muted: #6B6B6B;
  --rule: rgba(0,0,0,0.08);
  --rule-strong: rgba(0,0,0,0.18);
  /* Royal blue — brighter and more alive than the previous deep navy,
     still authoritative enough for an institutional desk. */
  --accent: #1E3FAA;
  --accent-hover: #2A4DD0;
  --accent-tint: rgba(30, 63, 170, 0.08);
}

/* -------------------------------------------------------------
 * Base
 * ------------------------------------------------------------- */
html {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-feature-settings: 'kern' 1, 'liga' 1;
  font-variation-settings: 'opsz' 14;
}

a { color: inherit; }

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* -------------------------------------------------------------
 * Typography utilities
 * ------------------------------------------------------------- */
.font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: 'kern' 1, 'liga' 1, 'ss01' 1;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.display-xl {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.display-lg {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.05;
}

.display-md {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 48, 'SOFT' 30;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.1;
}

.body-prose {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.003em;
}

.body-prose-lg {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.label-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* -------------------------------------------------------------
 * Hairline rules
 * ------------------------------------------------------------- */
.rule-t { border-top: 1px solid var(--rule); }
.rule-b { border-bottom: 1px solid var(--rule); }

/* -------------------------------------------------------------
 * Link styles
 * ------------------------------------------------------------- */
.link-accent {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color 150ms ease;
}
.link-accent:hover {
  color: var(--accent-hover);
  background-size: 100% 1px;
}

.link-quiet {
  color: var(--muted);
  transition: color 150ms ease;
}
.link-quiet:hover {
  color: var(--ink);
}

/* Nav link with underline reveal */
.nav-link {
  position: relative;
  color: var(--muted);
  transition: color 150ms ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { transform: scaleX(1); }

/* -------------------------------------------------------------
 * Buttons
 * Two variants:
 *   .btn-primary — filled royal-blue, the default CTA
 *   .btn-ghost   — outlined, secondary
 * Both share .btn-base shape rules.
 * ------------------------------------------------------------- */
.btn-base, .btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-primary .arrow,
.btn-ghost .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.btn-primary:hover .arrow,
.btn-ghost:hover .arrow {
  transform: translateX(3px);
}

/* -------------------------------------------------------------
 * Hero entrance animation
 * ------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-up-1 { animation-delay: 80ms; }
.fade-up-2 { animation-delay: 160ms; }
.fade-up-3 { animation-delay: 240ms; }
.fade-up-4 { animation-delay: 320ms; }

.fade-in {
  opacity: 0;
  animation: fadeIn 1200ms ease 400ms forwards;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-in { animation: none; opacity: 1; }
}

/* -------------------------------------------------------------
 * Form fields (contact page)
 * Force full-width with !important so Tailwind preflight can't
 * reset width:auto on inputs/textarea.
 * ------------------------------------------------------------- */
.field-input {
  display: block !important;
  width: 100% !important;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 0.7rem 0;
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 150ms ease;
  -webkit-appearance: none;
          appearance: none;
  box-sizing: border-box;
}
.field-input::placeholder { color: rgba(15,15,15,0.3); }
.field-input:focus { border-color: var(--accent); }

textarea.field-input {
  border: 1px solid var(--rule-strong);
  padding: 0.9rem 1.05rem;
  resize: vertical;
  min-height: 9rem;
}
textarea.field-input:focus { border-color: var(--accent); }

/* -------------------------------------------------------------
 * Footer — refined typography
 * No bold marks; LeapBlock entity sits in mono caps inline.
 * ------------------------------------------------------------- */
.site-footer {
  margin-top: 8rem;
  border-top: 1px solid var(--rule);
}
.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}
.site-footer-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.site-footer-disclaimer {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42rem;
  letter-spacing: -0.001em;
}
.site-footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer-entity {
  white-space: nowrap;
  color: var(--ink);
}
.site-footer-entity .sep {
  color: rgba(0,0,0,0.28);
  margin: 0 0.55rem;
}
.site-footer-entity .org {
  color: var(--muted);
}
.site-footer-meta a.link-quiet {
  letter-spacing: inherit;
}

/* -------------------------------------------------------------
 * Globe container
 * ------------------------------------------------------------- */
#globe-container {
  width: 100%;
  height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#globe-container canvas { display: block; }
@media (max-width: 768px) {
  #globe-container { height: 320px; }
}

#globe-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: rgba(15,15,15,0.18);
}

/* -------------------------------------------------------------
 * Decorative graphics
 * ------------------------------------------------------------- */
/* Microgrid backdrop — used behind the home value-prop band */
.microgrid {
  background-image:
    linear-gradient(to right, rgba(15,15,15,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,15,15,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* Marker dot, used inline as a small accent */
.dot-accent {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 0.55rem;
}

/* Sparkline / mark column */
.mark-col {
  color: var(--accent);
  opacity: 0.85;
}
