/* ==========================================================================
   cane agency — public website (web/)
   Site-specific styles layered on the Cane Design System tokens.
   Only marketing-shell patterns live here; primitives come from styles.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-strong); letter-spacing: -0.02em; margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- Layout container --------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--soft { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary);
}
.lede { color: var(--text-muted); font-size: var(--fs-lg); line-height: 1.6; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.sec-head { max-width: 660px; margin: 0 auto 48px; }
.sec-head h2 { font-size: var(--fs-3xl); margin-top: 10px; }
.sec-head p { color: var(--text-muted); font-size: var(--fs-lg); margin: 12px 0 0; }

/* ---- Header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base) var(--ease-standard);
}
.site-head.is-scrolled { box-shadow: var(--shadow-sm); }
.site-head__inner {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  height: 56px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand img { width: 30px; height: 30px; }
.brand__wm { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.brand__wm .c { color: var(--cane-500); }
.brand__wm .a { color: var(--gold-500); }
.head-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.head-nav a, .head-nav button.navlink {
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500; white-space: nowrap;
  color: var(--text); background: none; border: 0; cursor: pointer;
  padding: 0 12px; height: 100%; border-radius: var(--radius-md); display: inline-flex; align-items: center; gap: 5px;
}
.head-nav a:hover, .head-nav button.navlink:hover { background: var(--surface-3); color: var(--text-strong); }
.head-nav a.is-active { color: var(--primary); font-weight: 600; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-actions .theme-toggle {
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: none; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.head-actions .theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.head-actions .theme-toggle svg { width: 16px; height: 16px; }
.hamburger { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); align-items: center; justify-content: center; cursor: pointer; }

/* ---- Mega menu ---------------------------------------------------------- */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all var(--dur-base) var(--ease-standard); }
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega__grid { max-width: 1180px; margin: 0 auto; padding: 24px 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.mega__col > .eyebrow { display: block; margin-bottom: 12px; }
.mega__items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega__item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--text); }
.mega__item:hover { background: var(--surface-2); }
.mega__item .ico { width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.mega__item b { font-size: 14px; color: var(--text-strong); font-weight: 600; display: block; }
.mega__item span { font-size: 12px; color: var(--text-muted); }
.mega__outcomes { display: flex; flex-direction: column; gap: 2px; }
.mega__outcomes a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); font-size: 13.5px; color: var(--text); }
.mega__outcomes a:hover { background: var(--surface-2); }

/* ---- Mobile drawer ------------------------------------------------------ */
.mnav { position: fixed; inset: 56px 0 0; background: var(--surface); z-index: 55; padding: 18px 22px 96px; overflow-y: auto; transform: translateX(100%); transition: transform var(--dur-base) var(--ease-standard); }
.mnav.is-open { transform: none; }
.mnav a, .mnav .mnav__group > b { display: block; padding: 12px 6px; font-size: 16px; color: var(--text-strong); border-bottom: 1px solid var(--border); }
.mnav__group b { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 18px; border: 0; }
.mnav__sub a { padding-left: 16px; font-weight: 500; color: var(--text); }

