/* SmartBuy AI · site styles
   Direction: "The sentence is the layout" · type Libre Franklin / Source Serif 4 · palette greys and mint */

:root {
  --bg: #ffffff;
  --surface: #f3f3f3;
  --surface-2: #e9e9e9;
  --ink: #232323;
  --muted: #5f5f5f;
  --accent: #a1ffcb;
  --accent-ink: #232323;
  --warn: #ffd9c7;
  --mid: #fff0b8;

  --display: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: 1.125rem;
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3rem, 1.2rem + 7.4vw, 8.25rem);

  --margin: clamp(16px, 2.4vw, 32px);
  --gap-section: clamp(120px, 14vw, 200px);
  --radius: 6px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::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-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--ink); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 var(--step-body)/1 var(--display); letter-spacing: -0.01em;
  text-decoration: none; border-radius: var(--radius);
  transition: transform 180ms var(--ease-out), background-color 180ms ease;
}
.btn:hover { background: #8ef5bb; }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; }

/* ---------- top bar ---------- */
.bar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--margin);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px/1 var(--display); letter-spacing: -0.03em; }
.bar-links { display: flex; gap: 28px; margin-left: auto; }
.bar-links a { font: 500 14px/1 var(--display); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px; padding: 8px 0; transition: text-decoration-color 200ms ease; }
.bar-links a:hover { text-decoration-color: var(--ink); }

/* ---------- hero: sentence split by a reel ---------- */
.hero { position: relative; height: 210vh; }
.hero-stage {
  position: sticky; top: 0; height: 100svh; min-height: 640px;
  display: grid; grid-template-columns: 1fr minmax(320px, 34vw) 1fr; grid-template-rows: 1fr;
  padding: 0 var(--margin); column-gap: 24px; overflow: hidden;
}
.hero-title {
  grid-column: 1 / -1; grid-row: 1; align-self: center;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: clamp(2.75rem, 1rem + 4vw, 5rem); line-height: 0.95; letter-spacing: -0.045em;
  position: relative; z-index: 2;
}
.half { display: block; }
.reel { grid-column: 2; grid-row: 1; position: relative; overflow: hidden; z-index: 1; }
.reel-track { display: flex; flex-direction: column; gap: 24px; will-change: transform; padding-top: 20svh; }
.reel-frame { margin: 0; height: 60svh; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.reel-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-lede { position: absolute; left: var(--margin); bottom: 120px; width: min(30vw, 400px); font-size: var(--step-body); line-height: 1.5; z-index: 2; }
.hero-btn { position: absolute; left: var(--margin); bottom: 40px; z-index: 2; }

/* ---------- showcase ---------- */
.showcase { padding: var(--gap-section) var(--margin) 0; min-height: 88svh; }
.showcase-lede { max-width: 560px; font-size: var(--step-lead); line-height: 1.4; margin-bottom: 32px; }
.typeline { position: relative; }
.typeline-input {
  width: 100%; border: 0; padding: 0; background: transparent; color: var(--ink);
  font: 700 clamp(48px, 8vw, 132px)/1.05 var(--display); letter-spacing: -0.045em;
  caret-color: var(--ink); caret-shape: block;
  border-radius: 0;
}
.typeline-input:focus { outline: none; }
.typeline::after { content: ''; display: block; height: 6px; background: var(--surface); transition: background-color 200ms ease; }
.typeline:focus-within::after { background: var(--accent); }
.answer { margin-top: 48px; min-height: 260px; }
.answer-row { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 620px); gap: 32px; align-items: start; }
.answer-row:not(:has(.answer-shot)) { display: block; max-width: 620px; background: var(--surface); border-radius: var(--radius); padding: 22px 24px; }
.answer-shot { margin: 0; height: 260px; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.answer-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.answer-copy { padding-top: 8px; }
.answer-title { font: 700 var(--step-lead)/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 14px; }
.answer-line { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 500 18px/1.4 var(--display); margin-bottom: 14px; }
.answer-line strong { font-weight: 700; }
.tone-warn .answer-line span:nth-child(2) strong { background: var(--warn); padding: 0 4px; }
.tone-mid .answer-line span:nth-child(2) strong { background: var(--mid); padding: 0 4px; }
.tone-good .answer-line span:nth-child(2) strong { background: var(--accent); padding: 0 4px; }
.answer-verdict { font-size: var(--step-body); }
.examples { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; }
.examples button {
  border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--ink);
  font: 400 18px/1.3 var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color 180ms ease, transform 180ms var(--ease-out);
}
.examples button:hover { text-decoration-thickness: 3px; }
.examples button:active { transform: translateY(1px); }

