/* ==========================================================================
   Untether — homepage stylesheet
   The decoy landing page (index.html) only. The shared subpage identity lives
   in site.css; the two overlap on tokens, header, footer and buttons but the
   homepage carries its own hero, stats, calculator, cases and CTA sections.
   ========================================================================== */
  /* Dark-by-default green/paper identity. Light mode is html.theme-light. */
  :root {
    color-scheme: dark;
    --paper: #141210;
    --paper-2: #1c1914;
    --ink: #efe9dc;
    --ink-soft: #c2b8a4;
    --ink-faint: #8e8574;
    --green: #3d9a62;
    --green-dark: #2f7d4e;
    --amber: #e0a53a;
    --amber-soft: #3a2f16;
    --line: #2c2820;
    --card: #1c1914;
    --band: #0c0b09;
    --band-fg: #efe9dc;
    --band-muted: #9a917f;
    --nav-active-bg: rgba(61, 154, 98, 0.18);
    --masthead-bg: rgba(20, 18, 16, 0.92);
    --radius: 14px;
    --max: 1120px;
    font-size: 16px;
  }
  html.theme-light {
    color-scheme: light;
    --paper: #faf7f0;
    --paper-2: #f1ece0;
    --ink: #1c1a15;
    --ink-soft: #565043;
    --ink-faint: #8a8271;
    --green: #1f6f43;
    --green-dark: #14522f;
    --amber: #d9931f;
    --amber-soft: #f5d9a8;
    --line: #ddd5c4;
    --card: #ffffff;
    --band: #1c1a15;
    --band-fg: #faf7f0;
    --band-muted: #b7ae99;
    --nav-active-bg: #e4efe7;
    --masthead-bg: rgba(250, 247, 240, 0.92);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
  }
  h1, h2, h3, h4, .sans {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.01em;
  }
  a { color: var(--green); }
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
  .eyebrow {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--amber);
    margin-bottom: 12px;
  }
  section { padding: 80px 0; }
  section h2 { font-size: 2.1rem; line-height: 1.15; margin-bottom: 16px; }
  .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; }

  /* ---------- header (shared with every subpage; mirrors assets/css/site.css) ---------- */
  .topbar { background: var(--band); color: #d8cfba; font-size: 0.78rem; letter-spacing: 0.02em; font-family: 'Helvetica Neue', Arial, sans-serif; }
  .topbar .wrap { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 7px 24px; flex-wrap: wrap; }
  .topbar a { color: #f0e9d8; text-decoration: none; }
  .topbar a:hover { text-decoration: underline; }
  .topbar-badges { display: flex; gap: 14px; flex-wrap: wrap; }
  .masthead {
    position: sticky; top: 0; z-index: 50;
    background: var(--masthead-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  /* nowrap until the mobile breakpoint — Methodology is the longest label and
     used to tip "Request a pilot" onto a second row near the 1120px max width. */
  .masthead .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 12px; padding-bottom: 12px;
    flex-wrap: nowrap;
  }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 1 auto; min-width: 0; }
  .brand-mark {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px;
    display: grid; place-items: center;
    font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 1.15rem; font-weight: 800;
    color: #fff; background: var(--green);
  }
  .brand-text { display: flex; flex-direction: column; line-height: 1.16; min-width: 0; }
  .brand-name { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 1.05rem; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; }
  .brand-sub { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.64rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
  .nav {
    display: flex; align-items: center; gap: 2px;
    flex-wrap: nowrap; flex: 1 1 auto; justify-content: flex-end;
    min-width: 0; overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 8px 9px; border-radius: 8px; font-size: 0.84rem; font-weight: 500;
    color: var(--ink-soft); text-decoration: none; white-space: nowrap; flex: 0 0 auto;
  }
  .nav a:hover { background: var(--paper-2); color: var(--ink); }
  .nav a.is-active { color: var(--green); background: var(--nav-active-bg); font-weight: 500; }
  .btn-sm { padding: 7px 12px; font-size: 0.78rem; }
  .btn {
    display: inline-block;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700; font-size: 0.92rem;
    padding: 12px 22px; border-radius: 999px;
    text-decoration: none; border: none; cursor: pointer;
  }
  .btn-primary { background: var(--green); color: #fff !important; }
  .btn-primary:hover { background: var(--green-dark); }
  .btn-ghost { border: 1.5px solid var(--line); color: var(--ink) !important; background: transparent; }
  .btn-ghost:hover { border-color: var(--ink-faint); }

  /* ---------- hero ---------- */
  .hero { padding: 88px 0 64px; }
  .hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
  .hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; margin-bottom: 22px; }
  .hero h1 em { font-style: normal; color: var(--green); }
  .hero p { font-size: 1.18rem; color: var(--ink-soft); margin-bottom: 30px; max-width: 520px; }
  .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
  .hero-note { margin-top: 18px; font-size: 0.85rem; color: var(--ink-faint); font-family: 'Helvetica Neue', Arial, sans-serif; }

  /* ---------- image slots ---------- */
  .img-slot {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    display: block;
    position: relative;
  }
  .img-slot.square { aspect-ratio: 1 / 1; }
  .img-slot.wide { aspect-ratio: 16 / 9; }
  .img-slot svg, .img-slot img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .img-slot .credit {
    position: absolute; bottom: 8px; right: 10px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.62rem; color: rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.25); padding: 2px 8px; border-radius: 999px;
    pointer-events: none;
  }

  /* ---------- stats ---------- */
  .stats { background: var(--band); color: var(--band-fg); padding: 52px 0; }
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
  .stat b { display: block; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 2.2rem; font-weight: 800; }
  .stat span { font-size: 0.85rem; color: var(--band-muted); font-family: 'Helvetica Neue', Arial, sans-serif; }

  /* ---------- trusted ---------- */
  .trusted { padding: 44px 0; border-bottom: 1px solid var(--line); }
  .trusted p { text-align: center; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 22px; }
  .trusted-row { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 700; color: var(--ink-faint); font-size: 1.05rem; }
  .trusted-row span { opacity: 0.75; }

  /* ---------- impact calculator (also the tung unlock) ---------- */
  .invest { background: var(--paper-2); }
  .invest-box {
    display: flex; align-items: stretch; gap: 22px;
    margin-top: 36px; padding: 28px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .invest-field { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .invest-field > span {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint);
  }
  .invest-inputwrap {
    display: flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 4px 16px; background: var(--paper);
  }
  .invest-inputwrap:focus-within { border-color: var(--green); }
  .invest-prefix {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 800;
    font-size: 1.6rem; color: var(--ink-faint);
  }
  #investAmt {
    border: 0; background: transparent; outline: none; width: 100%; min-width: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 1.8rem; font-weight: 800;
    color: var(--ink); padding: 10px 0;
  }
  .invest-arrow {
    display: flex; align-items: center; font-size: 1.6rem; color: var(--ink-faint);
    font-family: 'Helvetica Neue', Arial, sans-serif;
  }
  .invest-out { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
  .invest-out b {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 2.1rem; font-weight: 800;
    color: var(--green); line-height: 1.1;
  }
  .invest-out span {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.92rem; color: var(--ink-soft);
  }
  .invest-note { margin-top: 14px; font-size: 0.85rem; color: var(--ink-faint); font-family: 'Helvetica Neue', Arial, sans-serif; }

  /* ---------- problem ---------- */
  .problem-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
  .problem ul { margin: 22px 0 0 0; list-style: none; }
  .problem li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
  .problem li b { font-family: 'Helvetica Neue', Arial, sans-serif; color: var(--green); white-space: nowrap; }

  /* ---------- how ---------- */
  .how { background: var(--paper-2); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
  .step {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px;
  }
  .step .num {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 800;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--amber-soft); color: var(--ink);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  }
  .step h3 { font-size: 1.2rem; margin-bottom: 10px; }
  .step p { font-size: 0.98rem; color: var(--ink-soft); }

  /* ---------- features ---------- */
  .features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
  .feature {
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; background: var(--card);
  }
  .feature .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; }
  .feature h3 { font-size: 1.08rem; margin-bottom: 8px; }
  .feature p { font-size: 0.94rem; color: var(--ink-soft); }

  /* ---------- tech ---------- */
  .tech { background: var(--band); color: var(--band-fg); }
  .tech h2, .tech h3 { color: #fff; }
  .tech .lede { color: var(--band-muted); }
  .tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; align-items: start; }
  .tech-block { border-left: 3px solid var(--amber); padding-left: 20px; margin-bottom: 30px; }
  .tech-block h3 { font-size: 1.05rem; margin-bottom: 8px; font-family: 'Helvetica Neue', Arial, sans-serif; }
  .tech-block p { font-size: 0.95rem; color: #cfc7b4; }
  .tech-block code {
    font-family: 'SF Mono', Consolas, monospace; font-size: 0.85em;
    background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 4px;
  }
  .spec-table { width: 100%; border-collapse: collapse; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.9rem; margin-top: 8px; }
  .spec-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .spec-table td:first-child { color: #b7ae99; width: 45%; }

  /* ---------- cases ---------- */
  .cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
  .case { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
  .case .img-slot { border: none; border-radius: 0; border-bottom: 1px solid var(--line); }
  .case-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .case-body h3 { font-size: 1.08rem; }
  .case-body p { font-size: 0.93rem; color: var(--ink-soft); flex: 1; }
  .case-body .metric { font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 800; color: var(--green); font-size: 0.9rem; }

  /* ---------- pricing ---------- */
  .pricing { background: var(--paper-2); }
  .price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; align-items: stretch; }
  .plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
  .plan.featured { border: 2px solid var(--green); position: relative; }
  .plan .tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--green); color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.72rem; font-weight: 700; padding: 4px 14px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .plan h3 { font-size: 1.1rem; }
  .plan .price { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 2.2rem; font-weight: 800; margin: 12px 0 2px; }
  .plan .per { font-size: 0.82rem; color: var(--ink-faint); font-family: 'Helvetica Neue', Arial, sans-serif; margin-bottom: 18px; }
  .plan ul { list-style: none; margin: 0 0 26px; flex: 1; }
  .plan li { font-size: 0.92rem; color: var(--ink-soft); padding: 7px 0 7px 26px; position: relative; }
  .plan li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

  /* ---------- team ---------- */
  .team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 44px; }
  .person { text-align: center; }
  .person .img-slot { margin-bottom: 14px; }
  .person h3 { font-size: 1rem; }
  .person span { font-size: 0.85rem; color: var(--ink-faint); font-family: 'Helvetica Neue', Arial, sans-serif; }

  /* ---------- faq ---------- */
  .faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
  .faq summary {
    font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
    cursor: pointer; font-size: 1.02rem; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; font-size: 1.4rem; color: var(--ink-faint); }
  .faq details[open] summary::after { content: "–"; }
  .faq details p { margin-top: 12px; color: var(--ink-soft); font-size: 0.98rem; max-width: 760px; }

  /* ---------- journal ---------- */
  .journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
  .post { text-decoration: none; color: inherit; display: block; }
  .post .img-slot { margin-bottom: 14px; }
  .post .date { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; }
  .post h3 { font-size: 1.08rem; margin: 6px 0; }
  .post p { font-size: 0.92rem; color: var(--ink-soft); }

  /* ---------- cta ---------- */
  .cta { background: var(--green); color: #fff; text-align: center; }
  .cta h2 { color: #fff; font-size: 2.4rem; }
  .cta p { color: #d3e6da; max-width: 560px; margin: 14px auto 32px; font-size: 1.1rem; }
  .cta .btn { background: #fff; color: var(--green) !important; }

  /* ---------- footer (shared with every subpage; mirrors assets/css/site.css) ---------- */
  .footer { background: var(--band); color: #b7ae99; padding: 56px 0 26px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.86rem; }
  .footer h5 { color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; font-weight: 700; }
  .footer a { color: #c9c0ab; text-decoration: none; display: block; padding: 4px 0; }
  .footer a:hover { color: #fff; text-decoration: underline; }
  .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; }
  .footer-bottom {
    margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
    font-size: 0.78rem; color: #8a8271;
  }
  .footer-bottom a { display: inline; color: #b7ae99; }
  .footer-bottom a:hover { color: #fff; }
  .accred { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
  .accred span { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid rgba(255,255,255,0.18); border-radius: 3px; padding: 4px 8px; color: #b7ae99; }

  /* the counter that is, as far as anyone knows, used for nothing */
  .odometer {
    display: inline-flex; align-items: center; gap: 10px;
    border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
    padding: 8px 14px; background: rgba(255,255,255,0.04);
  }
  .odometer .digits {
    font-family: 'SF Mono', Consolas, monospace; font-size: 1.05rem;
    color: var(--amber); letter-spacing: 0.2em; font-weight: 700;
    transition: transform 0.12s ease;
  }
  .odometer .digits.bump { transform: scale(1.25); }
  .odometer small { font-size: 0.7rem; color: #8a8271; max-width: 150px; line-height: 1.3; }

  /* ---------- theme toggle (fixed bottom-right) ---------- */
  .theme-toggle {
    position: fixed; right: 18px; bottom: 18px; z-index: 80;
    width: 48px; height: 48px; border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card); color: var(--ink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    display: grid; place-items: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  }
  .theme-toggle:hover { border-color: var(--green); transform: translateY(-1px); }
  .theme-toggle:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
  }
  .theme-toggle svg { width: 22px; height: 22px; display: block; }
  .theme-toggle .icon-sun { display: none; }
  .theme-toggle .icon-moon { display: block; }
  html.theme-light .theme-toggle .icon-sun { display: block; }
  html.theme-light .theme-toggle .icon-moon { display: none; }
  html.theme-light .theme-toggle {
    box-shadow: 0 2px 10px rgba(28, 26, 21, 0.12);
  }

  @media (max-width: 900px) {
    .masthead .wrap { flex-wrap: wrap; }
    .nav { flex-wrap: wrap; overflow-x: visible; justify-content: flex-start; }
    .hero-grid, .problem-grid, .tech-grid { grid-template-columns: 1fr; }
    .steps, .features-grid, .cases-grid, .price-grid, .journal-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .invest-box { flex-direction: column; gap: 16px; }
    .invest-arrow { transform: rotate(90deg); align-self: center; }
    .theme-toggle { right: 14px; bottom: 14px; width: 44px; height: 44px; }
  }
