/* ============================================================
   GrowCape — page-specific styles for index.html.
   Loaded after styles.css, which holds the base tokens and components.
   ============================================================ */

  @media (min-width: 981px) { .flow-6 { grid-template-columns: repeat(6, 1fr); } }
  /* Feature cards that carry the two headline themes */
  .feature.spotlight { border-color: var(--emerald); box-shadow: var(--shadow-sm); }
  .feature.spotlight .ic { background: var(--brand-gradient); color: #fff; }
  .feature .flag {
    display: inline-block; margin-top: 12px; font-size: .72rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--emerald-dark);
  }
  /* Journal-entry panel in the fund-accounting section */
  .je { width: 100%; border-collapse: collapse; font-size: .86rem; }
  .je td { padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
  .je td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--body); font-weight: 600; white-space: nowrap; }
  .je td.nil { text-align: right; color: var(--subtle); }
  .je .je-total td { border-bottom: 0; border-top: 2px solid var(--border-strong); color: var(--body); font-weight: 700; padding-top: 12px; }
  .je-head { display: flex; align-items: center; justify-content: space-between; font-size: .84rem; font-weight: 600; }
  .je-head .pill { font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
  .je-foot { font-size: .76rem; color: var(--subtle); }
  /* Demo-request form in the closing CTA band */
  #cta .cta-band { text-align: left; padding: 44px; }
  .cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
  #cta .cta-band p { color: rgba(255,255,255,.82); margin: 16px 0 22px; max-width: 46ch; }
  .cta-points { display: grid; gap: 10px; color: rgba(255,255,255,.9); font-size: .93rem; }
  .cta-points li { display: flex; gap: 10px; align-items: flex-start; }
  .cta-points svg { flex: none; margin-top: 3px; color: #5eead4; }
  .form-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-lg); display: grid; gap: 14px;
  }
  /* On the dark band the card needs its own edge, or it dissolves into the gradient */
  .dark .form-card { background: #0d1b2f; border-color: rgba(255,255,255,.14); }
  .form-card h3 { font-size: 1.02rem; color: var(--body); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .field { display: grid; gap: 6px; }
  .field label { font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .field label .req { color: var(--emerald-dark); }
  .form-card input, .form-card select, .form-card textarea {
    width: 100%; font: inherit; font-size: .95rem; color: var(--body);
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px;
    padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
  }
  .form-card textarea { min-height: 88px; resize: vertical; }
  .form-card input:focus, .form-card select:focus, .form-card textarea:focus {
    outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(0,204,153,.2);
  }
  .form-card input:invalid:not(:placeholder-shown) { border-color: #ef6f6f; }
  #cta .form-card .form-note { font-size: .75rem; color: var(--subtle); line-height: 1.5; margin: 0; }
  .form-note a { color: var(--emerald-dark); font-weight: 600; }
  .form-status { display: none; font-size: .85rem; padding: 11px 13px; border-radius: 10px; }
  .form-status.show { display: block; }
  .form-status.ok { background: rgba(0,204,153,.13); color: var(--emerald-dark); }
  @media (max-width: 980px) {
    .cta-grid { grid-template-columns: 1fr; gap: 30px; }
    #cta .cta-band { padding: 32px 24px; }
  }
  @media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
  .note-strip {
    margin-top: 40px; padding: 18px 22px; border-radius: var(--radius);
    background: var(--surface-subtle); border: 1px solid var(--border);
    color: var(--muted); font-size: .92rem; text-align: center;
  }

/* ---------- Focused sub-pages ---------- */
.page-hero { padding: calc(var(--nav-h) + 54px) 0 8px; }
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.page-hero p { color: var(--muted); font-size: 1.2rem; margin-top: 16px; max-width: 66ch; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--subtle); margin-bottom: 20px; }
.back-link:hover { color: var(--emerald-dark); }
.section-cta { text-align: center; margin-top: 42px; }
.teaser-points { display: grid; gap: 11px; margin: 22px 0 26px; }
.teaser-points li { display: flex; gap: 11px; align-items: flex-start; color: var(--muted); font-size: 1rem; }
.teaser-points svg { flex: none; margin-top: 5px; color: var(--emerald-dark); }
.first-section { padding-top: calc(var(--nav-h) + 54px); }

/* ---------- Hero: emphasised word + tagline ---------- */
.hero h1 .intelligent { font-style: italic; font-weight: 800; padding-right: .06em; }
.hero-tagline { margin-top: 20px; font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 800; letter-spacing: -.01em; }
.hero-tagline + .lede { margin-top: 12px; }

/* ---------- Why GrowCape: advantages + single source of truth ---------- */
.ss-advantages { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ss-adv {
  display: flex; gap: 16px; align-items: flex-start; padding: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.ss-adv .ic, .ss-base .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--brand-gradient); }
.ss-adv h3 { font-size: 1.12rem; }
.ss-adv p { color: var(--muted); font-size: .95rem; margin-top: 8px; }
.ss-base {
  display: flex; gap: 16px; align-items: center; margin: 22px 0 40px; padding: 22px 26px;
  border-radius: var(--radius); background: var(--brand-gradient-soft); border: 1px solid rgba(16,185,129,.3);
}
.ss-base p { color: var(--muted); font-size: 1rem; }
.ss-base strong { color: var(--body); }

/* ---------- 360°: six shapes, each a slice off the core that flares into a bulged card ---------- */
.hub { position: relative; width: 100%; aspect-ratio: 1300 / 670; }
.hub-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-svg .orbit { fill: none; stroke: var(--border-strong); stroke-width: 1.4; stroke-dasharray: 2 7; transform-origin: 0 0; animation: orbit 60s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.seg {
  fill: var(--bg-alt); stroke: var(--border-strong); stroke-width: 1.4; stroke-linejoin: round; cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), fill .25s, stroke .25s, filter .35s;
}
.seg:hover { stroke: var(--emerald); }
.seg.active { fill: url(#segGrad); stroke: transparent; transform: translate(var(--dx), var(--dy)); filter: drop-shadow(0 14px 24px rgba(37,99,235,.35)); }

.wheel-core {
  position: absolute; left: 50%; top: 50%; width: 17.8%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--brand-gradient); box-shadow: var(--shadow-brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 14px; pointer-events: none;
}
/* Brand icon as a faint watermark behind the 360° text */
.wheel-core { isolation: isolate; overflow: hidden; }
.wheel-core::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/growcape-icon.png") center / 100% no-repeat; opacity: .28;
}
.wheel-core .deg { font-size: clamp(2.2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.wheel-core .deg span { font-weight: 600; }
.wheel-core .cl { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; line-height: 1.35; min-height: 2.7em; }

/* Text sits inside the card end of its shape; positions come from the markup */
.spoke {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  display: flex; flex-direction: column; justify-content: center; padding: 4px 6px;
  cursor: pointer; outline: none; color: var(--muted);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), color .25s;
}
.spoke .sh { display: flex; align-items: center; gap: 10px; }
.spoke .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-gradient-soft); color: var(--emerald-dark); transition: background .25s, color .25s; }
.spoke h3 { font-size: 1rem; line-height: 1.2; transition: color .25s; }
.spoke ul { margin-top: 10px; display: grid; gap: 5px; }
.spoke li { position: relative; padding-left: 14px; font-size: .85rem; line-height: 1.4; }
.spoke li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); transition: background .25s; }
.spoke.active { transform: translate(var(--dx), var(--dy)); color: rgba(255,255,255,.9); }
.spoke.active h3 { color: #fff; }
.spoke.active .ic { background: rgba(255,255,255,.2); color: #fff; }
.spoke.active li::before { background: #fff; }
.spoke:focus-visible h3 { text-decoration: underline; text-underline-offset: 3px; }

/* Below desktop the shapes are too small for text: stack bulged cards under the core */
@media (max-width: 980px) {
  .hub { aspect-ratio: auto; max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
  .hub-svg { display: none; }
  .wheel-core { position: relative; left: auto; top: auto; transform: none; width: 190px; margin: 0 auto 10px; }
  .wheel-core .deg { font-size: 2.6rem; }
  .spoke {
    position: static; width: auto; height: auto; transform: none !important;
    background: var(--bg-alt); border: 1.4px solid var(--border-strong); padding: 18px 22px;
    border-radius: var(--radius); transition: background .25s, color .25s;
  }
  .spoke.active { background: var(--brand-gradient); border-color: transparent; }
  /* keep the stacked order going down each side: left column first, then right */
  .spoke[data-k="truth"] { order: 1; } .spoke[data-k="journals"] { order: 2; } .spoke[data-k="calendar"] { order: 3; }
  .spoke[data-k="ops"] { order: 4; } .spoke[data-k="eco"] { order: 5; } .spoke[data-k="deals"] { order: 6; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-svg .orbit { animation: none; }
  .seg, .spoke { transition: none; }
}

/* ---------- Back-to-top button ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--brand-gradient); box-shadow: var(--shadow-brand);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, box-shadow .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -16px rgba(37,99,235,.6); }
.to-top:focus-visible { outline: 3px solid rgba(0,204,153,.5); outline-offset: 3px; }
@media (max-width: 640px) { .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; } }

/* ---------- In practice: before / after ---------- */
.practice { margin-top: 96px; }
.dip { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dpanel { border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--border); }
.dpanel.old { background: var(--surface-subtle); }
.dpanel.new { background: linear-gradient(150deg, var(--ink) 0%, var(--ink-2) 100%); border-color: transparent; color: #fff; }
.stamp { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stamp .t { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.stamp .s { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.dark .dpanel.new { border-color: rgba(94,234,212,.28); }
.dpanel.new .stamp .s { color: #5eead4; }
.actors { display: grid; gap: 12px; }
.actors li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--muted); }
.actors b { color: var(--body); font-weight: 700; }
.dpanel.new .actors li { color: rgba(255,255,255,.72); }
.dpanel.new .actors b { color: #fff; }
.actors .mk { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; margin-top: 1px; }
.dpanel.old .mk { background: rgba(245,158,11,.16); color: #b45309; }
.dark .dpanel.old .mk { color: #fcd34d; }
.dpanel.new .mk { background: var(--brand-gradient); color: #fff; }
.dcap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-weight: 600; font-size: .95rem; }
.dpanel.new .dcap { border-top-color: rgba(255,255,255,.12); color: #fff; }

/* ---------- Key features: twelve modules with filter ---------- */
.modules { margin-top: 96px; }
.mf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -24px 0 32px; }
.mf-chip {
  font: inherit; font-size: .9rem; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border-strong); transition: color .15s, border-color .15s, background .15s;
}
.mf-chip:hover { color: var(--emerald-dark); border-color: var(--emerald); }
.mf-chip[aria-pressed="true"] { background: var(--brand-gradient); color: #fff; border-color: transparent; }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.mcard[hidden] { display: none; }
.mcard .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-gradient-soft); color: var(--emerald-dark); margin-bottom: 14px; }
.mcard h3 { font-size: 1.02rem; }
.mcard p { color: var(--muted); font-size: .9rem; margin-top: 8px; flex: 1; }
.mcard .gtag { margin-top: 14px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--emerald-dark); }

@media (max-width: 980px) {
  .dip, .ss-advantages { grid-template-columns: 1fr; }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .mgrid { grid-template-columns: 1fr; }
  .practice, .modules { margin-top: 64px; }
  .dpanel { padding: 24px; }
  .ss-adv, .ss-base { padding: 20px; }
}

/* Compact variant of the check-list for the merged accounting / compliance sections */
.check-list.compact { gap: 12px; margin-bottom: 4px; }
.check-list.compact strong { font-size: .96rem; }
.check-list.compact span { font-size: .9rem; }

/* In-page anchors land below the fixed nav; highlight the section in view */
section[id] { scroll-margin-top: calc(var(--nav-h) - 8px); }
.nav-links a.current { color: var(--emerald-dark); }
/* Six in-page links: keep the logo from being squeezed */
.nav-logo { flex: none; }
@media (max-width: 640px) {
  .nav-logo img { height: 34px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { padding: 10px 14px; font-size: .88rem; }
  .theme-toggle { width: 36px; height: 36px; }
}
@media (max-width: 380px) { .nav-cta .btn { padding: 9px 11px; font-size: .82rem; } }
/* On smaller screens lead with the words, not the product mock (overrides the order: -1 in styles.css) */
@media (max-width: 980px) { .hero-visual { order: 0; } }
.eyebrow { max-width: 100%; }

/* Hero trust line: each dot travels with its own text when the line wraps */
.hero-trust { gap: 8px 18px; }
.hero-trust .trust-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Why GrowCape: data protection row */
.protect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: -18px 0 40px; }
.protect { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.protect .ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-gradient-soft); color: var(--emerald-dark); }
.protect h3 { font-size: 1rem; }
.protect p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
@media (max-width: 980px) { .protect-grid { grid-template-columns: 1fr; } }

/* Team: real cards now, not dashed placeholders */
.team-grid { max-width: 860px; margin: 0 auto; }
.team-card { border-style: solid; border-color: var(--border); }
.team-photo { border: 3px solid transparent; background: var(--brand-gradient) border-box; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
/* Photos: white background in light mode, the original navy one in dark mode */
.team-photo .ph-dark { display: none; }
.dark .team-photo .ph-light { display: none; }
.dark .team-photo .ph-dark { display: block; }

/* Demo form: honeypot, error state, fallback compose links */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status.err { background: rgba(239,111,111,.12); color: #b42318; }
.dark .form-status.err { color: #fca5a5; }
.form-fallback { display: flex; flex-wrap: wrap; gap: 8px; }
.form-fallback[hidden] { display: none; }
.fb-btn {
  font: inherit; font-size: .85rem; font-weight: 600; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--body); border: 1px solid var(--border-strong);
}
.fb-btn:hover { border-color: var(--emerald); color: var(--emerald-dark); }
.form-card button[disabled] { opacity: .7; cursor: progress; }