/* ---------- how it works ---------- */
.how { margin-top: var(--gap-section); }
.how-fields { display: grid; grid-template-columns: 1fr 1fr; min-height: 76svh; }
.how-left { background: var(--accent); padding: clamp(32px, 5vw, 72px) var(--margin); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.how-clause { font-size: var(--step-head); max-width: 12ch; }
.how-note { font-size: var(--step-lead); line-height: 1.4; max-width: 30ch; }
.how-right { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 48px var(--margin); }
.stage-ui { width: min(100%, 440px); }
.is-swapping { opacity: 0; transform: translateY(8px); }
.how-clause, .how-note, .stage-ui { transition: opacity 200ms ease, transform 300ms var(--ease-out); }

.mock-page { background: var(--bg); border-radius: var(--radius); padding: 24px; font-family: var(--display); position: relative; min-height: 220px; }
.mock-title { font: 700 var(--step-lead)/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 10px; }
.mock-stars { font: 500 14px/1.4 var(--display); margin-bottom: 10px; }
.mock-note { font: 400 14px/1.4 var(--text); color: var(--muted); }
.mock-launch { position: absolute; right: 16px; bottom: 16px; width: 160px; height: auto; }
.stage-shot { margin: 0; height: 440px; overflow: hidden; border-radius: var(--radius); }
.stage-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mock-launch.is-pressed { animation: press 1.6s var(--ease-out) infinite; }
@keyframes press { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(0.94); } }
.mock-reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mock-reviews li { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; font: 400 18px/1.4 var(--text); }
.mock-reviews span { display: block; font: 700 14px/1 var(--display); letter-spacing: 0.02em; margin-bottom: 6px; }

