/* ── Hero categories — desktop schematic layer ──
   Labels flank the hero content; dashed leader lines converge on the
   search bar (drawn by _initHeroCats, clipped clear of text). */
.hero-cats {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.hero-cats svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0;
  animation: hcIn 800ms var(--ease-out) 650ms both;
}
.hc-label {
  position: absolute; transform: translate(-50%,-50%);
  pointer-events: auto; cursor: pointer; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase;
  padding: 6px 11px; color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.04);
  will-change: transform;
  opacity: 0;
  animation: hcIn 600ms var(--ease-out) both;
  transition: background .18s var(--ease-out), color .18s var(--ease-out);
}
/* accent bar sits on the inner edge, pointing at the search bar */
.hc-label.hc-l { border-right: 2px solid var(--accent); border-radius: 6px 0 0 6px; }
.hc-label.hc-r { border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0; text-align: right; }
.hc-label:hover { background: rgba(249,115,22,.16); color: #fff; }
.hc-label:nth-of-type(1) { animation-delay: 150ms; }
.hc-label:nth-of-type(2) { animation-delay: 210ms; }
.hc-label:nth-of-type(3) { animation-delay: 270ms; }
.hc-label:nth-of-type(4) { animation-delay: 330ms; }
.hc-label:nth-of-type(5) { animation-delay: 390ms; }
.hc-label:nth-of-type(6) { animation-delay: 450ms; }
.hc-label:nth-of-type(7) { animation-delay: 510ms; }
.hc-label:nth-of-type(8) { animation-delay: 570ms; }
@keyframes hcIn { from { opacity: 0; } to { opacity: 1; } }
.hc-line { stroke-width: 1; stroke-dasharray: 4 7; stroke: rgba(255,255,255,.07); }
.hc-node { fill: rgba(249,115,22,.4); }
@media (max-width: 1100px) { .hero-cats { display: none; } }

/* ── Hero categories — mobile manifold ──
   Mirrored label pairs branch off a central spine into the browse CTA.
   Static SVG; geometry lives in the index.html markup (viewBox 343x168). */
.hero-manifold {
  position: relative; height: 168px; max-width: 360px;
  margin: 22px auto 0; z-index: 1;
  display: none;
}
@media (max-width: 1100px) { .hero-manifold { display: block; } }
.hm-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-spine { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.hm-drop  { stroke: rgba(249,115,22,.5); stroke-width: 1; }
.hm-lead  { stroke-width: 1; stroke-dasharray: 4 7; }
line.hm-d1 { stroke: rgba(249,115,22,.31); }
line.hm-d2 { stroke: rgba(249,115,22,.26); }
line.hm-d3 { stroke: rgba(249,115,22,.29); }
circle.hm-d1 { fill: rgba(249,115,22,.65); }
circle.hm-d2 { fill: rgba(249,115,22,.56); }
circle.hm-d3 { fill: rgba(249,115,22,.61); }
.hm-label {
  position: absolute; transform: translate(-50%,-50%);
  border: none; background: var(--navy); padding: 3px 8px;
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
}
button.hm-d1 { font-size: .66rem; color: rgba(255,255,255,.54); }
button.hm-d2 { font-size: .63rem; color: rgba(255,255,255,.47); }
button.hm-d3 { font-size: .65rem; color: rgba(255,255,255,.51); }
.hm-cta {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 600; font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  color: var(--accent); background: var(--navy);
  border: 1px solid rgba(249,115,22,.4); border-radius: 5px;
  padding: 8px 16px; cursor: pointer;
}
/* entrance: rows fade in top-down, CTA last */
.hero-manifold .hm-svg { opacity: 0; animation: hcIn 700ms var(--ease-out) 150ms both; }
.hero-manifold .hm-label { opacity: 0; animation: hcIn 500ms var(--ease-out) both; }
.hero-manifold button.hm-d1 { animation-delay: 250ms; }
.hero-manifold button.hm-d2 { animation-delay: 370ms; }
.hero-manifold button.hm-d3 { animation-delay: 490ms; }
.hero-manifold .hm-cta { opacity: 0; animation: hcIn 500ms var(--ease-out) 640ms both; }

@media (prefers-reduced-motion: reduce) {
  .hero-cats svg, .hc-label,
  .hero-manifold .hm-svg, .hero-manifold .hm-label, .hero-manifold .hm-cta {
    animation: none; opacity: 1;
  }
}

/* ── Hero ── */
.hero {
  background: var(--navy); padding: 96px 20px 80px;
  text-align: center; position: relative; overflow: hidden;
  animation: viewEnter 500ms var(--ease-out) both;
}
/* Dot-grid texture — fades from edges, transparent at centre */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 85% 90% at 50% 50%, transparent 30%, black 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 90% at 50% 50%, transparent 30%, black 80%);
}
/* Warm accent glow — top-right */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 55% 50% at 78% 18%, rgba(249,115,22,.1) 0%, transparent 65%),
              radial-gradient(ellipse 40% 35% at 18% 80%, rgba(14,30,54,.9) 0%, transparent 60%);
}
.hero-geo {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  will-change: transform; /* parallax target */
}
.hero-geo svg { display: block; width: 100%; height: 100%; }
.hero-pip { display: none; }
.hero-pip2 { display: none; }

