/* ==========================================================================
   StrandIO landing page
   Self-contained. Shares nothing with the product app's design system.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --color-bg: #0A0A0A;                             /* page canvas */
  --color-bg-raised: #1A1A1A;                      /* neutral dark gray surface — no brown/orange tint */
  --color-text: #F5F0E8;                           /* Ivory. 17.5:1 on bg, 15.3:1 on raised */
  --color-text-muted: rgba(245, 240, 232, 0.65);   /* 7.6:1 on bg, 7.1:1 on raised */
  --color-text-faint: rgba(245, 240, 232, 0.55);   /* 5.6:1 on bg, 5.5:1 on raised.
                                                      NOT 0.40 as specced: that measures 3.46/3.50 and fails AA. */
  --color-accent-primary: #D85A30;                 /* Mars Coral */
  --color-accent-secondary: #D69A1E;               /* Jupiter Gold */
  --color-border: rgba(245, 240, 232, 0.10);
  --color-field-border: rgba(245, 240, 232, 0.32);  /* 3.06:1 — form fields only, per WCAG 1.4.11 */

  /* Derived shades — no new hues, just lighter/darker steps of the tokens above */
  --color-accent-primary-hover: #E56B40;
  --color-rule-muted: rgba(245, 240, 232, 0.35);   /* neutral; replaced the old warm-brown rule when the surfaces went neutral */

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --section-y: 120px;
  --nav-h: 72px;
  --gutter: 48px;
  --maxw: 1200px;
  --radius: 16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body, h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
/* Any display: value on a component beats the hidden attribute's UA default,
   which silently broke .form[hidden] (display: grid). Make hidden authoritative. */
[hidden] { display: none !important; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent-secondary);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--color-accent-primary); color: var(--color-bg);
  padding: var(--s-3) var(--s-4); border-radius: 8px;
  font-weight: 600; text-decoration: none;
  transition: top 150ms ease-out;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section--raised { background: var(--color-bg-raised); }

.section__title {
  font-size: 36px; line-height: 1.15; font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 26ch;
  text-wrap: balance;
}
.section__sub {
  font-size: 19px; line-height: 1.55; font-weight: 500;
  color: var(--color-text-muted);
  max-width: 62ch;
  margin-top: var(--s-4);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--s-3) var(--s-5);
  border: 0; border-radius: 10px;
  font-size: 16px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}
/* Ink-on-coral, not ivory-on-coral: ivory measured 3.41:1 here and failed AA. */
.btn--primary { background: var(--color-accent-primary); color: var(--color-bg); }
.btn--primary:hover {
  background: var(--color-accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(216, 90, 48, 0.28);
}
.btn--primary:active { transform: translateY(0); }
.btn--sm { min-height: 44px; padding: var(--s-3) var(--s-4); font-size: 15px; }
.btn--full { width: 100%; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; text-decoration: none; }
.logo__mark { height: 28px; width: 40px; flex: none; }
.logo__word { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.logo__word-a { color: var(--color-text); }
.logo__word-b { color: var(--color-accent-primary); }
.logo--sm .logo__mark { height: 24px; width: 34px; }
.logo--sm .logo__word { font-size: 18px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, backdrop-filter 150ms ease-out;
}
.nav.is-stuck {
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
}
.nav__inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-6);
}
.nav__links { display: flex; align-items: center; gap: var(--s-5); margin-left: var(--s-6); }
.nav__links a, .nav__mobile a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  color: var(--color-text-muted);
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: color 150ms ease-out;
}
.nav__links a:hover, .nav__mobile a:hover { color: var(--color-text); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1);
  background: none; border: 1px solid var(--color-border); border-radius: 8px;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--color-text);
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: var(--s-2) var(--s-5) var(--s-5);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.nav__mobile a { min-height: 48px; font-size: 17px; }

/* ---------- Hero ---------- */
.hero { padding-top: var(--s-9); padding-bottom: var(--s-9); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__title {
  font-size: 64px; line-height: 1.08; font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 800px;
  text-wrap: balance;
}
.hero__sub {
  font-size: 19px; line-height: 1.55; font-weight: 500;
  color: var(--color-text-muted);
  max-width: 600px;
  margin-top: var(--s-5);
}
.hero__cta { margin-top: var(--s-6); }
.hero__micro {
  font-size: 13px; line-height: 1.4;
  color: var(--color-text-faint);
  margin-top: var(--s-3);
}
.hero__visual {
  width: 100%; max-width: 960px;
  margin-top: var(--s-7);
  aspect-ratio: 16 / 9;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-faint);
  font-size: 15px;
}
/* Once the real screenshot loads, let it set its own height instead of the
   16:9 placeholder ratio, so nothing gets cropped. */
.hero__visual.has-image { aspect-ratio: auto; display: block; }
.hero-screenshot {
  display: block;
  width: 100%; height: auto;
  object-fit: cover;
}

/* Screenshot fallbacks — shown only when the PNG is missing, so the page
   never renders a broken-image icon. See assets/screenshots/. */
