/* Tokens measured from the reference design: near-white page, hairline rules,
   Geist + Geist Mono, 8/16px radii, single green accent. */
:root {
  --bg: #f8f9fa;
  --bg-raise: #ffffff;
  --bg-tint: #f1f3f5;
  --ink: #141417;
  --ink-2: #54545e;
  --ink-3: #6a6a74;
  --line: rgba(17, 17, 20, 0.08);
  --line-2: rgba(17, 17, 20, 0.15);
  --accent: #1e9e56;
  --accent-soft: rgba(30, 158, 86, 0.1);

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r: 8px;

  --shadow-card: 0 1px 2px rgba(17, 17, 20, 0.04), 0 8px 24px rgba(17, 17, 20, 0.06);
  --shadow-float: 0 2px 4px rgba(17, 17, 20, 0.04), 0 18px 44px rgba(17, 17, 20, 0.1);

  --page-x: clamp(20px, 4vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--bg-raise);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

/* Legacy full-page texture layers are unused in this design. */
.wash,
.noise {
  display: none;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg-raise);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--r);
}

.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- shell ---------- */

.shell {
  width: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-x);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    transform 160ms var(--ease);
}

.btn:hover {
  background: #2a2a30;
  border-color: #2a2a30;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
  pointer-events: none;
}

.btn--ghost {
  background: var(--bg-raise);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--bg-raise);
  border-color: var(--ink);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--lg {
  min-height: 46px;
  padding: 0 20px;
}

/* Inline text link with a trailing arrow, boxed like the reference. */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg-raise);
  font-family: var(--mono);
  font-size: 13.5px;
  text-transform: lowercase;
  text-decoration: none;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}

.link:hover {
  border-color: var(--ink);
}

.link svg {
  transition: transform 200ms var(--ease);
}

.link:hover svg {
  transform: translateX(3px);
}

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

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--ink-3);
}

#buy,
#faq {
  scroll-margin-top: 24px;
}

