/* Kibitz — palette sampled from the app icon and the in-app board (green theme). */
:root {
  --ground:       #F5EFE2;
  --surface:      #FFFCF5;
  --surface-high: #EDE4D0;
  --hairline:     #DCCFB4;
  --accent:       #2C6B4A;
  --accent-fill:  #2C6B4A;
  --accent-hover: #235A3D;
  --on-accent:    #FFFCF5;
  --board-light:  #EDE3CC;
  --board-dark:   #8CAB87;
  --ink:          #1C2620;
  --ink-soft:     #4E5A52;
  --ink-faint:    #7D867F;
  --warn:         #B5651D;
  --phone:        #1E2420;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1080px;
  --gap: clamp(64px, 9vw, 120px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:       #101512;
    --surface:      #18201B;
    --surface-high: #212B25;
    --hairline:     #2F3C34;
    --accent:       #7FC39A;
    --accent-fill:  #2E8A57;
    --accent-hover: #359A62;
    --on-accent:    #F7F3EA;
    --board-light:  #3A4A3F;
    --board-dark:   #2A372F;
    --ink:          #EEF0EA;
    --ink-soft:     #A7B2AA;
    --ink-faint:    #76827A;
    --warn:         #E3944A;
    --phone:        #2A322D;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* height:auto is essential: the <img> tags carry width/height attributes for
   layout stability, and without this the images distort when max-width shrinks them. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */

h1, h2, h3 { margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; font-weight: 650; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p  { margin: 0; }

.lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; color: var(--ink-soft); max-width: 54ch; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin: 0;
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: 14px; }
.mt { margin-top: 20px; }

/* ---------- nav ---------- */

header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -0.02em; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 620px) { .nav-links a.hide-sm { display: none; } }

/* ---------- hero ---------- */

/* padding-block, not the shorthand: these elements also carry .wrap, and a
   four-sided shorthand here would wipe out .wrap's horizontal padding. */
.hero { padding-block: clamp(56px, 9vw, 104px) var(--gap); }
.hero-grid {
  display: grid; gap: clamp(36px, 6vw, 72px);
  grid-template-columns: 1.05fr 0.95fr; align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero h1 .accent { color: var(--accent); }

/* A scoresheet line, the thing Kibitz writes for you. */
.scoresheet {
  display: inline-flex; gap: 14px; align-items: baseline;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  padding: 8px 14px;
}
.scoresheet b { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost { border-color: var(--hairline); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- phone frame ---------- */

.phone {
  position: relative; width: min(330px, 80vw); margin-inline: auto;
  border-radius: 48px; padding: 9px;
  background: linear-gradient(160deg, #3b4640, var(--phone) 55%, #35403a);
  box-shadow: 0 40px 90px -34px rgba(44, 107, 74, 0.45),
              0 24px 60px -24px rgba(0, 0, 0, 0.55);
}
.phone::after {
  content: ""; position: absolute; inset: 9px; border-radius: 40px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); pointer-events: none;
}
.phone img { border-radius: 40px; }
.phone-tall { width: min(290px, 72vw); }

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

section { padding: var(--gap) 0; border-top: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 62ch; }

/* steps */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  color: var(--ink); background: var(--board-light); box-shadow: inset 0 0 0 1px var(--hairline);
  margin-bottom: 4px;
}
.step:nth-child(2)::before { background: var(--board-dark); color: #fff; }
.step p { font-size: 15px; color: var(--ink-soft); }

/* two-column prose */
.split { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 26px;
  display: flex; flex-direction: column; gap: 11px;
}
.card.bad { border-color: color-mix(in srgb, var(--warn) 40%, var(--hairline)); }
.card .tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-faint);
}
.card.bad .tag { color: var(--warn); }

/* feature grid */
.features { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 9px;
}
.feature .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  margin-bottom: 3px;
}
.feature p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* shots */
.shots { display: grid; gap: clamp(28px, 4vw, 48px); grid-template-columns: repeat(3, 1fr); align-items: start; }
@media (max-width: 900px) { .shots { grid-template-columns: 1fr; } }
.shot { display: flex; flex-direction: column; gap: 18px; }
.shot-cap { display: flex; flex-direction: column; gap: 6px; text-align: center; max-width: 36ch; margin-inline: auto; }
.shot-cap p { font-size: 14.5px; color: var(--ink-soft); }

/* pricing */
.prices { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .prices { grid-template-columns: 1fr; } }
.price {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 12px;
}
.price.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price .amount { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price .per { font-size: 14px; color: var(--ink-faint); }
.price ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; color: var(--ink-soft); }
.price li::marker { color: var(--accent); }
.badge {
  align-self: flex-start; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--on-accent); background: var(--accent-fill);
  padding: 3px 8px; border-radius: 999px;
}

/* faq */
details {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}
details summary {
  cursor: pointer; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em;
  list-style: none; display: flex; align-items: center; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; margin-left: auto; color: var(--accent);
  font-family: var(--mono); font-size: 19px; line-height: 1;
}
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; max-width: 66ch; }

/* closing */
.closing { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }

/* footer */
footer.site {
  border-top: 1px solid var(--hairline);
  padding: 44px 0 60px; color: var(--ink-faint); font-size: 14px;
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--ink-soft); }

/* ---------- article pages ---------- */

.doc { padding-block: clamp(44px, 7vw, 80px) var(--gap); max-width: 74ch; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 14px; }
.doc h2 { font-size: 22px; margin-top: 42px; margin-bottom: 12px; }
.doc p, .doc li { color: var(--ink-soft); font-size: 16.5px; }
.doc p { margin-bottom: 16px; }
.doc .lede { margin-bottom: 28px; }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 9px; margin: 0 0 18px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 650; }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }
.doc .callout {
  background: var(--surface); border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; padding: 20px 22px; margin: 26px 0;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc .signoff { margin-top: 36px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
