/* Hibio marketing site — layout and components.
   Structure and copy sourced from design-guide/ui_kits/marketing/Site.jsx.
   No runtime JS, no framework: this file plus tokens.css/fonts.css is the
   whole visual system. */

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--surface-field);
  color:var(--text-primary);
  font-family:var(--font-core);
  font-size:16px;
  line-height:24px;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }

a{ color:var(--text-accent); text-decoration:none; transition:color var(--dur-quick) var(--ease-press); }
a:hover{ color:var(--accent-hover); text-decoration:underline; text-underline-offset:3px; }
a:active{ opacity:.8; }

:focus-visible{
  outline:none;
  box-shadow:var(--ring-focus);
  border-radius:var(--radius-sm);
}

button{ font:inherit; color:inherit; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:0 32px;
}

.section{ padding:88px 0; }
.section-tight-top{ padding-top:0; }
.section-tight-bottom{ padding-bottom:0; }

@media (max-width:720px){
  .wrap{ padding:0 20px; }
  .section{ padding:56px 0; }
}

.eyebrow{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.72px;
  text-transform:uppercase;
  color:var(--text-tertiary);
  display:block;
}

h1,h2,h3{ font-family:var(--font-core); color:var(--text-primary); margin:0; }

h1{
  font-size:clamp(32px, 4.6vw + 14px, 54px);
  line-height:1.05;
  font-weight:700;
  letter-spacing:-2.2px;
  text-wrap:balance;
}

h2{
  font-size:clamp(26px, 2.6vw + 16px, 36px);
  line-height:1.14;
  font-weight:700;
  letter-spacing:-1.4px;
  text-wrap:pretty;
}

h3{
  font-size:21px;
  line-height:27px;
  font-weight:600;
  letter-spacing:-.35px;
}

.lead{
  font-size:clamp(16px, .6vw + 14px, 18px);
  line-height:1.5;
  color:var(--text-secondary);
  margin:0;
  max-width:56ch;
  text-wrap:pretty;
}

.body-sm{
  font-size:14px;
  line-height:21px;
  color:var(--text-secondary);
  margin:6px 0 0;
  text-wrap:pretty;
}

/* ── Nav ────────────────────────────────────────────────────────────── */

.site-nav{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--surface-veil);
  -webkit-backdrop-filter:var(--blur-veil);
  backdrop-filter:var(--blur-veil);
  border-bottom:1px solid var(--border-hairline);
}

.site-nav .wrap{
  min-height:68px;
  display:flex;
  align-items:center;
  gap:24px;
  flex-wrap:wrap;
  padding-top:10px;
  padding-bottom:10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text-primary);
  flex:0 0 auto;
}
.brand:hover{ color:var(--text-primary); text-decoration:none; }
.brand img{ height:22px; width:auto; }
.brand span{
  font-family:var(--font-core);
  font-size:20px;
  font-weight:700;
  letter-spacing:-.9px;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
  flex:1 1 auto;
}
.nav-links a{
  font-family:var(--font-core);
  font-size:14px;
  font-weight:500;
  color:var(--text-secondary);
  text-decoration:none;
  white-space:nowrap;
}
.nav-links a:hover{ color:var(--text-primary); text-decoration:none; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  height:54px;
  min-width:54px;
  padding:0 24px;
  border:none;
  border-radius:var(--radius-lg);
  font-family:var(--font-core);
  font-size:var(--type-headline-size);
  font-weight:600;
  letter-spacing:-.1px;
  white-space:nowrap;
  cursor:pointer;
  text-decoration:none;
  transition:transform var(--dur-press) var(--ease-press), box-shadow var(--dur-press) var(--ease-press), background var(--dur-quick) var(--ease-press);
}
.btn:hover{ text-decoration:none; transform:translateY(-1px); }
.btn:active{ transform:scale(.97); }

.btn-accent{ background:var(--accent); color:var(--accent-on); box-shadow:var(--shadow-accent); }
.btn-accent:hover{ background:var(--accent-hover); color:var(--accent-on); }

.btn-sm{
  height:34px;
  min-width:34px;
  padding:0 14px;
  border-radius:var(--radius-sm);
  font-size:var(--type-subhead-size);
  background:var(--text-primary);
  color:var(--surface-card);
  box-shadow:var(--shadow-rest);
}
.btn-sm:hover{ color:var(--surface-card); opacity:.92; }