.hero-eyebrow {
  display: inline-block;
  color: rgba(255,255,255,.55); font-size: .85rem; font-weight: 600;
  letter-spacing: .01em; margin-bottom: 18px;
  font-family: var(--font-display); position: relative; z-index: 1;
  animation: viewEnter 600ms var(--ease-out) 100ms both;
}

.hero h1 {
  font-size: clamp(2.4rem,5.2vw,4rem); font-weight: 700;
  letter-spacing: -.015em; color: #fff; line-height: 1.06;
  margin-bottom: 20px; font-family: var(--font-display);
  position: relative; z-index: 1;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: clamp(.88rem,1.8vw,1rem); color: rgba(255,255,255,.55);
  max-width: 440px; margin: 0 auto 32px; line-height: 1.75;
  position: relative; z-index: 1;
  text-wrap: pretty;
}
/* Decorative hero text has no interactive content; its full-width box
   overhangs the side category labels, so let clicks pass through to them. */
.hero h1, .hero p, .hero-eyebrow { pointer-events: none; }

/* ── Search bar ── */
.search-wrap {
  max-width: 620px; margin: 0 auto; background: #fff;
  border-radius: 9px;
  box-shadow: 0 8px 40px rgba(0,0,0,.45),0 0 0 1px rgba(249,115,22,.15);
  padding: 6px 6px 6px 20px; display: flex; align-items: center;
  gap: 10px; position: relative; z-index: 1;
  transition: box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.search-wrap:focus-within {
  box-shadow: 0 8px 40px rgba(0,0,0,.45), 0 0 0 2px var(--accent);
  transform: translateY(-1px);
}
.search-wrap input {
  flex: 1; border: none; outline: none; font-size: .97rem;
  font-family: var(--font); color: var(--text); min-width: 0;
}
.search-wrap input::placeholder { color: var(--faint); }

/* ── Quick-filter chips ── */
.chips {
  max-width: 620px; margin: 14px auto 0;
  display: flex; gap: 5px; flex-wrap: wrap;
  justify-content: center; position: relative; z-index: 1;
}
.chip {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.6); padding: 4px 12px;
  border-radius: 9999px; font-size: .74rem; font-weight: 500;
  cursor: pointer; font-family: var(--font);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.chip:hover, .chip.active {
  background: rgba(249,115,22,.18);
  border-color: rgba(249,115,22,.4); color: var(--accent);
}
.chip:hover { transform: translateY(-1px); }
.chip.active { transform: none; }

/* ── Stat band ── */
.stat-band {
  background: var(--navy-mid);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative; overflow-x: hidden; width: 100%;
}
.stat-inner { display: flex; justify-content: center; flex-wrap: wrap; }
.stat-item {
  padding: 26px 40px; text-align: center; position: relative;
  border-right: 1px solid rgba(255,255,255,.07);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 2.1rem; font-weight: 700; color: var(--accent);
  letter-spacing: -.03em; line-height: 1; font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.stat-lbl {
  font-size: .7rem; color: rgba(255,255,255,.65); margin-top: 5px;
  text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-display);
}

/* ── Section framework ── */
.section { padding: 80px 20px; }
.section-alt { background: var(--bg-alt); }
.sec-label {
  font-size: .66rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
  font-family: var(--font-display);
  display: inline-flex; align-items: center; gap: 8px;
}
.sec-label::before {
  content: ''; display: block; width: 18px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.sec-title {
  font-size: clamp(1.6rem,3vw,2.3rem); font-weight: 700;
  letter-spacing: -.015em; margin-bottom: 12px; color: var(--navy);
  text-wrap: balance;
}
.sec-sub { font-size: .91rem; color: var(--muted); max-width: 440px; line-height: 1.75; }

/* ── How it works — a three-step sequence: search → inquiry ── */
.how-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 20px; margin-top: 44px;
  position: relative; perspective: 1400px;   /* shared depth for the tilt */
}
/* Schematic connector: a dashed spine the white cards sit on top of, so it
   reads only in the gaps — the same leader-line language as the hero. */
.how-grid::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: 49px; left: 8%; right: 8%; height: 0;
  border-top: 1.5px dashed var(--border-d);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .6s var(--ease-out);
}
.how-grid.j-in::before { transform: scaleX(1); }
.how-card {
  position: relative; z-index: 1;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 26px 24px 24px;
  /* Journey reveal — each step rises in as the connector reaches it (JS adds .j-in) */
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.how-card:nth-child(2) { transition-delay: .18s; }
.how-card:nth-child(3) { transition-delay: .36s; }
.how-grid.j-in .how-card { opacity: 1; transform: none; }
/* As each card arrives, a soft orange glow blooms around its whole perimeter, then settles flat */
.how-grid.j-in .how-card:nth-child(1) { animation: howCardGlow 1.5s var(--ease-out) .24s both; }
.how-grid.j-in .how-card:nth-child(2) { animation: howCardGlow 1.5s var(--ease-out) .50s both; }
.how-grid.j-in .how-card:nth-child(3) { animation: howCardGlow 1.5s var(--ease-out) .76s both; }
@keyframes howCardGlow {
  0%   { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  45%  { box-shadow: 0 0 0 1px rgba(249,115,22,.15), 0 8px 30px rgba(249,115,22,.13); }
  100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}

/* Flow node on the connector — lights orange in sequence as the path advances */
.how-card:nth-child(1)::after,
.how-card:nth-child(2)::after {
  content: ''; position: absolute; z-index: 2;
  top: 49px; right: -10px; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--border-d);
  box-shadow: 0 0 0 4px var(--bg);
  transform: scale(0);
}
/* Nodes are quiet grey markers — the travelling glow does the highlighting */
.how-grid.j-in .how-card:nth-child(1)::after { animation: howNodeIn .4s var(--ease-out) .2s both; }
.how-grid.j-in .how-card:nth-child(2)::after { animation: howNodeIn .4s var(--ease-out) .34s both; }
@keyframes howNodeIn {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

/* Header row: process icon + the step ordinal */
.how-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.how-icon {
  width: 46px; height: 46px; border-radius: var(--rsm);
  background: var(--accent-l); border: 1px solid rgba(249,115,22,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.how-step {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.7rem; line-height: 1; letter-spacing: -.02em;
  color: var(--border-d); font-variant-numeric: tabular-nums;
}
.how-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 7px;
  color: var(--navy); font-family: var(--font-display); letter-spacing: -.02em;
}
.how-desc {
  font-size: .875rem; color: var(--body); line-height: 1.7;
}

/* No animation: show the finished journey state outright */
@media (prefers-reduced-motion: reduce) {
  .how-card { opacity: 1; transform: none; transition: none; animation: none; box-shadow: none; }
  .how-grid::before { transform: scaleX(1); }
  .how-card:nth-child(1)::after,
  .how-card:nth-child(2)::after { transform: scale(1); animation: none; }
}

/* ── Home About section ── */
/* home-featured: inline style had grid-template-columns removed, set here instead */
#home-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; max-width: 1100px; margin: 0 auto; }
.home-about-principles { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 24px; }
.principle-item { padding: 16px; background: var(--bg-alt); border-radius: var(--rsm); border: 1px solid var(--border); }
.principle-icon { font-size: 1.2rem; margin-bottom: 7px; }
.principle-title { font-size: .85rem; font-weight: 700; margin-bottom: 3px; color: var(--navy); }
.principle-desc { font-size: .77rem; color: var(--muted); line-height: 1.55; }
.about-img-block { position: relative; }
.about-img-main { width: 100%; border-radius: var(--r); background: var(--navy); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.about-img-badge { position: absolute; bottom: -16px; right: -16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow-md); }
.aib-val { font-size: 1.4rem; font-weight: 700; color: var(--accent); font-family: var(--font-display); letter-spacing: -.03em; }
.aib-lbl { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ── Pricing card grid (home) ── */
.p-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 16px; margin-top: 40px;
}
.p-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 26px; position: relative;
  min-width: 0; /* prevent grid blowout — card content cannot expand grid tracks */
  transition: box-shadow var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out),
              border-color var(--t-base);
  /* animation handled by .anim-ready + IntersectionObserver */
}
.p-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0;
  background: var(--accent);
  border-radius: var(--r) var(--r) 0 0;
  transition: height var(--t-base) var(--ease-out);
}
.p-card:hover { box-shadow: 0 10px 36px rgba(11,21,37,.13),0 2px 8px rgba(11,21,37,.07); transform: translateY(-4px); border-color: var(--border-d); }
.p-card:hover::before { height: 3px; }
.p-card.pop { border: 1px solid var(--border); }
.p-card.pop::before { height: 3px; }
.p-badge {
  display: block; width: fit-content; margin: 0 auto 14px;
  background: var(--accent); color: #fff; font-size: .67rem; font-weight: 700;
  padding: 3px 12px; border-radius: 9999px; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; font-family: var(--font-display);
}
/* "Coming soon" chip — occupies the same vertical slot as .p-price so
   descriptions and feature lists align across the pricing row */