.how-slider { padding: 28px var(--margin) 0; }
.how-slider { position: relative; }
.how-slider .fill { position: absolute; left: var(--margin); top: 28px; height: 8px; width: calc((100% - 2 * var(--margin)) * var(--p, 0)); background: var(--ink); pointer-events: none; transition: width 300ms var(--ease-out); }
.how-slider input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 0;
  background: var(--surface-2);
  accent-color: var(--ink);
  cursor: pointer;
}
.how-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; background: var(--ink); border: 0; border-radius: 0; transition: transform 180ms var(--ease-out); }
.how-slider input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.1); }
.how-slider input[type=range]::-moz-range-thumb { width: 32px; height: 32px; background: var(--ink); border: 0; border-radius: 0; }
.stage-names { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stage-names li { font: 500 18px/1.2 var(--display); color: var(--muted); cursor: pointer; transition: color 180ms ease; }
.stage-names li:nth-child(2) { text-align: center; transform: translateX(-16%); }
.stage-names li:nth-child(3) { text-align: center; transform: translateX(16%); }
.stage-names li:last-child { text-align: right; }
.stage-names li.is-on, .stage-names li:hover { color: var(--ink); }

/* ---------- what it reads ---------- */
.reads { padding: var(--gap-section) var(--margin) 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.reads-title { grid-column: 1 / -1; font-size: var(--step-head); margin-bottom: 48px; }
.reads-text { grid-column: 1 / 9; font: 500 clamp(22px, 1.2rem + 0.9vw, 34px)/1.3 var(--display); letter-spacing: -0.02em; }
.slot { display: inline-flex; vertical-align: -0.12em; height: 1em; }
.slot > span { display: inline-flex; align-items: center; height: 100%; padding: 0 0.4em; border-radius: 0.18em; font: 700 max(14px, 0.5em)/1 var(--display); letter-spacing: 0; white-space: nowrap; }
.chip-review { background: var(--surface); }
.chip-ring { background: var(--warn); min-width: 1.9em; justify-content: center; }
.chip-store { background: var(--surface); }
.chip-code { background: var(--accent); }
.reads-aside { grid-column: 9 / -1; align-self: end; display: grid; gap: 24px; }
.reads-aside p { font-size: var(--step-body); }
.link-arrow { font: 700 18px/1 var(--display); text-decoration: none; display: inline-flex; gap: 8px; }
.link-arrow::after { content: '→'; transition: transform 250ms var(--ease-out); }
.link-arrow:hover::after { transform: translateX(6px); }

/* ---------- questions ---------- */
.faq { padding: var(--gap-section) var(--margin) 0; }
.faq-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; padding-bottom: 80px; }
.faq-q { grid-column: 1 / 7; font-size: clamp(26px, 2.6vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.faq-head { color: var(--muted); }
.faq-a { grid-column: 8 / -1; max-width: 40ch; font-size: var(--step-body); line-height: 1.55; padding-top: 4px; }
.faq-a a { text-underline-offset: 3px; }

/* ---------- close ---------- */
.close {
  margin-top: calc(var(--gap-section) - 80px);
  background: var(--ink); color: var(--bg);
  min-height: 72svh; padding: clamp(64px, 9vw, 140px) var(--margin) 40px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 64px;
}
.close-title { font-size: clamp(3.25rem, 1rem + 7.4vw, 8.25rem); line-height: 0.9; letter-spacing: -0.045em; }
.close-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.close-foot p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.4; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--bg); padding: 160px var(--margin) 48px; overflow: hidden; }
.foot-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.foot-invite { grid-column: 1 / 8; font-size: var(--step-head); }
.foot-links { grid-column: 10 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.foot-links a { font: 500 18px/1.3 var(--display); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-decoration-color 200ms ease; }
.foot-links a:hover { text-decoration-color: var(--accent); }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 120px; font: 500 14px/1.4 var(--display); color: #bdbdbd; }
.foot-name { font: 700 clamp(6rem, 1rem + 25vw, 26rem)/0.8 var(--display); letter-spacing: -0.06em; white-space: nowrap; color: var(--accent); transform: translateY(26%); margin-top: 8px; }

/* ---------- entrances ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
.js [data-rise].is-in { opacity: 1; transform: none; }
.reel-frame:first-child { animation: frame-in 1.1s var(--ease-out) both; }
.reel-frame:first-child img { animation: settle 1.4s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes frame-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.half { animation: line-up 900ms var(--ease-out) both; }
.half-b { animation-delay: 120ms; }
@keyframes line-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-rise] { opacity: 1; transform: none; }
  .hero { height: auto; }
  .hero-stage { position: relative; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .reads-text { grid-column: 1 / -1; }
  .reads-aside { grid-column: 1 / -1; margin-top: 48px; max-width: 560px; }
}

/* ---------- tablet + phone hero: stacked, not pinned ---------- */
@media (max-width: 1024px) {
  .hero { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 0; display: block; padding: 32px var(--margin) 48px; }
  .hero-title { display: block; font-size: clamp(3rem, 10vw, 6rem); }
  .half-b { text-align: right; margin-top: 4px; }
  .reel { margin: 32px auto; max-width: 520px; }
  .reel-track { padding-top: 0; transform: none !important; }
  .reel-frame { height: 440px; }
  .reel-frame:nth-child(n+2) { display: none; }
  .hero-lede { position: static; width: auto; max-width: 560px; margin-bottom: 24px; }
  .hero-btn { position: static; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .bar-links { display: none; }
  .hero-title { font-size: 13vw; }
  .reel-frame { height: 380px; }
  .hero-btn { width: 100%; }
  .showcase { min-height: 0; }
  .typeline-input { font-size: 11vw; }
  .answer-row { grid-template-columns: 1fr; gap: 20px; }
  .answer-shot { height: 220px; }
  .stage-shot { height: 360px; }
  .examples { gap: 8px; }
  .examples button { background: var(--surface); text-decoration: none; padding: 0 14px; min-height: 44px; border-radius: var(--radius); font-size: 16px; }
  .how-fields { grid-template-columns: 1fr; }
  .how-right { order: -1; min-height: 46svh; padding: 32px var(--margin); }
  .how-left { gap: 20px; }
  .how-clause { font-size: 9vw; max-width: none; }
  .stage-names li:nth-child(2), .stage-names li:nth-child(3) { transform: none; }
  .stage-names { font-size: 15px; }
  .reads { display: block; }
  .reads-text { font-size: 24px; line-height: 1.32; }
  .faq-row { display: block; padding-bottom: 56px; }
  .faq-q { font-size: 24px; margin-bottom: 12px; }
  .faq-a { font-size: 17px; }
  .close { min-height: 80svh; }
  .close-title { font-size: 13vw; }
  .close-foot { flex-direction: column; align-items: stretch; }
  .close-foot .btn { width: 100%; }
  .foot { padding-top: 80px; padding-bottom: 32px; }
  .foot-top { display: block; }
  .foot-invite { font-size: 11vw; margin-bottom: 32px; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
  .foot-legal { margin-top: 64px; }
  .foot-name { font-size: 34vw; }
}
