/* Chairtax site. Dark only, the app's palette: amber on near-black. */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/work-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0b0c0e;
  --surface: #141619;
  --surface-2: #1b1e22;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f5;
  --dim: #a3a7af;
  --faint: #7d828b;
  --amber: #ffb020;
  --amber-light: #ffc85a;
  --on-amber: #0b0c0e;
  --energy: #ffc85a;
  --strength: #7ed68c;
  --heart: #ff7a85;
  --sugar: #7db4ff;
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1120px;
  --heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body: "Work Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--amber-light); text-underline-offset: 3px; }
a:hover { color: var(--amber); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--on-amber);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 600;
}
.skip:focus { left: 16px; top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

.eyebrow {
  font-family: var(--heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 12px;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--dim); max-width: 44ch; }
.accent { color: var(--amber); }
.dim { color: var(--dim); }
.small { font-size: 0.9rem; color: var(--faint); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 14, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand b { color: var(--amber); font-weight: 700; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--surface); }
@media (max-width: 719px) { .site-nav .nav-optional { display: none; } }
/* The narrowest phones keep the brand and Buy; Support stays in the footer. */
@media (max-width: 359px) { .site-nav .nav-support { display: none; } .brand { font-size: 1.15rem; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--on-amber); box-shadow: 0 8px 30px rgba(255, 176, 32, 0.25); }
.btn-primary:hover { background: var(--amber-light); color: var(--on-amber); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Apple's badge, unmodified: 48 px tall (minimum 40), with at least a quarter of its height clear around it. */
.mas-badge { display: inline-block; margin: 0 6px; line-height: 0; border-radius: 9px; }
.mas-badge img { height: 48px; width: auto; }
@media (max-width: 479px) { .actions .btn { flex: 1 1 100%; } }

/* ---------- sections ---------- */

section { padding: clamp(64px, 10vw, 112px) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }

/* hero */
.hero { padding-top: clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(closest-side, rgba(255, 176, 32, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); position: relative; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.12fr 0.88fr; } }
.hero-bearly { color: var(--text); margin: -8px 0 22px; max-width: 46ch; }
.hero-bearly strong { color: var(--amber-light); font-weight: 600; }

/* The sitting scene, after App Store slide 1: Bearly asleep in his chair, then up mid-rep. */
.sit-scene {
  position: relative;
  aspect-ratio: 11 / 8;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}
.sit-chip {
  position: absolute;
  left: 0;
  top: 2%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  z-index: 2;
}
.sit-chip svg { width: 1.1em; height: 1.1em; }
.sit-dozing { position: absolute; left: 4%; bottom: 0; width: 40%; height: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); }
.sit-arc { position: absolute; left: 41%; top: 30%; width: 17%; color: rgba(242, 243, 245, 0.6); }
.sit-up { position: absolute; right: 7%; bottom: 0; width: 36%; }
.sit-spring { position: relative; width: 100%; height: auto; z-index: 1; }
.sit-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 138%;
  aspect-ratio: 1;
  transform: translate(-50%, -52%);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 176, 32, 0.34), rgba(255, 176, 32, 0.12) 55%, transparent 72%),
    repeating-conic-gradient(from 4deg, rgba(255, 176, 32, 0.9) 0 3deg, transparent 3deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 50%, #000 62%, transparent 63%, transparent 70%, #000 71%, #000 86%, transparent 87%);
  mask: radial-gradient(closest-side, #000 50%, #000 62%, transparent 63%, transparent 70%, #000 71%, #000 86%, transparent 87%);
}
@media (max-width: 959px) {
  /* On a phone the scene sits under the headline, so the problem is seen before the pitch. */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > * { order: 3; }
  .hero-copy > .eyebrow { order: 1; }
  .hero-copy > h1 { order: 2; }
  .sit-scene { order: 2; max-width: 460px; margin: 4px auto 26px; }
}

.hero .lede { margin-bottom: 28px; }
.hero-meta { margin-top: 18px; }
.gains-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }

.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.frame video, .frame img { width: 100%; }
.frame-caption { margin-top: 12px; }

/* chips, the app's gain colours */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  line-height: 1.4;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.chip svg { width: 13px; height: 13px; }
.chip-energy { color: var(--energy); }
.chip-strength { color: var(--strength); }
.chip-heart { color: var(--heart); }
.chip-sugar { color: var(--sugar); }

/* cards and grids */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--dim); }

/* how a break goes */
.steps { counter-reset: step; }
.step-num {
  font-family: var(--heading);
  font-weight: 700;
  color: var(--amber);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.step-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: -8px -8px 20px;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}