.p-soon {
  width: fit-content; height: 2.2rem; margin: 0 auto;
  display: flex; align-items: center;
  border: 1px solid var(--border-d); border-radius: 9999px;
  color: var(--muted); font-size: .72rem; font-weight: 600;
  letter-spacing: .01em; padding: 0 14px; white-space: nowrap;
  font-family: var(--font-display);
}
.p-tier {
  font-size: 1.35rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--navy); margin-bottom: 8px;
  text-align: center; font-family: var(--font-display);
}
.p-price {
  font-size: 2.2rem; font-weight: 700; letter-spacing: -.05em;
  line-height: 1; color: var(--navy); font-family: var(--font-display);
}
.p-price span { font-size: .88rem; font-weight: 500; color: var(--muted); }
.p-desc { font-size: .81rem; color: var(--muted); margin: 8px 0 16px; line-height: 1.6; }
.p-feats { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.p-feats li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--body); }
.feat-y { color: var(--green); display: flex; align-items: center; flex-shrink: 0; }
.feat-n { color: var(--faint); display: flex; align-items: center; flex-shrink: 0; }

/* ── Scroll reveal system ── */
.anim-ready {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.anim-ready.anim-in { opacity: 1; transform: none; }

/* Directional variants */
[data-anim="left"].anim-ready  { transform: translateX(-36px); opacity: 0; }
[data-anim="right"].anim-ready { transform: translateX(36px);  opacity: 0; }
[data-anim="scale"].anim-ready { transform: scale(.92);         opacity: 0; }
[data-anim="none"].anim-ready  { transform: none; opacity: 0; }
[data-anim="left"].anim-in,
[data-anim="right"].anim-in,
[data-anim="scale"].anim-in,
[data-anim="none"].anim-in     { transform: none; opacity: 1; }

/* ── CoreShift-style card reveal: rise up + scale-up + blur-to-sharp ──
   Cards float in from below, gently grow into place and sharpen from a
   soft blur on a long decelerating ease. Pair with data-delay for the
   staggered cascade. */
[data-anim="rise"].anim-ready {
  opacity: 0;
  transform: translateY(46px) scale(.965);
  filter: blur(9px);
  transition: opacity   .72s var(--ease-decel),
              transform .82s var(--ease-out),
              filter    .60s var(--ease-decel);
  will-change: transform, opacity, filter;
}
[data-anim="rise"].anim-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Stagger delays via data-delay */
[data-delay="1"] { transition-delay: .06s !important; }
[data-delay="2"] { transition-delay: .15s !important; }
[data-delay="3"] { transition-delay: .24s !important; }
[data-delay="4"] { transition-delay: .33s !important; }
[data-delay="5"] { transition-delay: .42s !important; }
[data-delay="6"] { transition-delay: .51s !important; }

/* Legacy named delays */
.anim-delay-1 { transition-delay: .07s; }
.anim-delay-2 { transition-delay: .14s; }
.anim-delay-3 { transition-delay: .21s; }

/* Mobile: replace side-entry translateX with a gentle translateY so
   overflow-x clipping on sections never prevents the IO from firing */
@media (max-width: 960px) {
  [data-anim="left"].anim-ready,
  [data-anim="right"].anim-ready { transform: translateY(18px); }
}

/* ── Responsive layout ── */
@media (max-width: 960px) {
  .how-grid, .p-grid { grid-template-columns: 1fr; }
  /* Stacked layout: the horizontal connector + flow nodes no longer apply */
  .how-grid { perspective: none; }
  .how-grid::before, .how-card:nth-child(1)::after, .how-card:nth-child(2)::after { display: none; }
  #home-featured { grid-template-columns: 1fr; }
  .stat-item { flex: 1 1 calc(50% - 1px); border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  /* Stack the about grid on mobile */
  .home-about-grid { grid-template-columns: 1fr; gap: 28px; }
  /* Contain any remaining overflow at the section level */
  .section { overflow-x: hidden; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 16px 44px; }
  .hero h1 { font-size: 1.9rem; line-height: 1.08; letter-spacing: -.015em; }
  .search-wrap { padding: 5px 5px 5px 14px; gap: 7px; }
  .search-wrap input { font-size: .88rem; }
  .chips { gap: 6px; }
  .chip { font-size: .82rem; padding: 8px 12px; min-height: 32px; }
  /* Compact 2x2 so all four stats fit near the fold (M-01) */
  .stat-item { flex: 1 1 calc(50% - 1px); border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); padding: 16px 12px; }
  .stat-num { font-size: 1.6rem; }
  .stat-lbl { font-size: .62rem; letter-spacing: .06em; }
  .section { padding: 44px 16px; }
  .sec-title { font-size: 1.35rem; }
  .how-grid { gap: 12px; }
  .how-card { padding: 20px 16px; }
  .p-grid { grid-template-columns: 1fr; gap: 12px; }
  .p-card.pop { order: -1; }
  .home-about-principles { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
}
@media (max-width: 400px) {
  /* Keep the compact 2x2 grid so all four stats stay near the fold (M-01) */
  .stat-item { flex: 1 1 calc(50% - 1px); padding: 14px 8px; }
  .stat-num { font-size: 1.45rem; }
  .home-about-principles { grid-template-columns: 1fr !important; }
}
