/* The Zera · thezera.net */
:root {
  --bg: oklch(1 0 0);
  --ink: oklch(0.19 0.02 353);
  --muted: oklch(0.44 0.015 353);
  --surface: oklch(0.965 0.006 353);
  --rule: oklch(0.9 0.01 353);

  --zera: oklch(0.55 0.215 356);
  --zera-deep: oklch(0.42 0.17 356);
  --on-zera: oklch(0.985 0.012 353);

  --work: oklch(0.5 0.2 262);
  --work-soft: oklch(0.95 0.03 262);
  --coin: oklch(0.9 0.17 122);
  --coin-ink: oklch(0.22 0.05 130);
  --go: oklch(0.23 0.045 255);
  --go-ink: oklch(0.96 0.01 255);
  --go-accent: oklch(0.77 0.16 58);

  --font-display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --space-section: clamp(5rem, 11vw, 9.5rem);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.4rem;
  border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .4s var(--ease-out), background-color .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-light { background: var(--on-zera); color: var(--zera-deep); }
.btn-light:hover { background: oklch(1 0 0); }
.btn-ghost { color: var(--on-zera); box-shadow: inset 0 0 0 2px oklch(0.985 0.012 353 / 0.55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--on-zera); }
.btn-lg { min-height: 3.5rem; padding-inline: 1.8rem; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero {
  background: var(--zera);
  color: var(--on-zera);
  min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.hero::after { /* large soft light behind phones */
  content: ""; position: absolute; z-index: -1;
  width: 70vmax; aspect-ratio: 1; right: -20vmax; top: 10%;
  background: radial-gradient(closest-side, oklch(0.68 0.2 10 / 0.55), transparent);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 1.5rem; }
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 750 1.5rem/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none;
}
.wm-the { font-weight: 400; opacity: .78; margin-right: .06em; }
.mark { width: 2rem; height: 2rem; color: var(--on-zera); }
.nav-links { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-weight: 500; }
.nav-links a { text-decoration: none; padding-block: .4rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease-out); }
.nav-links a:hover { background-size: 100% 2px; }

.hero-grid {
  flex: 1;
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 6vh, 4rem) clamp(3rem, 8vh, 5rem);
}
.hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.75rem);
  font-weight: 760; line-height: .98; letter-spacing: -0.03em;
  font-variation-settings: "opsz" 96;
}
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > span { display: inline-block; }
.lede { margin-top: 1.75rem; max-width: 34rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--on-zera); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

/* ---------- phones ---------- */
.phone {
  width: 250px; aspect-ratio: 250 / 520;
  background: oklch(0.17 0.01 353);
  border-radius: 40px; padding: 9px;
  box-shadow: 0 40px 70px -30px oklch(0.2 0.1 356 / 0.55), inset 0 0 0 1.5px oklch(0.4 0.02 353);
  position: relative;
}
.phone::before { /* dynamic island */
  content: ""; position: absolute; z-index: 2; top: 17px; left: 50%; translate: -50% 0;
  width: 74px; height: 22px; border-radius: 99px; background: oklch(0.12 0 0);
}
.screen {
  height: 100%; border-radius: 31px; overflow: hidden;
  padding: 46px 16px 16px; font-size: 12px; line-height: 1.4;
  display: flex; flex-direction: column; gap: 10px;
}
.hero-phones { position: relative; height: 560px; }
.hero-phones .phone { position: absolute; top: 50%; left: 50%; }
.phone--go   { translate: -118% -46%; rotate: -9deg; }
.phone--coin { translate: 14% -52%; rotate: 8deg; }
.phone--work { translate: -50% -50%; z-index: 1; }

.mini-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.mini-head b { font: 700 15px/1 var(--font-display); }
.mini-head span { font-size: 10.5px; opacity: .7; }

.work-screen-mini { background: var(--bg); color: var(--ink); }
.work-screen-mini .mini-head b { color: var(--work); }
.mini-title { font: 750 26px/1 var(--font-display); letter-spacing: -0.02em; margin-top: 6px; }
.mini-tasks { display: grid; gap: 8px; }
.mini-tasks li { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface); font-weight: 500; }
.mini-tasks li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }
.mini-tasks li.done { color: var(--muted); text-decoration: line-through; }
.mini-tasks li.done::before { background: var(--work); box-shadow: none; }
.mini-tasks li.now { background: var(--work-soft); }
.mini-tasks li.now::before { box-shadow: inset 0 0 0 4px var(--work); }
.mini-focus { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 14px; border-radius: 16px; background: var(--work); color: oklch(0.98 0.01 262); white-space: nowrap; }
.mini-focus b { font: 700 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }

