/* Home page only. Values come from the scales in style.css. */

.eyebrow { color: var(--accent); font-size: 14px; line-height: 20px; font-weight: 600; }
.band { padding-top: var(--s-900); }
.band-head { max-width: var(--text); }
.band-head > * + * { margin-top: var(--s-100); }
.band-head h2 { font-size: 36px; line-height: 40px; }
.band-head p:not(.eyebrow) { color: var(--muted); font-size: 18px; line-height: 28px; }

/* Hero */
.hero { padding-top: var(--s-800); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-300); text-align: center; }
.hero h1 { max-width: var(--text); font-size: 48px; line-height: 1; }
.hero .sub { max-width: var(--text); color: var(--muted); font-size: 18px; line-height: 28px; }
.hero .sub code { color: var(--fg); }
.hero .cmd { width: 100%; max-width: var(--text); text-align: left; }
.proof-line { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75) var(--s-300); padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 20px; }
.proof-line li { display: inline-flex; align-items: center; gap: var(--s-75); }
.proof-line .icon { width: 16px; height: 16px; color: var(--accent); }
@media (max-width: 767px) {
  .hero { padding-top: var(--s-600); }
  .hero h1 { font-size: 36px; line-height: 40px; }
  .hero .br { display: none; }
  .hero .sub { font-size: 16px; line-height: 24px; }
}

