/* The home page: the app's welcome step as the hero, then what Hemmingway does, the benchmarks, the plans and the downloads.
   site.css gives the tokens, the buttons and the plans; this file lays the page out and moves it. */
:root {
  --sans:"Geist","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --code:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --faint:#aca397; --line-soft:#f1ede6; --acc-ink:#3b6478;
  --t-in:180ms; --t-out:120ms; --ease-out:cubic-bezier(.2,.7,.2,1); --ease-in:cubic-bezier(.4,0,1,1);
  --rise:cubic-bezier(.2,.8,.2,1);
  --sy:0;
}
@media (prefers-color-scheme: dark) {
  :root { --faint:#5f5850; --line-soft:#211e1a; --acc-ink:#9dbfd2; }
}
html { scroll-behavior: smooth; }
body.home-page { overflow-x: hidden; font-family: var(--sans); font-size: 16px; }
.home-page h1, .home-page h2, .home-page h3, .home-page .wordmark, .home-page .plan .amount, .home-page .rate .amount, .home-page .words { font-family: var(--sans); }
.home-page h2, .home-page h3 { font-weight: 500; }
.home-page .home { display: block; min-height: 0; padding: 0; text-align: left; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-h { margin: 0 0 16px; font-size: clamp(32px, 4.6vw, 44px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.lead { max-width: 620px; margin: 0 0 40px; font-size: 18px; color: var(--body); text-wrap: pretty; }
.button.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }

/* the bar on top: the name, three links, the button; paper shows through once the page moves */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 60px;
  display: flex; align-items: center; gap: 28px; padding: 0 24px;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.top.scrolled { background: color-mix(in srgb, var(--paper) 78%, transparent); border-color: var(--line); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.wordmark { font-size: 19px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.top .menu { display: flex; gap: 22px; margin-left: 8px; }
.top .menu a { color: var(--muted); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: color .15s; }
.top .menu a:hover { color: var(--ink); opacity: 1; }
.top .button { margin-left: auto; background: var(--ink); border-color: var(--ink); color: var(--paper); font-family: var(--sans); }

/* the hero: the welcome step, at page size. --sy is the scroll; the block drifts up and thins as you leave it */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 84px 24px 72px; }
.hello { width: fit-content; max-width: 820px; transform: translate3d(0, calc(var(--sy) * -0.16px), 0); opacity: calc(1 - var(--sy) / 620); will-change: transform, opacity; }
.dragon-slot { width: 176px; height: 176px; margin: 0 0 14px -18px; }
.dragon-slot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dragon-slot.small { width: 96px; height: 96px; margin: 0 auto 8px; }
.hello h1.display { display: block; margin: 0 0 30px; font-family: var(--sans); font-weight: 500; font-size: clamp(46px, 8.4vw, 92px); line-height: .98; letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.hello h1.display span:last-child { color: var(--muted); }
.hello h1.display span { display: block; }
.hello.intro h1 span:last-child { animation: fadeUp .45s var(--ease-out) var(--land, 0ms) backwards; }
.hello.intro .ob-acts { animation: obLate .45s var(--ease-out) var(--land, 0ms) backwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes obLate { from { opacity: 0; transform: translateY(6px); visibility: hidden; } }
.ob-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ob-btn { height: 44px; padding: 0 20px; border: 0; border-radius: 11px; font: 500 15px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: opacity .12s, transform .1s, background .12s, box-shadow .2s; }
.ob-btn:active { transform: scale(.98); }
.os { width: 18px; height: 18px; flex: none; margin: -1px 2px 0 -2px; }
.button .os { width: 16px; height: 16px; margin-left: -2px; }
.ob-btn.primary { background: var(--ink); color: var(--paper); }
.ob-btn.primary:hover { opacity: .88; }
.ob-btn.text { color: var(--muted); padding: 0 12px; }
.ob-btn.text:hover { color: var(--ink); opacity: 1; }
.ob-btn.acc { color: var(--acc-ink); }

/* what it does: one paragraph, pinned; its words come up out of the paper as you scroll through the section */
.story { height: 210vh; }
.story .pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: 0 24px; }
.words { max-width: 920px; margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 56px); line-height: 1.18; letter-spacing: -0.014em; color: var(--ink); text-wrap: balance; }
.words span { opacity: clamp(0.12, calc(var(--p, 0) * var(--n, 1) - var(--i, 0) + 0.4), 1); transition: opacity .12s linear; }

/* three plain points */
.points { padding: 20px 0 140px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 40px; }
.point h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.01em; }
.point p { margin: 0; font-size: 16.5px; text-wrap: pretty; }

/* the benchmarks, in the release-chart style: rounded bars fading into the paper, the score on top, a mark in each */
.bench { padding: 0 0 140px; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart { padding: 8px 8px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); overflow: hidden; }
.chart svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.chart .t { font-size: 24px; font-weight: 600; fill: var(--ink); letter-spacing: -0.01em; }
.chart .s { font-size: 15.5px; fill: var(--muted); }
.chart .tick, .chart .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart .tick { font-size: 13.5px; fill: var(--faint); }
.chart .num { font-size: 18px; fill: var(--body); }
.chart .num.me { font-size: 20px; font-weight: 700; fill: var(--ink); }
.chart .lab { font-size: 13.5px; fill: var(--muted); }
.chart .lab.me { font-weight: 700; fill: var(--acc-ink); }
.chart .pill rect { fill: var(--raise); stroke: var(--line); }
.chart .pill text { font-size: 11.5px; letter-spacing: .12em; fill: var(--muted); }
.chart .badge { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .18)); }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .9s var(--rise) calc(var(--i) * 70ms); }
.chart .top { opacity: 0; transition: opacity .5s ease calc(.45s + var(--i) * 70ms); }
.chart.in .bar { transform: none; }
.chart.in .top { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 22px 0 0; font-size: 15px; color: var(--body); }
.legend span { display: inline-flex; align-items: center; gap: 10px; }
.legend b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.sw { width: 30px; height: 16px; border-radius: 4px; }
.sw.hemmingway { background: linear-gradient(var(--acc), var(--paper)); border: 1px solid var(--line); }
.sw.other { background: linear-gradient(color-mix(in srgb, var(--muted) 60%, var(--paper)), var(--paper)); border: 1px solid var(--line); }
.foot { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* the plans: site.css draws them; here they come in on scroll, not on load */
.plans-area { padding: 0 0 140px; }
.plans-area .period { margin-top: 8px; }
.plans-area .plan { animation: none; }
.plans-area .api { margin-top: 40px; }

/* get it */
.get { padding: 0 0 140px; text-align: center; }
.get .section-h { margin-bottom: 26px; }
.get .downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 12px; }
.get .first-open { max-width: 520px; margin: 40px auto 0; text-align: left; font-size: 14px; color: var(--body); }
.get .first-open h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.get .first-open p { margin: 0 0 10px; }
.get .first-open strong { color: var(--ink); font-weight: 600; }