.coin-screen-mini { background: var(--coin); color: var(--coin-ink); }
.mini-balance { font: 750 24px/1 var(--font-display); letter-spacing: -0.02em; margin-top: 10px; }
.mini-bars { display: flex; align-items: end; gap: 6px; height: 120px; margin-block: 8px; }
.mini-bars i { flex: 1; height: var(--h); border-radius: 6px; background: var(--coin-ink); }
.mini-list li { display: flex; justify-content: space-between; padding-block: 8px; border-top: 1px solid oklch(0.22 0.05 130 / 0.18); }
.mini-list .in { color: oklch(0.42 0.13 150); }

.go-screen-mini { background: var(--go); color: var(--go-ink); }
.mini-map { width: 100%; flex: 1; }
.mini-map path { fill: none; stroke: var(--go-accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 9; }
.mini-map circle { fill: var(--go-ink); }
.mini-stat { display: flex; justify-content: space-between; align-items: baseline; }
.mini-stat b { font: 750 22px/1 var(--font-display); color: var(--go-accent); }

/* ---------- intro ---------- */
.intro { padding-block: var(--space-section) clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; }
.intro h2 { font-size: clamp(2.1rem, 4.4vw, 3.75rem); font-weight: 720; line-height: 1.05; letter-spacing: -0.028em; }
.intro p { color: var(--muted); font-size: 1.125rem; max-width: 30rem; }

/* ---------- app bands ---------- */
.app { padding-block: clamp(4rem, 9vw, 7.5rem); overflow: hidden; }
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.app-grid--flip .app-copy { order: 2; }
.app-name { display: flex; align-items: center; gap: .6rem; font: 700 1.35rem/1 var(--font-display); letter-spacing: -0.01em; }
.dot { width: .8rem; height: .8rem; border-radius: 50%; background: currentColor; }
.pill { font: 600 .8rem/1 var(--font-body); padding: .45rem .7rem; border-radius: 99px; letter-spacing: 0; }
.app h3 { margin-top: 1.5rem; font-size: clamp(2.2rem, 4.6vw, 3.9rem); font-weight: 750; line-height: 1.02; letter-spacing: -0.03em; }
.app-desc { margin-top: 1.5rem; max-width: 36rem; font-size: 1.125rem; }
.features { margin-top: 2rem; display: grid; gap: .9rem; max-width: 36rem; }
.features li { position: relative; padding-left: 1.75rem; }
.features li::before { content: "→"; position: absolute; left: 0; font-weight: 600; }
.app-visual { display: grid; place-items: center; }
.phone--lg { width: min(310px, 78vw); }
.phone--lg .screen { font-size: 13px; padding-top: 52px; }

/* workzera */
.app--work { background: var(--bg); }
.app--work .app-name { color: var(--work); }
.app--work .pill { background: var(--work); color: oklch(0.98 0.01 262); }
.app--work .app-desc, .app--work .features { color: var(--muted); }
.app--work .features b { color: var(--ink); font-weight: 600; }
.app--work .features li::before { color: var(--work); }
.app--work .app-visual { background: var(--work-soft); border-radius: 16px; padding-block: clamp(2rem, 5vw, 3.5rem); }
.app--work .phone { box-shadow: 0 40px 70px -30px oklch(0.3 0.15 262 / 0.5), inset 0 0 0 1.5px oklch(0.4 0.02 262); }

.work-screen { background: var(--bg); color: var(--ink); gap: 12px; }
.ws-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.ws-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--zera); color: var(--on-zera); font-weight: 700; font-size: 12px; }
.ws-title { font: 760 30px/1 var(--font-display); letter-spacing: -0.025em; }
.ws-progress { height: 6px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.ws-progress i { display: block; height: 100%; width: var(--p); background: var(--work); border-radius: inherit; }
.ws-meta { color: var(--muted); font-size: 11.5px; margin-top: -4px; }
.ws-tasks { display: grid; gap: 8px; }
.ws-tasks li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: var(--surface); }
.ws-tasks b { display: block; font-weight: 600; }
.ws-tasks small { color: var(--muted); font-size: 11px; }
.cb { flex: none; margin-top: 2px; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); display: grid; place-items: center; }
.done .cb { background: var(--work); box-shadow: none; }
.done .cb::after { content: ""; width: 7px; height: 4px; border: 2px solid white; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.done b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.now { background: var(--work-soft) !important; }
.now .cb { box-shadow: inset 0 0 0 4.5px var(--work); }
.now small { color: var(--work) !important; font-weight: 600; }
.ws-focus { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 18px; background: var(--work); color: oklch(0.98 0.01 262); }
.ws-focus small { display: block; opacity: .85; font-size: 11px; }
.ws-focus b { font: 720 28px/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.ws-stop { padding: 8px 12px; border-radius: 99px; background: oklch(1 0 0 / 0.18); font-weight: 600; }

/* coinzera */
.app--coin { background: var(--coin); color: var(--coin-ink); }
.app--coin .pill { background: var(--coin-ink); color: var(--coin); }
.app--coin .phone { box-shadow: 0 40px 70px -30px oklch(0.3 0.1 130 / 0.6), inset 0 0 0 1.5px oklch(0.4 0.02 130); }
.coin-screen { background: var(--coin-ink); color: oklch(0.96 0.03 122); gap: 12px; }
.cs-top { display: flex; justify-content: space-between; opacity: .8; }
.cs-balance { font: 760 32px/1 var(--font-display); letter-spacing: -0.025em; color: var(--coin); }
.cs-balance small { font-size: 18px; }
.cs-delta { font-size: 11.5px; opacity: .85; margin-top: -4px; }
.cs-delta b { color: var(--coin); }
.cs-chart { display: flex; align-items: end; gap: 7px; height: 130px; padding-bottom: 18px; position: relative; }
.cs-chart i { flex: 1; height: var(--h); border-radius: 7px; background: oklch(0.96 0.03 122 / 0.22); position: relative; transform-origin: bottom; }
.cs-chart i.hi { background: var(--coin); }
.cs-chart span { position: absolute; bottom: -18px; left: 50%; translate: -50% 0; font-size: 10px; opacity: .7; font-style: normal; }
.cs-jars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-jars div { padding: 10px; border-radius: 14px; background: oklch(0.3 0.05 130); display: grid; gap: 4px; }
.cs-jars small { opacity: .8; font-size: 11px; }
.cs-jars b { font: 700 18px/1 var(--font-display); }
.cs-jars i { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--coin) var(--p), oklch(1 0 0 / 0.15) var(--p)); }
.cs-list li { display: flex; align-items: center; gap: 10px; padding-block: 9px; border-top: 1px solid oklch(1 0 0 / 0.12); }
.cs-list div { flex: 1; }
.cs-list div b { display: block; font-weight: 600; }
.cs-list small { opacity: .7; font-size: 11px; }
.ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: oklch(0.3 0.05 130); font-size: 14px; }