/* Hero terminal */
.term {
  max-width: 880px;
  margin: var(--s-700) auto 0;
  padding: var(--s-75);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--surface);
}
.term-bar { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-50) var(--s-75) var(--s-100); }
.term-bar span { width: 12px; height: 12px; border-radius: var(--r-full); background: var(--line); }
.term-bar p { margin-left: var(--s-75); color: var(--muted); font: 12px/16px var(--mono); }
.term-body {
  display: grid;
  gap: var(--s-75);
  padding: var(--s-300);
  border: 1px solid var(--term-line);
  border-radius: var(--r-lg); /* 16px outer, 8px gap */
  background: var(--term-bg);
  color: var(--term-fg);
  font: 14px/20px var(--mono);
  overflow-x: auto;
}
.term-body b { color: #ffffff; font-weight: 600; }
.term .rows { display: grid; gap: var(--s-50); padding: 0; list-style: none; }
.term .rows li { display: flex; gap: var(--s-200); align-items: baseline; padding: var(--s-25) var(--s-75); border-radius: var(--r); white-space: pre; }
.term .rows li.sel { background: #272727; }
.term .rows li.sel .t { color: #ffffff; font-weight: 600; }
.term .d, .term .keys, .term .dim { color: var(--term-dim); }
.term .ok { color: var(--ok); }
.term .sug { color: var(--sug); }
.term .keys { font-size: 12px; line-height: 16px; }
.term .after { padding-top: var(--s-100); border-top: 1px solid var(--term-line); }
.caret, .block { display: inline-block; width: 8px; height: 16px; margin-left: var(--s-25); vertical-align: -3px; background: var(--term-fg); }
.js .caret, .js .block { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* While hero.js types the search, the results wait. */
.term .wait { opacity: 0; transform: translateY(8px); }
.term .rows li, .term .keys, .term .after { transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
@media (max-width: 639px) {
  .term-body { padding: var(--s-200); font-size: 12px; line-height: 16px; }
  .term .rows li { gap: var(--s-100); }
}

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-200); margin-top: var(--s-600); }
.benefit {
  display: grid;
  align-content: start;
  gap: var(--s-100);
  padding: var(--s-300);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--surface);
  transition: transform var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.benefit:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.benefit .icon { width: 24px; height: 24px; color: var(--accent); }
.benefit h3 { font-size: 18px; line-height: 28px; }
.benefit p { color: var(--muted); font-size: 14px; line-height: 20px; }
.benefit code { color: var(--fg); }
.sug-t { color: var(--sug); font-weight: 600; }
@media (max-width: 899px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .benefits { grid-template-columns: minmax(0, 1fr); } }

/* Tagline reveal */
.tagline { padding-top: var(--s-900); }
.tagline-text { max-width: 880px; font-size: 60px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.tagline-text .line { display: block; }
.tagline-text .line + .line { margin-top: var(--s-75); }
.tagline-text.split .word { color: color-mix(in srgb, var(--fg) 30%, transparent); transition: color var(--slow) var(--ease); }
.tagline-text.split .word.lit { color: var(--fg); }
@media (max-width: 767px) { .tagline-text { font-size: 36px; line-height: 40px; } .tagline-text .line + .line { margin-top: 0; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-200); margin-top: var(--s-600); padding: 0; list-style: none; }
.step { display: grid; align-content: start; gap: var(--s-100); padding: var(--s-300); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.step .num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--fg); color: var(--bg); font: 600 14px/20px var(--mono); }
.step h3 { margin-top: var(--s-75); font-size: 18px; line-height: 28px; }
.step p { color: var(--muted); font-size: 14px; line-height: 20px; }
@media (max-width: 799px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Proof */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-200); margin: var(--s-600) 0 0; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-75); padding: var(--s-300); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); }
.stat dd { margin: 0; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.stat dt { color: var(--muted); font-size: 14px; line-height: 20px; }
.stat-note { margin-top: var(--s-200); color: var(--muted); font-size: 14px; line-height: 20px; }
@media (max-width: 899px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .stats { grid-template-columns: minmax(0, 1fr); } }

.compare-block { margin-top: var(--s-800); }
.compare-block > * + * { margin-top: var(--s-100); }
.compare-block h3, .game-head h3 { font-size: 24px; line-height: 32px; }
.compare-block > p { max-width: var(--text); color: var(--muted); }
.compare-block .table { margin-top: var(--s-300); }
.compare th[scope="row"] { font-weight: 500; }
.compare code { white-space: nowrap; overflow-wrap: normal; }
.compare .us { background: color-mix(in srgb, var(--accent) 8%, transparent); font-weight: 600; }
.compare .yes { color: var(--ok); font-weight: 600; }
.compare .no { color: var(--muted); }
.compare .note-s { display: block; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 400; }

/* The game */
.game { margin-top: var(--s-800); }
.game-head { max-width: var(--text); }
.game-head > * + * { margin-top: var(--s-75); }
.game-head p { color: var(--muted); }
.board {
  margin-top: var(--s-300);
  padding: var(--s-300);
  border: 1px solid var(--term-line);
  border-radius: var(--r-2xl);
  background: var(--term-bg);
  color: var(--term-fg);
}
.board.shake { animation: shake 350ms var(--ease); }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.view { display: grid; gap: var(--s-300); min-width: 0; }
html:not(.js) .view { display: none; }
.js .nojs { display: none; }
.nojs { display: grid; gap: var(--s-200); }
.start { justify-items: start; }
.start-text { font-size: 18px; line-height: 28px; }
.today { display: block; margin-top: var(--s-50); color: var(--term-dim); font-size: 14px; line-height: 20px; }
.board .btn.go { background: var(--term-fg); color: var(--term-bg); }
.board .btn.ghost { color: var(--term-fg); border-color: var(--term-line); }
.board .btn.ghost:hover { background: #272727; }
.round-top { display: flex; justify-content: space-between; color: var(--term-dim); font: 14px/20px var(--mono); }
.clue { font-size: 20px; line-height: 28px; font-weight: 500; text-wrap: pretty; }
.demo { display: grid; gap: var(--s-75); min-width: 0; font: 14px/20px var(--mono); }
.demo label, .demo > p:not(.hint) { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border: 1px solid var(--term-line); border-radius: var(--r-lg); }
.demo label:focus-within { border-color: var(--term-dim); }
.demo input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; }
.board .rows { display: grid; gap: var(--s-25); margin: 0; padding: 0; list-style: none; }
.board .rows li { display: flex; flex-wrap: wrap; gap: 0 var(--s-75); padding: var(--s-50) var(--s-100); border-radius: var(--r-md); cursor: pointer; transition: background-color 300ms var(--ease); }
.board .rows li:hover { background: #1f1f1f; }
.board .rows li.sel { background: #272727; }
.board .rows li.sel .t { color: #ffffff; font-weight: 600; }
.board .rows li.none { color: var(--term-dim); cursor: default; }
.board .d, .hint { color: var(--term-dim); }
.board .ok { color: var(--ok); }
.board .bad { color: var(--bad); }
.hint { font-size: 12px; line-height: 16px; }
.round-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-100); }
.round-actions { display: flex; gap: var(--s-75); }
.msg { min-height: 24px; }
.msg.good { color: var(--ok); }
.msg.bad { color: var(--bad); }
.squares { font-size: 30px; line-height: 36px; letter-spacing: 0.1em; }
.summary { font-size: 18px; line-height: 28px; font-weight: 600; }
.answers { display: grid; gap: var(--s-100); padding-left: var(--s-300); color: var(--term-dim); }
.answers code { color: var(--term-fg); }
.gave { color: var(--bad); font-size: 12px; line-height: 16px; }
.share-text { padding: var(--s-100); border: 1px solid var(--term-line); border-radius: var(--r-lg); white-space: pre-wrap; font-size: 14px; line-height: 20px; }
.caption { margin-top: var(--s-100); color: var(--muted); font-size: 14px; line-height: 20px; }
@media (max-width: 639px) { .board { padding: var(--s-200); } }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-300) var(--s-700); }
.faq-wrap .band-head { grid-row: span 2; }
.faq { display: grid; gap: var(--s-75); }
.faq details { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); transition: background-color var(--slow) var(--ease); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-200) var(--s-300);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-xl);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform var(--slow) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s-300) var(--s-200); color: var(--muted); }
.faq-more { font-size: 14px; line-height: 20px; }
@media (max-width: 799px) { .faq-wrap { grid-template-columns: minmax(0, 1fr); } .faq-wrap .band-head { grid-row: auto; } }

/* Final call to action */
.final-in { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-300); padding: var(--s-800) var(--s-300); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--surface); text-align: center; }
.final-in h2 { max-width: var(--text); font-size: 48px; line-height: 1; }
.final-in > p { color: var(--muted); font-size: 18px; line-height: 28px; }
.final-in .cmd { width: 100%; max-width: var(--text); text-align: left; }
.promises { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75) var(--s-300); padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 20px; }
.promises li { display: inline-flex; align-items: center; gap: var(--s-75); }
.promises .icon { width: 16px; height: 16px; color: var(--ok); }
@media (max-width: 639px) { .final-in { padding: var(--s-600) var(--s-200); } .final-in h2 { font-size: 36px; line-height: 40px; } }

@media (prefers-reduced-motion: reduce) {
  .js .caret, .js .block, .board.shake { animation: none; }
}

/* Phones: the table scrolls sideways, with the row labels kept in view. */
@media (max-width: 639px) {
  .compare table { min-width: 640px; }
  .compare th[scope="row"], .compare thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); min-width: 160px; }
  .compare thead th:first-child { background: var(--surface); }
}