.visual-fallback { display: none; }
.hero__visual.is-missing .visual-fallback { display: block; }

/* ---------- Credibility strip ---------- */
.credibility { padding-block: var(--s-8); }
.credibility__line {
  font-size: 13px; line-height: 1.4; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-faint);
  text-align: center;
  max-width: 62ch; margin-inline: auto;
}

/* ---------- Problem ---------- */
.problem__cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8);
  margin-top: var(--s-7);
  align-items: start;
}
.problem__col { padding-left: var(--s-5); border-left: 2px solid; }
.problem__col--before { border-left-color: var(--color-rule-muted); color: var(--color-text-muted); }
.problem__col--after  { border-left-color: var(--color-accent-primary); color: var(--color-text); }
.problem__label {
  font-size: 13px; line-height: 1.4; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--s-4);
}
.problem__col--after .problem__label { color: var(--color-text-muted); }
.problem__list { counter-reset: p; display: grid; gap: var(--s-4); max-width: 65ch; }
.problem__list li {
  counter-increment: p;
  position: relative;
  padding-left: var(--s-6);
  font-size: 16px; line-height: 1.6;
}
.problem__list li::before {
  content: counter(p) ".";
  position: absolute; left: 0; top: 0;
  font-size: 13px; font-weight: 600; line-height: 1.95;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}
.problem__col--after .problem__list li::before { color: var(--color-accent-secondary); }

/* ---------- How it works ---------- */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6);
  margin-top: var(--s-7);
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 16px;
  height: 1px; background: var(--color-border);
}
.step { position: relative; }
.step__num {
  position: relative; z-index: 1;
  display: inline-block;
  font-size: 32px; line-height: 1; font-weight: 700;
  color: var(--color-accent-secondary);
  background: var(--color-bg);
  padding-right: var(--s-3);
  font-variant-numeric: tabular-nums;
}
.step__title { font-size: 22px; line-height: 1.25; font-weight: 600; margin-top: var(--s-5); letter-spacing: -0.01em; }
.step__body { font-size: 16px; line-height: 1.6; color: var(--color-text-muted); margin-top: var(--s-3); max-width: 65ch; }

/* ---------- Feature blocks ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-9);
  align-items: center;
  margin-top: var(--s-9);
}
.feature--flip .feature__copy { order: 2; }
.feature--flip .feature__visual { order: 1; }
.feature__title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.feature__body { font-size: 16px; line-height: 1.6; color: var(--color-text-muted); margin-top: var(--s-4); max-width: 65ch; }
.feature__visual svg {
  width: 100%; height: auto;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--s-4);
}
.feature__visual svg text { font-family: inherit; }
.feature-screenshot {
  display: block;
  width: 100%; height: auto;
  object-fit: cover;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.feature__visual.is-missing .visual-fallback {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9;
  padding: var(--s-4);
  text-align: center;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-faint);
  font-size: 14px;
}

.feature-minor {
  margin-top: var(--s-9);
  max-width: 560px;
  padding: var(--s-6);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.feature-minor__title { font-size: 19px; line-height: 1.25; font-weight: 600; }
.feature-minor__body { font-size: 15px; line-height: 1.6; color: var(--color-text-muted); margin-top: var(--s-3); max-width: 65ch; }

/* ---------- Trust ---------- */
.trust__body { max-width: 700px; margin: var(--s-6) auto 0; text-align: center; }
.trust .section__title { margin-inline: auto; text-align: center; max-width: 24ch; }
.trust__lead { font-size: 19px; line-height: 1.55; font-weight: 500; max-width: 65ch; margin-inline: auto; }
.trust__points { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.trust__points li { font-size: 15px; line-height: 1.6; color: var(--color-text-muted); max-width: 65ch; margin-inline: auto; }

/* ---------- Contact ---------- */
.contact {
  /* Was --color-bg-raised. With the About section gone, Trust (raised) sits
     directly above this, so a raised Contact merged the two into one slab with
     the coral rule stranded in the middle. Canvas + coral accent line keeps the
     alternation and the close still reads as deliberate. */
  background: var(--color-bg);
  border-top: 3px solid var(--color-accent-primary);
  padding-block: 160px;
  text-align: center;
}
.contact .section__title { margin-inline: auto; max-width: 22ch; }
.contact .section__sub { margin-inline: auto; }
.contact__wrap { max-width: 480px; margin: var(--s-7) auto 0; text-align: left; }

.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px;
  padding: var(--s-3) var(--s-4);
  background: rgba(245, 240, 232, 0.04);
  /* Not --color-border (0.10 = 1.23:1). Form fields are UI components, so their
     boundary must clear WCAG 1.4.11 non-text contrast at 3:1; 0.32 gives 3.06:1.
     --color-border stays 0.10 for decorative rules, where 1.4.11 does not apply. */
  border: 1px solid var(--color-field-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 16px; line-height: 1.5;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-faint); }