.icon{ display:inline-flex; flex:0 0 auto; line-height:1; }
.icon svg{ display:block; }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero{ padding-top:64px; padding-bottom:0; }

.hero .wrap{
  display:flex;
  gap:48px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.hero-copy{
  flex:1 1 420px;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:22px;
  padding-top:20px;
}

.hero-chains{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-top:4px;
}

.hero-cta{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding-top:10px;
}
.hero-price-note{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--text-tertiary);
}

.hero-phone{ flex:0 0 auto; margin:0 auto; }

/* Phone screen fragment: no bezel chrome, per the kit README — the site
   shows the interface, not the hardware. */
.phone{
  width:min(320px, 72vw);
  aspect-ratio:640/1391;
  border-radius:46px;
  overflow:hidden;
  box-shadow:var(--shadow-float);
  background:var(--surface-card);
}
.phone img{ width:100%; height:100%; object-fit:cover; }

/* ── Chain ──────────────────────────────────────────────────────────── */

.chain{ display:flex; align-items:center; gap:var(--link-gap-lg); flex-wrap:wrap; row-gap:6px; max-width:100%; }

.link{
  width:var(--link-w-lg);
  height:var(--link-h-lg);
  border-radius:var(--link-radius);
  flex:0 0 auto;
  background:var(--chain-empty);
  box-sizing:border-box;
}
.link-filled{ background:var(--chain-filled); }
.link-today{ background:var(--chain-today); box-shadow:var(--shadow-accent); }
.link-future{ background:transparent; border:1px solid var(--chain-future-stroke); }
.link-rest{ background:var(--chain-rest); opacity:.55; }
.link-sky{ background:var(--tint-sky-ink); }

.chainbar{
  position:relative;
  height:20px;
  width:100%;
  border-radius:var(--radius-full);
  background:var(--surface-sunken);
  box-shadow:var(--shadow-inset);
  overflow:hidden;
}
.chainbar.lg{ height:26px; }
.chainbar-fill{
  position:absolute; inset:0;
  width:80%;
  background:var(--tint-moss-ink);
  border-radius:var(--radius-full);
}
.chainbar-tick{
  position:absolute; top:0; bottom:0; width:2px;
  background:var(--surface-field); opacity:.8;
}

/* ── Idea ───────────────────────────────────────────────────────────── */

.idea-rows{ display:flex; flex-direction:column; gap:22px; }

.card{
  background:var(--surface-card);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-rest);
  padding:26px;
}

.idea-row{
  display:flex;
  gap:32px;
  align-items:center;
  flex-wrap:wrap;
}
.idea-row .idea-label{ flex:0 0 200px; }
.idea-row .idea-demo{ flex:1 1 0%; min-width:260px; }
.idea-demo .chainbar-wrap{ max-width:420px; }

/* ── Does ───────────────────────────────────────────────────────────── */

.does-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
}
.does-card{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.does-card h3{ font-size:18px; line-height:27px; }

/* Where it runs closes the section: it summarises the other four cards rather
   than being a fifth feature. Spanning the row also stops `auto-fit` from
   orphaning it alone on a second line, which is what it did at four columns. */
.does-card-wide{
  grid-column:1 / -1;
  flex-direction:row;
  align-items:flex-start;
  gap:16px;
}
.does-card-wide > div{ display:flex; flex-direction:column; gap:6px; }
.does-card-wide p{ max-width:70ch; }
.chain-icon{ color:var(--text-primary); display:block; }

/* ── Why (dark band) ───────────────────────────────────────────────── */

.why{ background:var(--surface-field); }
.why .wrap{ display:flex; gap:56px; align-items:center; flex-wrap:wrap; }
.why-copy{ flex:1 1 0%; min-width:300px; display:flex; flex-direction:column; gap:22px; }
.why-copy h2{ color:var(--text-primary); }
.why-copy .lead{ color:var(--text-secondary); }

.badge-row{ display:flex; gap:10px; flex-wrap:wrap; padding-top:4px; }
.badge{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 8px;
  background:var(--surface-sunken);
  color:var(--text-secondary);
  border-radius:var(--radius-full);
  font-family:var(--font-core);
  font-size:var(--type-caption-size);
  font-weight:600;
  letter-spacing:.1px;
  white-space:nowrap;
}
.badge-accent{ background:var(--accent-wash); color:var(--text-accent); }

.pattern-wrap{ flex:0 0 420px; max-width:100%; }
.pattern-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:var(--card-pad-lg);
  background:var(--surface-card);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-rest);
}
.pattern-eyebrow{ display:flex; align-items:center; gap:7px; }
.pattern-eyebrow .eyebrow{ font-size:var(--type-eyebrow-size); letter-spacing:var(--type-eyebrow-track); }
.pattern-head{ display:flex; flex-direction:column; gap:5px; }
.pattern-head .headline{
  font-family:var(--font-core);
  font-size:var(--type-title-3-size);
  line-height:23px;
  font-weight:600;
  letter-spacing:-.2px;
  color:var(--text-primary);
}
.pattern-head .detail{
  font-family:var(--font-core);
  font-size:var(--type-footnote-size);
  line-height:18px;
  color:var(--text-secondary);
}
.pattern-bars{
  display:flex; height:10px; border-radius:var(--radius-full); overflow:hidden;
  background:var(--surface-sunken); box-shadow:var(--shadow-inset);
}
.pattern-legend{ display:flex; flex-direction:column; gap:5px; }
.pattern-legend-row{ display:flex; align-items:center; gap:8px; }
.pattern-dot{ width:8px; height:8px; border-radius:999px; flex:0 0 auto; }
.pattern-legend-row .legend-label{ flex:1 1 0%; font-family:var(--font-core); font-size:var(--type-footnote-size); color:var(--text-primary); }
.pattern-legend-row .legend-count{ font-family:var(--font-mono); font-size:11px; color:var(--text-tertiary); font-variant-numeric:tabular-nums; }