/* gozera */
.app--go { background: var(--go); color: var(--go-ink); }
.app--go .app-name { color: var(--go-accent); }
.app--go .pill { background: var(--go-accent); color: var(--go); }
.app--go .features li::before { color: var(--go-accent); }
.app--go .app-desc, .app--go .features { line-height: 1.75; }
.app--go .phone { box-shadow: 0 40px 80px -30px oklch(0.05 0.03 255 / 0.9), inset 0 0 0 1.5px oklch(0.45 0.03 255); }
.go-screen { background: oklch(0.97 0.012 75); color: var(--go); padding: 0; gap: 0; }
.gs-map { position: relative; flex: 1; background: oklch(0.9 0.04 150); }
.gs-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gs-contours path { fill: none; stroke: oklch(0.8 0.05 150); stroke-width: 1.5; }
.gs-route { fill: none; stroke: var(--go); stroke-width: 5; stroke-linecap: round; }
.gs-pin { fill: oklch(1 0 0); stroke: var(--go); stroke-width: 3; }
.gs-pin--now { fill: var(--go-accent); }
.gs-pin--end { fill: var(--go); }
.gs-tag { position: absolute; font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 99px; background: oklch(1 0 0 / 0.85); }
.gs-card { padding: 14px 16px 18px; display: grid; gap: 12px; }
.gs-trip { font: 750 20px/1.1 var(--font-display); letter-spacing: -0.015em; }
.gs-trip span { display: block; font: 500 11px/1.4 var(--font-body); color: oklch(0.45 0.03 255); margin-top: 3px; }
.gs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gs-stats div { padding: 8px; border-radius: 12px; background: oklch(0.92 0.02 75); }
.gs-stats b { display: block; font: 750 17px/1.1 var(--font-display); }
.gs-stats small { color: oklch(0.45 0.03 255); font-size: 10.5px; }
.gs-pack { display: flex; flex-wrap: wrap; gap: 5px; }
.gs-pack li { padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 500; box-shadow: inset 0 0 0 1px oklch(0.75 0.03 255); }
.gs-pack li.ok { background: var(--go); color: var(--go-ink); box-shadow: none; }