.step-media img { width: 100%; height: 100%; object-fit: cover; }
.step-media.contain { background: #101216; padding: 14px; }
.step-media.contain img { object-fit: contain; height: auto; }

/* movements: clip beside the text on a phone, above it from 560 px */
.moves { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .moves { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 1000px) { .moves { grid-template-columns: repeat(4, 1fr); } }
.move { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; padding: 12px; }
.move-clip {
  aspect-ratio: 7 / 6;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1b1e22;
}
.move-clip video { width: 100%; height: 100%; object-fit: cover; }
.move > div:last-child { display: flex; flex-direction: column; }
@media (min-width: 560px) {
  .move { display: flex; flex-direction: column; padding: 12px 12px 20px; }
  .move-clip { margin-bottom: 16px; }
  .move > div:last-child { padding: 0 8px; flex: 1; }
}
.move h3 { font-size: 1.1rem; margin-bottom: 4px; }
.move .pitch { color: var(--amber-light); font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.move p { font-size: 0.94rem; margin-bottom: 12px; }
.move .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.move-fallback { border-style: dashed; }
.move-fallback .move-clip { opacity: 0.75; }
.move-fallback .pitch { color: var(--dim); }

/* The menu header shot is shown at its 2x size, so it stays sharp. */
.menu-shot { max-width: 280px; }

/* ranks */
.rank { text-align: center; padding: 28px 24px; }
.rank img { width: 132px; height: 132px; object-fit: contain; margin: 0 auto 14px; }
.rank h3 { font-size: 1.35rem; }
.rank-grizzly { border-color: rgba(255, 176, 32, 0.45); background: linear-gradient(180deg, rgba(255, 176, 32, 0.08), var(--surface) 60%); }

/* gains */
.gain h3 { display: flex; align-items: center; gap: 10px; }
.gain .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.gain-energy .dot { background: var(--energy); }
.gain-strength .dot { background: var(--strength); }
.gain-heart .dot { background: var(--heart); }
.gain-sugar .dot { background: var(--sugar); }
.sources { margin-top: 20px; }
.sources li { margin-bottom: 6px; }

/* privacy block */
.split { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 0.95fr; } .split.flip > :first-child { order: 2; } }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--strength) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230b0c0e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* price */
.price-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 56px);
  border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 176, 32, 0.12), transparent 60%), var(--surface);
  border: 1px solid var(--line-strong);
}
.price-ring {
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 6px solid var(--amber);
  display: grid;
  place-items: center;
  box-shadow: 0 0 40px rgba(255, 176, 32, 0.3), inset 0 0 30px rgba(255, 176, 32, 0.12);
  font-family: var(--heading);
  font-size: 2.9rem;
  font-weight: 700;
}
.price-card .ticks { display: inline-block; text-align: left; margin: 8px 0 28px; }
.price-card .actions { justify-content: center; }
.challenge {
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 14px; }
.stat { text-align: center; padding: 12px 6px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--heading); font-size: 1.7rem; color: var(--amber); line-height: 1.1; }
.stat span { font-size: 0.82rem; color: var(--dim); }

/* bear accents */
.bear { pointer-events: none; user-select: none; }
.bear-side { width: min(300px, 64%); margin: 0 auto; }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 48px 16px 18px;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 1.4rem;
  font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; color: var(--dim); }
.faq details > div p:last-child { margin-bottom: 0; }

/* legal and long-form pages */
.page { padding: clamp(40px, 7vw, 72px) 0 clamp(64px, 10vw, 104px); }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page h2 { font-size: 1.45rem; margin-top: 2em; }
.page h3 { margin-top: 1.4em; }
.page p, .page li { color: #d4d7dc; }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin-bottom: 8px; }
.updated { color: var(--faint); font-size: 0.92rem; margin-bottom: 2em; }
.note {
  border-left: 3px solid var(--amber);
  background: var(--surface);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.4em 0;
}
.note p:last-child { margin-bottom: 0; }
table.facts { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: 0.96rem; }
table.facts th, table.facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { color: var(--dim); font-weight: 600; width: 38%; }
.table-scroll { overflow-x: auto; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: 0.95rem; }
input[type="email"], .key-box {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--text);
  font: inherit;
}
input[type="email"]:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input { flex: 1 1 240px; }
.status { min-height: 1.6em; margin-top: 10px; color: var(--dim); }
.status.ok { color: var(--strength); }
.status.err { color: var(--heart); }

/* thanks */
.key-panel { margin: 24px 0; }
.key-box {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
  padding: 16px;
  min-height: 0;
  margin-bottom: 12px;
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 176, 32, 0.25);
  border-top-color: var(--amber);
  animation: spin 0.9s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-color: var(--amber); } }
[hidden] { display: none !important; }
ol.how { padding-left: 1.4em; }
ol.how li { margin-bottom: 10px; }

/* footnotes */
sup.fn { font-size: 0.6em; line-height: 0; margin-left: 2px; }
sup.fn a { text-decoration: none; padding: 0 2px; }
.sources-note { border-top: 1px solid var(--line); padding: 28px 0 8px; }
.sources-note .small-heading { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.sources-note ol { margin: 0; padding-left: 1.2em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--faint); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 20px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--dim); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* the overlay has its own backdrop; keep our header under it */
body.checkout-open .site-header { z-index: 1; }