.pattern-action{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:40px; width:100%; border:none; border-radius:var(--radius-control);
  cursor:pointer; background:var(--surface-sunken); color:var(--text-primary);
  font-family:var(--font-core); font-size:var(--type-subhead-size); font-weight:600;
}
.pattern-action:hover{ opacity:.9; }

/* ── Gaps ("Every gap keeps its date") ─────────────────────────────── */

.gaps .wrap{ display:flex; gap:56px; align-items:center; flex-wrap:wrap; }
.gaps-phone{ flex:0 0 auto; margin:0 auto; }
.gaps-copy{ flex:1 1 0%; min-width:300px; display:flex; flex-direction:column; gap:20px; }

.stat-row{ display:flex; gap:12px; flex-wrap:wrap; }
.stat-tile{
  display:flex; flex-direction:column; gap:8px;
  padding:14px var(--card-pad);
  background:var(--surface-card);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-rest);
  min-width:150px; flex:1 1 0%;
}
.stat-tile-head{ display:flex; align-items:center; gap:6px; color:var(--text-tertiary); }
.stat-tile-head .eyebrow{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stat-tile-value{ display:flex; align-items:baseline; gap:5px; flex-wrap:wrap; }
.stat-tile-value .num{
  font-family:var(--font-core); font-size:27px; line-height:28px; font-weight:700;
  letter-spacing:-1.1px; font-variant-numeric:tabular-nums; color:var(--text-primary);
}
.stat-tile-value .unit{ font-family:var(--font-core); font-size:13px; font-weight:600; color:var(--text-tertiary); }
.stat-tile-value .delta{ font-family:var(--font-mono); font-size:11px; margin-left:auto; font-variant-numeric:tabular-nums; color:var(--text-positive); }

/* ── Price and privacy ─────────────────────────────────────────────── */

.price-head{ display:flex; flex-direction:column; gap:14px; }

.price-card{
  background:var(--surface-card);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-rest);
  padding:34px;
  display:flex;
  gap:44px;
  align-items:center;
  flex-wrap:wrap;
}
.price-tag{ flex:0 0 auto; display:flex; flex-direction:column; gap:8px; }
.price-amount{
  font-family:var(--font-core);
  font-size:clamp(40px, 7vw, 68px);
  line-height:1;
  font-weight:700;
  letter-spacing:-3px;
  color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}
.price-terms{
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:var(--text-tertiary);
}

