/* ============================================================
   WERHINO 2.0 - The Millwork Intelligence Platform
   platform.css · evolves the existing Werhino identity
   Dark · warm wood · cinematic · Cormorant Garamond + Inter
   Shape system: buttons = pill, cards = 16px, inputs = 10px
   ============================================================ */

:root {
  --bg:        #0E0E0E;
  --bg-2:      #141210;
  --bg-card:   #17150F;
  --bg-glass:  rgba(20,18,15,0.66);
  --text:      #F4EFE7;       /* warm off-white */
  --muted:     #A39B8B;
  --faint:     #6F685C;
  --accent:    #C9A86A;
  --accent-2:  #E2BE86;
  --accent-dim:rgba(201,168,106,0.14);
  --line:      rgba(244,239,231,0.10);
  --line-2:    rgba(201,168,106,0.28);
  --ok:        #79b07a;
  --warn:      #d8a85a;
  --hot:       #cf6f57;
  --font-d:    'Cormorant Garamond', Georgia, serif;
  --font-b:    'Inter', system-ui, sans-serif;
  --ease:      cubic-bezier(.22,1,.36,1);
  --r-card:    16px;
  --r-input:   10px;
  --pad:       clamp(20px, 5vw, 80px);
  --maxw:      1320px;
  --nav-h:     72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -120px; left: 16px; z-index: 300;
  padding: 10px 18px; background: var(--accent); color: var(--bg);
  font-weight: 600; border-radius: 6px; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* fixed 3D dust background */
#bgCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

/* ---------- shared shells ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .34em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--accent); opacity: .7; }
.h-display {
  font-family: var(--font-d); font-weight: 500;
  line-height: 1.0; letter-spacing: -.015em; color: var(--text);
}
.lead { color: var(--muted); font-weight: 300; line-height: 1.7; }

/* ---------- buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1.02em 2.1em; border-radius: 999px;
  font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--accent); color: #1a1409; box-shadow: 0 10px 30px rgba(201,168,106,.18); }
.btn--solid:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201,168,106,.28); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ============================================================
   HEADER / NAV - sticky, transparent, condenses on scroll
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--pad);
  transition: background .45s var(--ease), backdrop-filter .45s var(--ease), border-color .45s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(14,13,11,.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav__link {
  position: relative; font-size: .76rem; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); transition: color .3s; white-space: nowrap;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--accent); transition: width .35s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 1.2rem; }
.nav__login { font-size: .76rem; font-weight: 500; color: var(--muted); transition: color .3s; }
.nav__login:hover { color: var(--text); }
.nav__cta {
  padding: .7em 1.5em; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); transition: background .3s, color .3s, transform .3s var(--ease);
}
.nav__cta:hover { background: var(--accent); color: #1a1409; transform: translateY(-1px); }
.nav__burger { display: none; flex-direction: column; gap: 6px; width: 30px; padding: 6px 0; }
.nav__burger span { display: block; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), opacity .25s; }
.nav.is-menu .nav__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.is-menu .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-menu .nav__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(10,9,8,.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: flex; flex-direction: column; justify-content: center; gap: .4rem;
  padding: var(--pad);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; }
.menu a {
  font-family: var(--font-d); font-size: clamp(1.9rem, 7vw, 3rem);
  font-weight: 500; color: var(--text); padding: .25rem 0; transition: color .3s;
}
.menu a:hover { color: var(--accent); }
.menu__meta { margin-top: 2rem; display: flex; gap: 1.4rem; font-size: .82rem; color: var(--muted); }

/* ============================================================
   HERO - asymmetric split, cinematic 5-stage sequence
   ============================================================ */
.hero {
  position: relative; z-index: 2;
  min-height: 100svh; min-height: 100dvh;
  display: grid; align-items: center;
  grid-template-columns: 1.04fr 1.12fr;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--maxw); margin-inline: auto;
  padding: calc(var(--nav-h) + clamp(1.5rem,4vh,3rem)) var(--pad) clamp(2.5rem,6vh,4rem);
}
.hero__copy { max-width: 36rem; }
.hero__title {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(3.1rem, 6.4vw, 6rem); line-height: .98; letter-spacing: -.02em;
  margin: 1.6rem 0 1.5rem;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__sub {
  font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--muted);
  font-weight: 300; line-height: 1.65; max-width: 33ch; margin-bottom: 2.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* the sequence stage */
.stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3.05;
  border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0908;
  box-shadow: 0 40px 120px rgba(0,0,0,.55);
}
.stage__layer {
  position: absolute; inset: 0; opacity: 0;
  background-size: cover; background-position: center;
  will-change: opacity, transform;
}
.stage__layer.is-on { opacity: 1; }
.stage__grad {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(8,7,6,.86) 2%, rgba(8,7,6,.12) 38%, transparent 60%),
              radial-gradient(ellipse at 50% 46%, transparent 58%, rgba(8,7,6,.5) 100%);
}
.stage__meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding: clamp(1.1rem, 2.4vw, 1.9rem);
}
.stage__label { display: flex; flex-direction: column; gap: .35rem; }
.stage__label b {
  font-family: var(--font-d); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1; color: var(--text);
}
.stage__label span { font-size: .6rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.stage__steps { display: flex; flex-direction: column; gap: .55rem; align-items: flex-end; }
.stage__step {
  width: 30px; height: 3px; border-radius: 3px; background: rgba(244,239,231,.16);
  position: relative; overflow: hidden;
}
.stage__step i {
  position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: var(--accent);
}
.stage__step.is-active i { transform: scaleX(1); }
.stage__step.is-done i { transform: scaleX(1); background: rgba(201,168,106,.45); }

/* ============================================================
   BUILDABILITY AI - flagship
   ============================================================ */
.bai { padding: clamp(5rem, 12vh, 9rem) 0; background: linear-gradient(180deg, transparent, rgba(20,18,16,.5) 30%, transparent); }
.bai__head { max-width: 46rem; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.bai__title { font-size: clamp(2.4rem, 4.6vw, 4rem); margin: 1.1rem 0 1.1rem; }
.bai__title em { font-style: italic; color: var(--accent); }
.bai__panel {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(1rem, 2vw, 1.6rem);
  align-items: stretch;
}
.glass {
  position: relative; border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 24px 60px rgba(0,0,0,.4);
}

/* upload card */
.upload { padding: clamp(1.6rem, 2.4vw, 2.4rem); display: flex; flex-direction: column; }
.upload__zone {
  flex: 1; min-height: 220px; border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  text-align: center; padding: 2rem 1.4rem;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.upload__zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.upload__ico { width: 46px; height: 46px; color: var(--accent); }
.upload__ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.3; }
.upload__big { font-family: var(--font-d); font-size: 1.45rem; font-weight: 500; color: var(--text); }
.upload__small { font-size: .85rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.chip {
  font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  padding: .5em 1em; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.chip.is-live { border-color: var(--line-2); color: var(--accent); }

/* results card */
.results { padding: clamp(1.6rem, 2.4vw, 2.4rem); display: flex; flex-direction: column; gap: 1.6rem; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center; }
.gauge__ring { position: relative; width: 100%; max-width: 132px; aspect-ratio: 1; }
.gauge__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: rgba(244,239,231,.10); stroke-width: 8; }
.gauge__val { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.gauge__num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; color: var(--text);
}
.gauge__cap { font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.gauge--stat { justify-content: center; gap: .4rem; padding-top: .6rem; }
.gauge--stat b { font-family: var(--font-d); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; color: var(--accent); line-height: 1; }

.issues { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.issues__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .9rem; }
.issues__head h4 { font-family: var(--font-d); font-weight: 500; font-size: 1.3rem; }
.issues__count { font-size: .72rem; color: var(--muted); letter-spacing: .08em; }
.issues__list { display: flex; flex-direction: column; }
.issue {
  display: flex; align-items: center; gap: .9rem; padding: .72rem 0;
  border-bottom: 1px solid var(--line);
}
.issue:last-child { border-bottom: 0; }
.issue__sev { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.issue__sev--hot { background: var(--hot); box-shadow: 0 0 10px rgba(207,111,87,.5); }
.issue__sev--warn { background: var(--warn); }
.issue__sev--ok { background: var(--ok); }
.issue__name { flex: 1; font-size: .92rem; color: var(--text); }
.issue__tag { font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   PLATFORM MODULES - bento
   ============================================================ */
.modules { padding: clamp(5rem, 12vh, 9rem) 0; }
.modules__head { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.modules__title { font-size: clamp(2.4rem, 4.6vw, 4rem); max-width: 18ch; }
.modules__title em { font-style: italic; color: var(--accent); }
.modules__note { color: var(--muted); font-weight: 300; max-width: 56ch; font-size: 1.02rem; line-height: 1.7; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(.8rem, 1.4vw, 1.1rem); grid-auto-rows: minmax(180px, auto); }
.card {
  position: relative; overflow: hidden; border-radius: var(--r-card);
  border: 1px solid var(--line); background: var(--bg-card);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 240px; isolation: isolate;
}
.card__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: brightness(.62) saturate(.96);
  transform: scale(1.02);
  transition: transform 1s var(--ease), filter .6s var(--ease);
}
.card::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(8,7,6,.92) 6%, rgba(8,7,6,.35) 48%, transparent 78%);
}
.card:hover .card__bg { transform: scale(1.08); filter: brightness(.74) saturate(1.02); }
.card__body { position: relative; z-index: 2; padding: clamp(1.3rem, 2vw, 1.9rem); }
.card__kicker { font-size: .6rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.card__title { font-family: var(--font-d); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.05; margin: .5rem 0 .5rem; }
.card__desc { font-size: .9rem; color: var(--muted); line-height: 1.55; max-width: 34ch; }
.card__go {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text);
}
.card__go svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: transform .4s var(--ease); }
.card:hover .card__go svg { transform: translateX(5px); }
.card:hover .card__go { color: var(--accent); }
/* bento rhythm */
.card--xl { grid-column: span 4; min-height: 420px; }
.card--tall { grid-column: span 2; grid-row: span 2; min-height: 420px; }
.card--wide { grid-column: span 4; }
.card--sm { grid-column: span 2; }
.card--md { grid-column: span 3; }

/* card without image (typographic, for variety) */
.card--type { background: linear-gradient(140deg, rgba(201,168,106,.10), transparent 60%), var(--bg-card); justify-content: space-between; }
.card--type::after { display: none; }
.card--type .card__body { padding-top: clamp(1.3rem,2vw,1.9rem); }
.card--type .card__metric { font-family: var(--font-d); font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 500; color: var(--accent); line-height: 1; }
.card--type .card__metric span { font-size: .9rem; color: var(--muted); letter-spacing: .1em; }

/* ============================================================
   ACCESS / LEAD GEN
   ============================================================ */
.access {
  padding: clamp(6rem, 14vh, 11rem) 0;
  background: radial-gradient(ellipse 60% 60% at 50% 120%, rgba(201,168,106,.12), transparent 70%);
  text-align: center; position: relative; z-index: 2;
}
.access__eyebrow { justify-content: center; }
.access__title { font-size: clamp(2.8rem, 6vw, 5.4rem); margin: 1.3rem auto 1.3rem; max-width: 16ch; }
.access__title em { font-style: italic; color: var(--accent); }
.access__sub { color: var(--muted); font-weight: 300; max-width: 52ch; margin: 0 auto 2.6rem; line-height: 1.7; }
.access__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.access__pros { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.access__pro { font-size: .7rem; letter-spacing: .12em; color: var(--faint); padding: .4em 1em; border: 1px solid var(--line); border-radius: 999px; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { position: relative; z-index: 2; border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(3rem,6vw,4.5rem) 0 2.2rem; }
.foot__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.foot__brand img { height: 32px; }
.foot__tag { color: var(--muted); font-size: .82rem; margin-top: .9rem; max-width: 26ch; line-height: 1.6; }
.foot__col h5 { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.foot__col a { display: block; color: var(--muted); font-size: .88rem; padding: .28rem 0; transition: color .3s; }
.foot__col a:hover { color: var(--accent); }
.foot__legal { margin-top: clamp(2.4rem,5vw,3.4rem); padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: .74rem; color: var(--faint); }

/* ============================================================
   REVEAL
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(34px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 2.4rem; padding-top: calc(var(--nav-h) + 2.5rem); min-height: auto; }
  .hero__copy { max-width: none; }
  .stage { aspect-ratio: 16/10; }
  .bai__panel { grid-template-columns: 1fr; }
  .foot__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav__links, .nav__login { display: none; }
  .nav__burger { display: flex; }
  .nav__cta { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--xl, .card--wide, .card--tall, .card--md { grid-column: span 2; grid-row: auto; min-height: 300px; }
  .card--sm { grid-column: span 1; }
}
@media (max-width: 620px) {
  .hero__title { font-size: clamp(2.8rem, 12vw, 3.6rem); }
  .gauges { grid-template-columns: 1fr 1fr; }
  .gauge--stat { grid-column: span 2; flex-direction: row; justify-content: center; gap: .8rem; }
  .bento { grid-template-columns: 1fr; }
  .card, .card--xl, .card--wide, .card--tall, .card--md, .card--sm { grid-column: span 1; min-height: 260px; }
  .foot__top { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn, .access__actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how__head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.how__title { margin: .6rem 0 .9rem; }
.how__steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}
.how__step {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(1.5rem, 2.5vw, 2.2rem);
  position: relative;
}
.how__num {
  display: block; font-family: var(--font-d); font-size: 2.4rem;
  color: var(--accent); line-height: 1; margin-bottom: .7rem;
}
.how__step h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: .5rem; }
.how__step p { color: var(--muted); font-size: .9rem; line-height: 1.65; }
.how__cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: clamp(2rem, 4vw, 3rem); }
.how__note { color: var(--faint); font-size: .8rem; }
@media (max-width: 860px) { .how__steps { grid-template-columns: 1fr; } }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .stage__layer { transition: none; }
}
