/* Varo marketing site — design tokens match the product (varo-portal-vps
   frontend/app/globals.css): warm-white ground, near-black ink, and a
   monochrome accent rather than a brand colour. Instrument Serif for
   headings, Inter for body, same as the product's wordmark and UI.

   LIGHT ONLY, on purpose. There is no prefers-color-scheme block and one
   should not be added back without asking: the owner chose a single
   deliberate look over a theme that follows the visitor's OS. `color-scheme`
   below tells the browser the same thing, so form controls and scrollbars
   stay light for a visitor whose system is set to dark. */

/* Self-hosted, not loaded from Google Fonts at runtime — same reason the
   product itself self-hosts (see varo-portal-vps/frontend/app/layout.tsx):
   part of this audience is on two bars of signal at a mine site, and a
   third-party font request is exactly the kind of thing that can silently
   fail or stall there. Both files are Google's own woff2 (Inter's covers
   400/500/600 via a variable weight axis in one file; Instrument Serif
   ships one weight only), just served from this site instead. */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/inter-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-sunken: #f4f4f0;
  --border: #e6e5e0;
  --text: #1a1a1a;
  --text-muted: #5c5c57;
  /* Monochrome accent, matching the Varo wordmark rather than a brand
     green. Everything that used to carry colour (buttons, links, the
     eyebrow, the diagram hub) now carries contrast instead — which is the
     point: on this page the only thing that should pull the eye is the
     words. */
  --accent: #1a1a1a;
  --accent-hover: #000000;
  --accent-soft: #f0f0ec;
  --on-accent: #ffffff;

  /* Mercial's own palette, lifted from the product's globals.css so the
     character looks identical here and in the app. He is a drawn figure,
     not a UI surface — recolouring him would make him a different
     character, so these never follow the page. */
  --mercial-body: #ffffff;
  --mercial-line: #14141a;
  --mercial-edge: #14141a;
  --mercial-glow: #ffffff;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  /* Section rhythm, deliberately much larger than the component scale
     above. Sections that breathe are the difference between a page that
     looks considered and one that looks full. Fluid so a phone doesn't
     inherit desktop-sized gaps and turn into endless scrolling. */
  --space-section: clamp(6rem, 10vw, 9rem);

  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  /* Widened from 1120. With the header now pinned to the page edges, a
     narrow centre column read as a boxed-in site rather than a spacious
     one — the empty space has to be *around* generous content, not a
     substitute for it. */
  --max-width: 1240px;
  --max-width-narrow: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

h1 {
  /* Bigger and tighter than before. With the accent colour gone, size and
     spacing are the only hierarchy left — so the headline has to carry it. */
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  letter-spacing: -0.015em;
  /* Stops the last word falling alone onto its own line, which is what a
     big serif headline does at exactly the wrong width. */
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.25rem);
}

h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-1);
}

p {
  margin: 0 0 var(--space-2);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img, svg {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.wrap--narrow {
  max-width: var(--max-width-narrow);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Full-bleed on purpose, overriding .wrap's centred 1120px. The header is
     a frame around the page, not a column of it — pinning the wordmark and
     the account links to the outer edges is what makes the middle read as
     deliberately empty rather than narrow. */
  max-width: none;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  padding-left: clamp(var(--space-3), 4vw, var(--space-6));
  padding-right: clamp(var(--space-3), 4vw, var(--space-6));
  gap: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 26px;
  height: 17px;
  flex-shrink: 0;
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.95rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--text {
  background: none;
  padding: 0.75rem 0;
  color: var(--text);
  font-weight: 500;
}

.btn--text:hover {
  color: var(--accent);
}

.btn--full {
  width: 100%;
}

/* Hero */

.hero {
  /* Generous above, and more below than above: the gap between the hero
     and the first section is what tells a reader the hero was a statement
     rather than the start of a list. */
  padding: clamp(3.5rem, 8vw, 7rem) 0 var(--space-section);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  /* A touch more air between the copy and the diagram than the rest of the
     page uses. They are two different kinds of thing — a sentence and a
     picture — and reading one shouldn't feel like reading into the other. */
  gap: clamp(var(--space-5), 7vw, 7rem);
  align-items: center;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  /* The call to action gets real air above it. Crowded against the
     paragraph it reads as part of the sentence; separated, it reads as a
     decision. */
  margin-top: var(--space-5);
}

.hero__diagram {
  margin: 0;
}

.diagram__nodes rect {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}

.diagram__label {
  font-family: var(--font-ui);
  font-size: 13px;
  fill: var(--text);
}

.diagram__lines path {
  stroke: var(--border);
}

.diagram__hub circle {
  fill: var(--accent-soft);
  stroke: var(--border);
  stroke-width: 1.5;
}

.diagram__hub-label {
  font-family: var(--font-display);
  font-size: 17px;
  fill: var(--text);
}

/* Sections */

.section {
  padding: var(--space-section) 0;
}

.section--sunken {
  background: var(--surface-sunken);
}

.section--accent {
  background: var(--accent-soft);
}

.section__lede {
  color: var(--text-muted);
  max-width: 56ch;
}

.section__footnote {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Steps */

.steps {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: var(--space-2);
}

.steps__item p {
  color: var(--text-muted);
}

/* Checklist */

.checklist {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--accent);
  border-radius: 2px;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Honest list */

.honest-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.honest-list li {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.honest-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.honest-list strong {
  color: var(--text);
}

/* Form */

.access-form {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-2);
  max-width: 480px;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field__optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field input,
.field select {
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
}

.access-form .btn {
  margin-top: var(--space-1);
}

.access-form__status {
  font-size: 0.95rem;
  padding: var(--space-2);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.access-form__status[data-error] {
  background: #f6e9e6;
  color: #a33a2a;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-3) 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__inner nav {
  display: flex;
  gap: var(--space-3);
}

/* Responsive */

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__diagram {
    /* The diagram used to be pulled above the headline on narrow screens.
       That meant a phone visitor met three unlabelled boxes and a face
       before a single word about what Varo is — the picture only makes
       sense once you know what it is a picture of. Copy leads; the
       diagram supports it, with a clear gap so the two read as separate
       beats rather than one crowded block. */
    max-width: 420px;
    /* Grouping, not just spacing. The diagram belongs to the hero, so the
       gap above it has to stay SMALLER than the gap below it — measured at
       120px above / 73px below, it read as the next section's opening
       image instead of the hero's closing one. */
    margin-top: var(--space-4);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .site-header__nav {
    gap: var(--space-2);
    font-size: 0.85rem;
  }

  .btn--ghost {
    padding: 0.5rem 0.85rem;
  }
}