.foot-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; max-width: 1100px; margin: 0 auto; padding: 28px 24px 40px; border-top: 1px solid var(--line); font-size: 14px; }
.foot-bar .links { margin: 0 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-bar .links a { color: var(--muted); text-decoration: none; }
.foot-bar .links a:hover { color: var(--ink); }

/* things arrive as they come into view */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .8s var(--rise); transition-delay: calc(var(--d, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .charts { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; gap: 28px; }
  .top .menu { display: none; }
  .story { height: 180vh; }
}
@media (max-width: 560px) {
  .dragon-slot { width: 132px; height: 132px; margin-left: -12px; }
  .hello h1.display { margin-bottom: 26px; }
  .ob-acts { flex-wrap: wrap; }
  .points, .bench, .plans-area { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hello { transform: none; opacity: 1; }
  .hello.intro h1 span:last-child, .hello.intro .ob-acts { animation: none; }
  [data-reveal], .chart .bar, .chart .top { opacity: 1; transform: none; transition: none; }
  .words span { opacity: 1; transition: none; }
  .story { height: auto; padding: 120px 0; }
  .story .pin { position: static; height: auto; }
}

.hello { position: relative; }
.ob-btn.big { height: 52px; padding: 0 26px; font-size: 16px; font-weight: 500; border-radius: 12px; }
.ob-btn.line { height: 52px; padding: 0 22px; border-radius: 12px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ob-btn.line:hover { box-shadow: inset 0 0 0 1px var(--faint); }

/* the slogan, then two lines that come up as you scroll */
.story { height: 170vh; }
.story .pin { place-items: center; align-content: center; grid-template-columns: minmax(0, 920px); justify-content: center; }
.slogan { margin: 0 0 22px; font-size: clamp(40px, 7vw, 84px); font-weight: 500; line-height: .98; letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.words { max-width: 860px; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.35; letter-spacing: -0.015em; color: var(--body); font-weight: 400; }
.words span { opacity: clamp(0.14, calc(var(--p, 0) * var(--n, 1) - var(--i, 0) + 0.4), 1); }

/* the model, through the API: the call on the left, the price and the key on the right */
.model { padding: 0 0 140px; }
.api-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 40px; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--raise); }
.api-row .section-h { margin-bottom: 8px; font-size: clamp(26px, 3.4vw, 32px); }
.api-row .lead { margin: 0; font-size: 16px; }
.model-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 20px; align-items: stretch; }
.code { margin: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--raise); color: var(--ink); font: 13.5px/1.65 var(--code); overflow-x: auto; white-space: pre; -webkit-overflow-scrolling: touch; }
.model-side { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.model-side .rates { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0; }
.model-side .rate { display: inline-flex; flex-direction: column; gap: 4px; }
.model-side .rate .amount { font-family: var(--sans); font-weight: 500; font-size: 40px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.model-side .rate .unit { color: var(--muted); font-size: 14px; }
.model-side p { margin: 0; color: var(--body); }
.model-side .button { align-self: flex-start; margin-top: 6px; }
.point h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); }
@media (max-width: 900px) { .model-grid { grid-template-columns: 1fr; } .api-row { grid-template-columns: 1fr; } .api-row .button { justify-self: start; } }
@media (max-width: 560px) { .ob-btn.big, .ob-btn.line { width: 100%; } }