.field input:hover, .field textarea:hover { border-color: rgba(245, 240, 232, 0.45); }
.field input:focus, .field textarea:focus { border-color: var(--color-accent-primary); background: rgba(245, 240, 232, 0.06); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--color-accent-primary); }
.field__error, .form__error { font-size: 13px; line-height: 1.4; color: var(--color-accent-secondary); }
.form__error { margin-top: var(--s-1); }
.form__success { font-size: 19px; line-height: 1.55; font-weight: 500; text-align: center; padding-block: var(--s-7); }

/* ---------- Footer ---------- */
.footer { background: var(--color-bg); border-top: 1px solid var(--color-border); padding-block: var(--s-8); }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; }
.footer__email { margin-top: var(--s-2); font-size: 15px; }
.footer__email a { color: var(--color-text-muted); text-decoration: none; }
.footer__email a:hover { color: var(--color-accent-primary); }
.form__note { font-size: 13px; line-height: 1.5; color: var(--color-text-faint); text-align: center; }
.form__note a { color: var(--color-text-muted); }
.footer__desc { font-size: 15px; line-height: 1.5; color: var(--color-text-muted); margin-top: var(--s-3); }
.footer__links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; color: var(--color-text-muted); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.footer__links a:hover { color: var(--color-text); border-bottom-color: var(--color-accent-secondary); }
.footer__legal { font-size: 13px; line-height: 1.4; color: var(--color-text-faint); margin-top: var(--s-7); }

/* ---------- Scroll reveal ----------
   Gated on html.js, which an inline <head> script sets before first paint.
   Without JS (or with reduced motion, where the class is removed) content
   renders in its final state and is never left hidden. */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  /* --section-y deliberately stays 120px here: the spec pins it at 120 desktop /
     72 mobile with no intermediate step. Only type and gaps tighten. */
  .hero__title { font-size: 52px; }
  .feature { gap: var(--s-7); }
  .container { padding-inline: var(--s-6); }
}

@media (max-width: 768px) {
  :root { --section-y: 72px; --nav-h: 64px; --gutter: 24px; }

  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__inner { gap: var(--s-4); }
  .nav__mobile { display: flex; }

  .hero { padding-top: var(--s-8); padding-bottom: var(--s-8); }
  .hero__title { font-size: 36px; line-height: 1.1; }
  .hero__sub { font-size: 17px; line-height: 1.5; }
  .hero__visual { margin-top: var(--s-6); }

  .section__title { font-size: 26px; max-width: 24ch; }
  .section__sub { font-size: 17px; line-height: 1.5; }

  .problem__cols { grid-template-columns: 1fr; gap: var(--s-7); }
  .problem__list li { font-size: 15px; line-height: 1.55; }

  .steps { grid-template-columns: 1fr; gap: var(--s-7); }
  .steps::before { display: none; }
  .step__title { font-size: 19px; }
  .step__body { font-size: 15px; line-height: 1.55; }

  .feature { grid-template-columns: 1fr; gap: var(--s-6); margin-top: var(--s-8); }
  .feature--flip .feature__copy { order: 0; }
  .feature--flip .feature__visual { order: 0; }
  .feature__title { font-size: 19px; }
  .feature__body { font-size: 15px; line-height: 1.55; }
  .feature-minor { margin-top: var(--s-8); padding: var(--s-5); }

  .trust__lead { font-size: 17px; line-height: 1.5; }


  .contact { padding-block: 96px; }
  .contact__wrap { margin-top: var(--s-6); }

  .footer__inner { flex-direction: column; gap: var(--s-5); }
  .footer__legal { margin-top: var(--s-6); }
}

@media (max-width: 480px) {
  .hero__title { font-size: 32px; }
  /* Scoped to the hero: a blanket .btn { width: 100% } also stretched the nav CTA. */
  .hero__cta { width: 100%; }
  .hero__cta .btn { width: 100%; }
  /* Buy back room in the nav row so the logo and CTA aren't shoulder to shoulder. */
  .nav__inner { gap: var(--s-3); }
  .logo__word { font-size: 18px; }
  .nav__right .btn--sm { padding-inline: var(--s-3); font-size: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Policy pages ---------- */
.policy { max-width: 68ch; }
.policy__meta { margin-top: var(--s-3); font-size: 14px; color: var(--color-text-faint); }
.policy__lead { margin-top: var(--s-5); font-size: 19px; line-height: 1.6; color: var(--color-text-muted); }
.policy h2 {
  margin-top: var(--s-7); margin-bottom: var(--s-3);
  font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em;
}
.policy p { margin-top: var(--s-4); color: var(--color-text-muted); }
.policy ul { margin-top: var(--s-4); display: grid; gap: var(--s-3); }
.policy li { padding-left: var(--s-5); position: relative; color: var(--color-text-muted); }
.policy li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent-secondary);
}
.policy strong { color: var(--color-text); font-weight: 600; }
.policy a:not(.btn) { color: var(--color-accent-primary); }
.privacy__back { margin-top: var(--s-8); }