.price-facts{
  flex:1 1 0%;
  min-width:280px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:18px;
}
.price-fact{ display:flex; gap:10px; align-items:flex-start; }
.price-fact .icon{ margin-top:4px; color:var(--text-positive); }
.price-fact .fact-title{ font-family:var(--font-core); font-size:15px; font-weight:600; color:var(--text-primary); }
.price-fact .fact-body{ font-family:var(--font-core); font-size:13.5px; line-height:20px; color:var(--text-secondary); margin:2px 0 0; text-wrap:pretty; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer{ border-top:1px solid var(--border-hairline); padding:44px 0 56px; }
.site-footer .wrap{ display:flex; gap:24px; align-items:center; flex-wrap:wrap; }
.footer-brand{ display:flex; align-items:center; gap:10px; color:var(--text-primary); }
.footer-brand img{ height:18px; width:auto; }
.footer-brand span{ font-family:var(--font-core); font-size:16px; font-weight:700; letter-spacing:-.6px; }
.footer-spacer{ flex:1 1 0%; }
.footer-links{ display:flex; gap:22px; flex-wrap:wrap; }
.footer-links a{ font-family:var(--font-core); font-size:13.5px; color:var(--text-secondary); text-decoration:none; }
.footer-links a:hover{ color:var(--text-primary); text-decoration:none; }
.footer-meta{ font-family:var(--font-mono); font-size:11.5px; color:var(--text-tertiary); }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width:900px){
  .hero .wrap{ flex-direction:column; align-items:center; text-align:left; }
  .hero-copy{ padding-top:0; width:100%; }
  .why .wrap{ flex-direction:column; }
  .pattern-wrap{ flex-basis:auto; width:100%; max-width:420px; }
  .gaps .wrap{ flex-direction:column; }
  .gaps-copy{ width:100%; }
}

@media (max-width:720px){
  .does-grid{ grid-template-columns:1fr; }
  .does-card-wide{ flex-direction:column; }
  .idea-row{ flex-direction:column; align-items:stretch; gap:16px; }
  .idea-row .idea-label{ flex-basis:auto; }
  .idea-row .idea-demo{ min-width:0; }
  .price-card{ padding:24px; gap:28px; }
  .price-facts{ grid-template-columns:1fr; min-width:0; }
  .nav-links{ gap:16px; }
}

@media (max-width:480px){
  .hero-cta{ flex-direction:column; align-items:flex-start; gap:10px; }
  .stat-row{ flex-direction:column; }
  /* price-tag and price-facts both have flex-basis:0-ish children, which
     flex-wrap happily packs onto one shared (too-narrow) line instead of
     wrapping; force a real stack so price-facts gets its full width back. */
  .price-card{ flex-direction:column; align-items:stretch; }
  .price-facts{ width:100%; }
}

/* Chain links are fixed-size by design (a capsule is a day, not a fluid bar),
   so on narrow screens the token itself shrinks rather than relying on wrap —
   a 14-link row at the desktop 20px/7px token is 371px wide, which overflows
   any viewport under ~410px. flex-wrap on .chain is a last-resort safety net;
   shrinking the token is what actually keeps rows on one line. */
@media (max-width:600px){
  :root{ --link-w-lg:14px; --link-h-lg:28px; --link-gap-lg:5px; }
  /* Compact nav: wordmark + Download on one row; the section links are one
     scroll away and Privacy/Support repeat in the footer (no JS menu). */
  .site-nav .wrap{ flex-wrap:nowrap; justify-content:space-between; }
  .nav-links{ display:none; }
}
@media (max-width:400px){
  :root{ --link-w-lg:10px; --link-h-lg:20px; --link-gap-lg:4px; }
}

/* ── Prose pages (privacy / support / 404) ─────────────────────────── */

.prose{ max-width:720px; padding:56px 0 96px; display:flex; flex-direction:column; gap:28px; }
.prose h1{ margin-bottom:4px; }
.prose .dateline{ font-family:var(--font-mono); font-size:12px; color:var(--text-tertiary); }
.prose .lead-block{
  background:var(--surface-card);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-rest);
  padding:26px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.prose .lead-block p{ margin:0; font-size:16px; line-height:1.6; color:var(--text-primary); }
.prose section{ display:flex; flex-direction:column; gap:10px; }
.prose h2{ font-size:22px; letter-spacing:-.6px; }
.prose p{ margin:0; font-size:15.5px; line-height:1.65; color:var(--text-secondary); }
.prose ul{ margin:0; padding-left:20px; display:flex; flex-direction:column; gap:6px; }
.prose li{ font-size:15.5px; line-height:1.6; color:var(--text-secondary); }
.prose .qa{ display:flex; flex-direction:column; gap:6px; }
.prose .qa dt{ font-weight:600; color:var(--text-primary); font-size:16px; }
.prose .qa dd{ margin:0; color:var(--text-secondary); font-size:15.5px; line-height:1.6; }
.prose .back-link{ padding-top:12px; }
.prose .not-found{ min-height:60vh; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:16px; }
