/* ── Tokens ─────────────────────────────────────────────────────────── */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --text: #08080a;
  --muted: #6e6e78;
  --faint: #9a9aa4;
  --line: #e7e7ea;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.06);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.35);

  --py: #4c8dff;
  --java: #f0883e;
  --js: #e8c33c;
  --kt: #a06bff;
  --swift: #f05138;

  --maxw: 1120px;
  --r: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c;
    --bg-alt: #111114;
    --text: #f4f4f6;
    --muted: #9b9ba5;
    --faint: #6e6e78;
    --line: #22222a;
    --card: #121216;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 40px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans,
               Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.narrow { max-width: 720px; }

/* ── Header ─────────────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #3b82f6, #7c3aed);
  color: #fff;
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.5px;
}

header nav {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

header nav a:hover { color: var(--text); }

@media (max-width: 620px) {
  header nav { gap: 18px; font-size: 14px; }
  .hide-sm { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding: 92px 0 12px; }

/* Without negative tracking the headline needs a wider column, otherwise it
   breaks onto five ragged lines with a single word stranded. */
.hero .split { grid-template-columns: 1.12fr 1fr; }

h1.display {
  margin: 0 0 20px;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 0.94;
  letter-spacing: normal;
  font-weight: 700;
  max-width: 13ch;
  text-wrap: balance;
}

.lede {
  margin: 0 0 32px;
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
  letter-spacing: normal;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s, opacity .15s, background .15s;
}

.btn:active { transform: scale(.97); }

.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: .86; }

.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }

.note {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--faint);
}

/* ── Gradient stages ────────────────────────────────────────────────── */

.stage {
  border-radius: 22px;
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.stage-py    { background: linear-gradient(140deg, #5b8def, #3b5bdb 45%, #7048e8); }
.stage-java  { background: linear-gradient(140deg, #ffa94d, #f76707 52%, #c2255c); }
.stage-snap  { background: linear-gradient(140deg, #fa7352, #f04078 45%, #f2a63d); }
.stage-kt    { background: linear-gradient(140deg, #b197fc, #7048e8 50%, #4c1d95); }

/* ── Sections ───────────────────────────────────────────────────────── */

section { padding: 96px 0; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 640;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(29px, 4.3vw, 44px);
  line-height: 1.06;
  letter-spacing: normal;
  font-weight: 700;
}

h3 { margin: 0 0 6px; font-size: 17.5px; letter-spacing: normal; font-weight: 600; }

p { margin: 0 0 16px; }

.dim { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.split.flip > :first-child { order: 2; }

@media (max-width: 860px) {
  .split, .hero .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  section { padding: 72px 0; }
  .hero { padding: 64px 0 8px; }
}

/* ── App grid ───────────────────────────────────────────────────────── */

.apps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1020px) { .apps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 660px)  { .apps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px)  { .apps { grid-template-columns: 1fr; } }

.app {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  transition: transform .18s, box-shadow .18s;
  /* Column so the tag pins to the bottom and cards stay aligned even when
     the descriptions wrap to different line counts. */
  display: flex;
  flex-direction: column;
}

.app .tag { margin-top: auto; align-self: flex-start; padding-top: 4px; }
.app p { margin-bottom: 14px; }

.app:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.logo {
  width: 34px;
  height: 34px;
  display: block;
  margin-bottom: 16px;
  /* Official marks are single-colour silhouettes, so the brand hue is applied
     here rather than baked into the artwork. */
  fill: currentColor;
}

.logo-python     { color: #3776AB; }
.logo-javascript { color: #C9A800; }
.logo-java       { color: #E76F00; }
.logo-kotlin     { color: #7F52FF; }
.logo-swift      { color: #F05138; }

@media (prefers-color-scheme: dark) {
  /* Python's navy and JavaScript's mustard both lose contrast on near-black. */
  .logo-python     { color: #6FA8DC; }
  .logo-javascript { color: #F7DF1E; }
}

.app p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }

.tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag-on { border-color: transparent; background: color-mix(in srgb, #22c55e 15%, transparent); color: #15803d; }

@media (prefers-color-scheme: dark) {
  .tag-on { color: #4ade80; }
}

/* ── Feature list ───────────────────────────────────────────────────── */

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px 44px;
}

@media (max-width: 880px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr; } }

.grid3 p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ── Pricing ────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  background: var(--card);
  position: relative;
}

.plan.featured { border-color: color-mix(in srgb, var(--text) 42%, transparent); }

.plan .badge {
  position: absolute;
  top: -10px;
  left: 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

.price {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: normal;
  margin: 6px 0 2px;
}

.price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.plan .who { font-size: 14px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; max-width: 70ch; }

/* ── Footer ─────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0 64px;
  color: var(--muted);
  font-size: 14.5px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: space-between;
}

footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ── Device frames holding real app captures ────────────────────────── */

.phone {
  width: 100%;
  max-width: 284px;
  background: #0d0d10;
  border-radius: 42px;
  padding: 8px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.16);
}

.phone .screen {
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  /* Matches the captured iPhone frame, so the box holds its shape before the
     image or video has loaded and the page doesn't jump. */
  aspect-ratio: 1320 / 2868;
}

.phone .screen img,
.phone .screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stagelabel {
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(255,255,255,.85);
  text-align: center;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.shotgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  justify-items: center;
}

.shotgrid .phone { max-width: 220px; }

@media (max-width: 760px) {
  .shotgrid { grid-template-columns: 1fr; gap: 26px; }
  .shotgrid .phone { max-width: 250px; }
}

/* ── Long-form documents ────────────────────────────────────────────── */

article.doc { padding: 64px 0 90px; }

article.doc h1 {
  font-size: clamp(33px, 5vw, 48px);
  letter-spacing: normal;
  line-height: 1.04;
  font-weight: 700;
  margin: 0 0 10px;
}

article.doc .updated {
  color: var(--faint);
  font-size: 14.5px;
  margin: 0 0 44px;
}

article.doc h2 {
  font-size: 21px;
  letter-spacing: normal;
  font-weight: 600;
  margin: 46px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

article.doc p, article.doc li { color: var(--muted); }
article.doc strong { color: var(--text); font-weight: 620; }
article.doc a { color: var(--text); text-underline-offset: 3px; }
article.doc ul { padding-left: 20px; margin: 0 0 16px; }
article.doc li { margin: 7px 0; }

article.doc .callout {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 20px;
}

article.doc .callout p:last-child { margin-bottom: 0; }

/* ── Premium showcase ───────────────────────────────────────────────── */

.shot { margin: 0; display: flex; flex-direction: column; align-items: center; }

.shot figcaption {
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
  max-width: 34ch;
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.shot .phone {
  /* Three frames side by side need to be smaller than the hero device. */
  max-width: 208px;
  border-radius: 34px;
  padding: 7px;
}

.shot .phone .screen { border-radius: 28px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