/* ---------- more / ticker ---------- */
.more { padding-block: var(--space-section) clamp(2rem, 4vw, 3rem); background: var(--surface); overflow: hidden; }
.more-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.more-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); font-weight: 720; letter-spacing: -0.025em; }
.more-head p { color: var(--muted); }
.ticker { display: flex; mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.ticker-track { display: flex; flex: none; gap: clamp(2rem, 4vw, 3.5rem); padding-right: clamp(2rem, 4vw, 3.5rem); animation: ticker 38s linear infinite; }
.ticker span { font: 400 clamp(3rem, 8vw, 6rem)/1.1 var(--font-display); letter-spacing: -0.03em; color: var(--muted); white-space: nowrap; }
.ticker b { font-weight: 780; color: var(--zera); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- how ---------- */
.how { padding-block: var(--space-section); }
.how h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 720; line-height: 1.05; letter-spacing: -0.028em; max-width: 18ch; }
.rules { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem clamp(2rem, 4vw, 3.5rem); counter-reset: rule; }
.rules li { counter-increment: rule; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.rules li::before { content: counter(rule); display: block; font: 780 clamp(3rem, 5vw, 4rem)/1 var(--font-display); color: var(--zera); margin-bottom: 1rem; }
.rule-head { font: 700 1.35rem/1.25 var(--font-display); letter-spacing: -0.012em; margin-bottom: .6rem; }
.rules p:not(.rule-head) { color: var(--muted); max-width: 34ch; }

/* ---------- footer ---------- */
.footer { background: var(--zera); color: var(--on-zera); padding-block: clamp(4rem, 9vw, 7rem) 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 2rem; }
.footer h2 { font-size: clamp(2.3rem, 5vw, 4.25rem); font-weight: 760; letter-spacing: -0.03em; line-height: 1.02; }
.footer p { margin-top: 1rem; max-width: 32rem; font-size: 1.125rem; }
.footer-base { margin-top: clamp(4rem, 8vw, 6rem); padding-top: 1.5rem; border-top: 1px solid oklch(0.985 0.012 353 / 0.35); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.wordmark--sm { font-size: 1.2rem; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .line > span { animation: rise 1.1s var(--ease-out) both; }
  .line:nth-child(2) > span { animation-delay: .08s; }
  .line:nth-child(3) > span { animation-delay: .16s; }
  .lede, .hero-cta { animation: fade-up 1s var(--ease-out) .35s both; }
  .hero-cta { animation-delay: .45s; }
  .hero-phones .phone { animation: phone-in 1.3s var(--ease-out) both; }
  .phone--work { animation-delay: .25s !important; }
  .phone--coin { animation-delay: .4s !important; }
  .phone--go   { animation-delay: .5s !important; }
  .mini-bars i { animation: grow 1s var(--ease-out) both; transform-origin: bottom; }
  .mini-bars i:nth-child(n) { animation-delay: calc(.8s + var(--i, 0) * 60ms); }
  .mini-map path { animation: dash 14s linear infinite; }

  @supports (animation-timeline: view()) {
    .app-visual .phone { animation: float-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .cs-chart i { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
    .rules li { animation: slide-up linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes slide-up { from { transform: translateY(40px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(80px) scale(.94); filter: blur(6px); } }
@keyframes float-in { from { transform: translateY(70px) rotate(-3deg); opacity: .4; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes dash { to { stroke-dashoffset: -220; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; flex-wrap: wrap; }
  .ticker { mask-image: none; }
  .ticker-track span:nth-child(n+7) { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .app-grid, .intro { grid-template-columns: minmax(0, 1fr); }
  .app-grid--flip .app-copy { order: 0; }
  .hero-phones { height: 440px; margin-top: 1rem; }
  .hero-phones .phone { width: 200px; border-radius: 32px; }
  .hero-phones .screen { border-radius: 24px; padding: 38px 12px 12px; font-size: 10px; gap: 7px; }
  .hero-phones .phone::before { top: 14px; width: 60px; height: 18px; }
  .mini-title { font-size: 21px; }
  .mini-bars { height: 90px; }
}
@media (max-width: 560px) {
  .nav-links li:not(:first-child) { display: none; }
  .hero-phones { height: 360px; }
  .hero-phones .phone { width: 168px; padding: 7px; border-radius: 28px; }
  .hero-phones .screen { border-radius: 21px; }
  .phone--go   { translate: -112% -44%; }
  .phone--coin { translate: 12% -54%; }
  .hero-cta .btn { flex: 1 1 auto; }
  .mini-list li:nth-child(n+3), .mini-tasks li:nth-child(n+4) { display: none; }
}