.sect-head {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.sect-head h2 {
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.sect-head p {
  margin: 12px 0 0;
  font-size: 15.5px;
  color: var(--ink-3);
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 10vh, 104px) 0 0;
  text-align: center;
}

/* Dot-grid canvas — echoes the New Tab tile grid, faded with a radial mask so
   it reads as texture, not a pattern. Full-bleed; html clips the x overflow. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -48px;
  left: 50%;
  width: 100vw;
  height: 560px;
  transform: translateX(-50%);
  background-image: radial-gradient(circle, rgba(20, 20, 23, 0.14) 1px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 46% 100% at 50% 22%, #000 8%, transparent 66%);
  mask-image: radial-gradient(ellipse 46% 100% at 50% 22%, #000 8%, transparent 66%);
  pointer-events: none;
}

/* Sized in vw so the title holds one line from 320px up; nowrap makes any
   miscalculation visible as overflow rather than a silent second line. */
.hero__title {
  margin: 0;
  font-size: min(8.2vw, 6.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

/* Highlighter marker behind the key phrase, wiped in on load. */
.hero__mark {
  position: relative;
  isolation: isolate;
  white-space: nowrap;
}

.hero__mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.1em;
  height: 0.32em;
  border-radius: 3px;
  background: rgba(30, 158, 86, 0.24);
  transform: scaleX(0);
  transform-origin: left center;
  animation: markWipe 640ms var(--ease) 520ms forwards;
}

.hero__sub {
  max-width: 40rem;
  margin: clamp(18px, 2.6vh, 26px) auto 0;
  font-size: clamp(15.5px, 1.35vw, 17.5px);
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__meta {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* Staggered entrance for the hero stack. */
.hero__title,
.hero__sub,
.hero .cta,
.hero__meta,
.hero .hero__shot {
  animation: heroRise 680ms var(--ease) both;
}

.hero__sub {
  animation-delay: 90ms;
}

.hero .cta {
  animation-delay: 170ms;
}

.hero__meta {
  animation-delay: 230ms;
}

.hero .hero__shot {
  animation-delay: 300ms;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes markWipe {
  to {
    transform: scaleX(1);
  }
}

/* ---------- at-a-glance band ---------- */

.band {
  margin-top: clamp(52px, 8vh, 92px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(22px, 3.4vh, 32px) 0;
  text-align: center;
}

.band__line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.45em 0.55em;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.band__from {
  color: var(--ink-3);
}

.band__arrow {
  color: var(--ink-3);
  font-weight: 400;
}

.band__to {
  color: var(--accent);
}

.band__label {
  margin-left: 0.15em;
  font-weight: 400;
  color: var(--ink);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(24px, 3.4vh, 34px) 0 0;
}

/* Scoped so the later `.shot { margin: 0 }` reset does not win. Adds a soft
   accent under-glow so the dark screenshot floats off the page. */
.hero .hero__shot {
  margin-top: clamp(38px, 6.5vh, 64px);
  box-shadow: var(--shadow-float), 0 46px 90px -34px rgba(30, 158, 86, 0.4);
}

/* ---------- media: one layer only ---------- */

/* Screenshots sit directly on the page — no frame, no backdrop. */
.shot {
  margin: 0;
  min-width: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}

.shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(17, 17, 20, 0.05), 0 28px 60px rgba(17, 17, 20, 0.14);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* For content we render ourselves (code, lists) a single hairline box. */
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.code b {
  color: var(--ink);
  font-weight: 500;
}

.code i {
  color: var(--accent);
  font-style: normal;
}

.code em {
  color: var(--ink-3);
  font-style: normal;
}

/* row list card (label left, muted value right) */

.rows {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.rows li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
}

.rows li:last-child {
  border-bottom: 0;
}

.rows .dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.rows .val {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* ---------- numbered chapters ---------- */

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(44px, 7vh, 76px) 0;
  border-top: 1px solid var(--line);
}

.chapter--flip {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.chapter--flip .chapter__copy {
  order: 2;
}

.chapter--flip .chapter__media {
  order: 1;
}

.chapter__n {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.chapter__copy h2 {
  margin: 12px 0 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.14;
}

.chapter__lead {
  margin: 20px 0 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chapter__body {
  margin: 6px 0 0;
  max-width: 34rem;
  font-size: 15.5px;
  color: var(--ink-3);
}

.chapter__cta {
  margin-top: 22px;
}

/* ---------- getting started ---------- */

.start {
  padding: clamp(52px, 8vh, 88px) 0;
  border-top: 1px solid var(--line);
}

.start__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-top: clamp(34px, 5vh, 52px);
}

.steps-num {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps-num li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}

.steps-num li:first-child {
  padding-top: 0;
}

.steps-num li:last-child {
  border-bottom: 0;
}

.steps-num h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.steps-num h3::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}

.steps-num p {
  margin: 4px 0 0 28px;
  font-size: 15px;
  color: var(--ink-3);
}

/* ---------- pricing ---------- */

.purchase {
  padding: clamp(52px, 8vh, 88px) 0;
  border-top: 1px solid var(--line);
}

.purchase__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  margin-top: clamp(32px, 5vh, 48px);
}

.purchase__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.purchase__list li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.purchase__list li:last-child {
  border-bottom: 0;
}

.purchase__list svg {
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--accent);
}

.purchase__list strong {
  font-weight: 600;
}

.purchase__list span {
  color: var(--ink-3);
}

.purchase__card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.purchase__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

.purchase__badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.purchase__body {
  padding: 22px 20px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0;
}

.price__amount {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.price__unit {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: lowercase;
  color: var(--ink-3);
}

.price__sub {
  margin: 10px 0 0;
  font-size: 14.5px;
  color: var(--ink-3);
}

.purchase__buy {
  margin-top: 20px;
}

.purchase__fine {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

.purchase__fine strong {
  color: var(--ink);
  font-weight: 600;
}

.purchase__fine a {
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.purchase__fine a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- faq ---------- */

.faq {
  padding: clamp(52px, 8vh, 88px) 0;
  border-top: 1px solid var(--line);
}

.faq__list {
  max-width: 52rem;
  margin: clamp(30px, 4vh, 44px) auto 0;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-3);
}

.faq details[open] summary::after {
  content: "−";
}

.faq__a {
  margin: 0;
  padding: 0 0 18px;
  max-width: 42rem;
  font-size: 15px;
  color: var(--ink-3);
}

.faq__a a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.faq__a code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ---------- footer ---------- */

.foot {
  margin-top: clamp(44px, 7vh, 80px);
  border-top: 1px solid var(--line);
  padding: 26px var(--page-x) 34px;
  text-align: center;
}

.foot p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-3);
}

.foot a {
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.foot a:hover {
  color: var(--ink);
}

/* ---------- legal + license pages ---------- */

.legal-wrap,
.license-wrap {
  max-width: 44rem;
  padding: clamp(40px, 7vh, 72px) 0 0;
}

.legal-wrap h1,
.license-wrap h1 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4.6vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.legal-wrap .meta,
.license-wrap .meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: lowercase;
  color: var(--ink-3);
}

.legal-wrap h1 + .meta,
.license-wrap h1 + .meta {
  margin-top: 12px;
}

.legal-wrap .body,
.license-wrap .body {
  margin-top: clamp(28px, 4vh, 40px);
  font-size: 15.5px;
  color: var(--ink-2);
}

.legal-wrap h2,
.license-wrap h2 {
  margin: 36px 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.014em;
  color: var(--ink);
}

.legal-wrap a,
.license-wrap a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.legal-wrap a:hover,
.license-wrap a:hover {
  border-bottom-color: var(--ink);
}

.legal-wrap ul {
  margin: 12px 0;
  padding-left: 20px;
}

.legal-wrap li {
  margin-bottom: 8px;
}

.legal-wrap code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  font-family: var(--mono);
  font-size: 13px;
}

.steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.steps li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--line);
  counter-increment: s;
}

.steps li:last-child {
  border-bottom: 0;
}

.steps li::before {
  content: "0" counter(s);
  position: absolute;
  left: 0;
  top: 15px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

.notice {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-raise);
  font-size: 14.5px;
}

.notice strong {
  color: var(--ink);
  font-weight: 600;
}

.license-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-raise);
  box-shadow: var(--shadow-card);
}

.license-key__value {
  margin: 0;
  flex: 1 1 16rem;
  font-family: var(--mono);
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  word-break: break-all;
}

.license-status {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

.license-status--error {
  color: #d13b37;
}

.license-form {
  display: grid;
  gap: 14px;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-raise);
  box-shadow: var(--shadow-card);
}

.license-form label {
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: lowercase;
  color: var(--ink-3);
}

.license-form input {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14.5px;
}

.license-form input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--focus);
}

.form-error {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: #d13b37;
}

.license-foot {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .chapter,
  .chapter--flip,
  .start__grid,
  .purchase__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .chapter--flip .chapter__copy,
  .chapter--flip .chapter__media {
    order: unset;
  }

}

@media (max-width: 680px) {
  .band__line {
    white-space: normal;
  }

  .cta .btn {
    flex: 1 1 100%;
  }

  .code {
    padding: 14px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__title,
  .hero__sub,
  .hero .cta,
  .hero__meta,
  .hero .hero__shot {
    animation: none;
  }

  .hero__mark::after {
    animation: none;
    transform: scaleX(1);
  }

  .link svg,
  .btn,
  .shot {
    transition: none;
  }

  .shot:hover {
    transform: none;
  }
}