/* ---- Sticky mobile CTA + floating LINE ---------------------------------- */
.mobile-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.fab-line { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px; background: var(--cane-600); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--cane-700); }
.fab-line:hover { background: var(--cane-700); color: #fff; }
.fab-line svg, .fab-line [data-sc-icon] { color: #fff; }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__inner { max-width: 1180px; margin: 0 auto; padding: 76px 28px 84px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; }
.hero p.lede { margin: 20px 0 28px; max-width: 520px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__trust { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__art { position: relative; }

/* Cane-motif dark band (gradient + blades) */
.band-dark { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--cane-700), var(--cane-900)); color: #fff; }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark .blades { position: absolute; inset: 0; color: var(--cane-400); opacity: 0.16; }
.band-dark .blades svg { width: 100%; height: 100%; }

/* ---- Generic grids ------------------------------------------------------ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }

/* Feature / value card */
.vcard { padding: 24px; height: 100%; }
.vcard .ico { width: 50px; height: 50px; border-radius: var(--radius-lg); background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.vcard.gold .ico { background: var(--gold-100); color: var(--gold-600); }
.vcard h3 { font-size: var(--fs-xl); margin-bottom: 8px; }
.vcard p { color: var(--text-muted); font-size: 15px; margin: 0; }
.link-row { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; }

/* Steps */
.steps { display: grid; gap: 16px; }
.step__num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-mono); font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.step__ico { color: var(--primary); margin: 12px 0 8px; }

/* Stats */
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.statgrid .stat-v { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-3xl); }
.statgrid .stat-l { font-size: 14px; margin-top: 6px; line-height: 1.4; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 0.85fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); }
.calc__controls { padding: 30px; }
.calc__out { padding: 30px; background: var(--surface-2); border-left: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.calc__row { margin-bottom: 20px; }
.calc__row label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 8px; }
.calc__row label .v { font-family: var(--font-mono); color: var(--primary); }
.calc input[type=range] { width: 100%; accent-color: var(--primary); }
.calc__big { font-family: var(--font-mono); font-weight: 700; font-size: 40px; color: var(--text-strong); line-height: 1; }
.calc__note { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

/* Accordion (FAQ) */
.acc { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.acc__item + .acc__item { border-top: 1px solid var(--border); }
.acc__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 18px 20px; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-strong); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.acc__q:hover { background: var(--surface-2); }
.acc__q .chev { transition: transform var(--dur-base) var(--ease-standard); flex: none; color: var(--text-muted); }
.acc__item.is-open .acc__q .chev { transform: rotate(180deg); }
.acc__a { max-height: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-standard); }
.acc__a__inner { padding: 0 20px 20px; color: var(--text-muted); font-size: 15px; }

/* Store badges (placeholder — app not yet released) */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge { position: relative; display: flex; align-items: center; gap: 11px; height: 56px; padding: 0 18px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); min-width: 190px; }
.store-badge:hover { color: var(--text); background: var(--surface-2); }
[data-theme=dark] .store-badge { background: var(--neutral-900); }
.store-badge .sb-ico { flex: none; opacity: 0.95; }
.store-badge .sb-t1 { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.store-badge .sb-t2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--text); }
.store-badge .sb-soon { position: absolute; top: -9px; right: -8px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; background: var(--gold-500); color: var(--neutral-950); padding: 2px 7px; border-radius: 999px; }

/* Phone mock placeholder */
.phone { width: 260px; margin: 0 auto; border: 10px solid var(--neutral-900); border-radius: 40px; background: var(--neutral-900); box-shadow: var(--shadow-lg); overflow: hidden; }
.phone__screen { aspect-ratio: 9/19; background: var(--surface-2); position: relative; display: flex; align-items: center; justify-content: center; }
.ph-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); text-align: center; padding: 0 20px; }

/* Placeholder media (striped) */
.ph-media { position: relative; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); background:
  repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 11px, var(--surface-3) 11px, var(--surface-3) 22px);
  display: flex; align-items: center; justify-content: center; min-height: 320px; }
.ph-media span { font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); background: var(--surface); padding: 6px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); }

/* Breadcrumb */
.crumbs { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; padding: 18px 0 0; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--primary); }

/* Page hero (interior pages) — only set vertical padding so .wrap's 28px
   horizontal gutter is preserved (a `padding` shorthand here would zero it). */
.pagehead { padding-top: 40px; padding-bottom: 8px; }
.pagehead h1 { font-size: var(--fs-4xl); margin: 12px 0 0; }
.pagehead p { color: var(--text-muted); font-size: var(--fs-lg); margin: 14px 0 0; max-width: 640px; }

/* Prose (Learn / About / legal) */
.prose { max-width: 760px; }
.prose h2 { font-size: var(--fs-2xl); margin: 40px 0 12px; }
.prose h3 { font-size: var(--fs-xl); margin: 28px 0 8px; }
.prose p { color: var(--text); margin: 0 0 14px; }
.prose ul { color: var(--text); padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }

/* Footer */
.site-foot { background: var(--surface-2); border-top: 1px solid var(--border); margin-top: 8px; }
.site-foot__inner { max-width: 1180px; margin: 0 auto; padding: 56px 28px 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot-brand p { color: var(--text-muted); font-size: 14px; max-width: 300px; margin: 14px 0 18px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-strong); margin-bottom: 14px; font-family: var(--font-sans); }
.foot-col a { display: block; color: var(--text-muted); font-size: 14px; padding: 5px 0; }
.foot-col a:hover { color: var(--primary); }
.foot-bottom { max-width: 1180px; margin: 0 auto; padding: 20px 28px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-bottom .mono { font-size: 12.5px; color: var(--text-muted); }
.foot-bottom a { color: var(--text-muted); font-size: 12.5px; }

/* Reveal-on-load — CSS-only one-shot fade that always ends visible. Gated on a
   JS class so no-JS users get content instantly; never leaves content hidden. */
@keyframes caFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
html.js-reveal .reveal { animation: caFade 0.55s var(--ease-standard) both; }
@media (prefers-reduced-motion: reduce) { html.js-reveal .reveal { animation: none; } html { scroll-behavior: auto; } }

/* ---- Auth flows (signup / login) --------------------------------------- */
.auth-wrap { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px 120px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .sc-card { padding: 30px; }
.auth-h { text-align: center; margin-bottom: 24px; }
.auth-h h1 { font-size: var(--fs-2xl); }
.auth-h p { color: var(--text-muted); font-size: 14px; margin: 8px 0 0; }
.stepdots { display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; }
.stepdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); display: block; transition: all var(--dur-base) var(--ease-standard); }
.stepdots i.is-active { background: var(--primary); width: 24px; border-radius: 5px; }
.stepdots i.is-done { background: var(--primary); }
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.otp-row { display: flex; gap: 8px; justify-content: space-between; }
.otp-box { width: 100%; text-align: center; font-family: var(--font-mono); font-size: 20px; padding: 12px 0; }
.role-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; margin-bottom: 10px; font-family: var(--font-sans); transition: border-color var(--dur-base), background var(--dur-base); }
.role-card:hover { border-color: var(--primary-border); background: var(--surface-2); }
.role-card.is-sel { border-color: var(--primary); background: var(--primary-soft); }
.role-card .ico { width: 40px; height: 40px; flex: none; border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.role-card.is-sel .ico { background: var(--surface); }
.role-card b { display: block; font-size: 14.5px; color: var(--text-strong); }
.role-card span { font-size: 12.5px; color: var(--text-muted); }
.role-card .tick { margin-left: auto; color: var(--primary); opacity: 0; }
.role-card.is-sel .tick { opacity: 1; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__art { order: -1; }
  .grid-3, .grid-4, .statgrid { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .calc__out { border-left: 0; border-top: 1px solid var(--border); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 1040px) {
  .head-nav { display: none; }
  .hamburger { display: inline-flex; }
}
@media (max-width: 720px) {
  .head-actions .desktop-only { display: none; }
  .mobile-cta { display: block; }
  .fab-line { bottom: 76px; }
  .section { padding: 56px 0; }
  .sec-head { margin-bottom: 32px; }
  .grid-2, .grid-3, .grid-4, .statgrid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  body { padding-bottom: 0; }
}
@media (max-width: 460px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---- Inline column counts ------------------------------------------------
   Some sections set .grid's column count inline (e.g. the 6-up steps strip).
   An inline style outranks a class rule, so the small-screen reflow has to be
   !important or those strips push the page wider than the viewport. */
@media (max-width: 940px) {
  .grid[style*="repeat(4"], .grid[style*="repeat(5"], .grid[style*="repeat(6"] { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 640px) {
  .grid[style*="repeat(3"], .grid[style*="repeat(4"], .grid[style*="repeat(5"], .grid[style*="repeat(6"] { grid-template-columns: repeat(2, 1fr) !important; }
}
