/*
 * www.linguiqo.com
 *
 * The app's design tokens, hand-written rather than generated. The app needs
 * Tailwind because it has a thousand components; a marketing site has nine
 * sections, and shipping a utility framework to render them would cost more
 * bytes than the whole page.
 *
 * The tokens themselves are copied from frontend/src/index.css, so the two
 * surfaces are the same product. Brand indigo is #4F46E5 — the darker one that
 * carries white text at 6.29:1, not the #6366F1 the brand is nominally built
 * on and which fails contrast on a button.
 */

:root {
  --bg: #fafbfc;
  --fg: #111827;
  --card: #ffffff;
  --muted: #4b5563;
  --subtle: #94a3b8;
  --border: #e6edf2;
  --border-strong: #d5e0e8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #f59e0b;
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --success: #059669;
  --radius: 14px;
  --wrap: 1120px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow: 0 8px 24px -12px rgb(16 24 40 / 0.18);
  --shadow-lg: 0 24px 60px -24px rgb(16 24 40 / 0.28);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Space Grotesk Variable", "Space Grotesk", "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* --- header ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(250 251 252 / 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 78px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Space Grotesk Variable", "Space Grotesk", sans-serif;
  font-size: 1.55rem; font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: -0.02em;
}
.brand-accent { color: var(--primary); }

.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle { display: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -12px rgb(79 70 229 / .8); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-outline { border-color: var(--border-strong); background: var(--card); color: var(--fg); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--fg); background: var(--primary-soft); }

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

.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero::before,
.hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.hero::before { width: 460px; height: 460px; top: -180px; left: -140px; background: rgb(79 70 229 / .13); }
.hero::after { width: 380px; height: 380px; bottom: -180px; right: -80px; background: rgb(8 145 178 / .10); }

.hero-inner { position: relative; display: grid; gap: clamp(36px, 5vw, 64px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 940px) { .hero-inner { grid-template-columns: 1.05fr 1fr; } }

.eyebrow {
  font-size: 0.82rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.lede { font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
@media (max-width: 560px) {
  /* Stacked buttons in two different widths read as an accident. */
  .hero-actions .btn { flex: 1 1 100%; }
}
.hero-note { font-size: 0.9rem; color: var(--subtle); margin: 0; }

/* The product, drawn rather than screenshotted: a screenshot of an editor is
   unreadable at this size, and this says the one thing the page is about. */
.mock {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 16px; font-size: 0.9rem;
}
.mock-bar { display: flex; gap: 6px; padding-bottom: 14px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.mock-head { border-top: 0; padding-top: 0; }
.mock-key { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.82rem; color: var(--muted); }
.mock-source { padding: 12px; margin: 8px 0; background: var(--primary-soft); border-radius: 10px; display: flex; gap: 10px; align-items: baseline; }
.mock-source p { margin: 0; }
.mock-source del { color: var(--subtle); }
.mock-label, .mock-flag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; flex: none;
}
.mock-row p { margin: 0; flex: 1; min-width: 0; }
.chip { font-size: 0.7rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; flex: none; }
.chip-fuzzy { background: #fef3c7; color: #92400e; }
.chip-stale { background: #ffe4e6; color: #9f1239; margin-left: auto; }

/* --- sections -------------------------------------------------------------- */

.section { padding: clamp(52px, 7vw, 88px) 0; }
.section-tint { background: var(--card); border-block: 1px solid var(--border); }
.section-difference { background: var(--navy); color: #e2e8f0; }
.section-difference h2 { color: #fff; }
.section-difference .lede { color: #cbd5e1; font-size: 1.2rem; }
.section-difference .eyebrow { color: #a5b4fc; }
.section h2 + .lede { margin-bottom: 2rem; max-width: 68ch; }
.note { color: var(--subtle); font-size: 0.92rem; margin-top: 1.5rem; }

/* --- the git round trip, drawn ---------------------------------------------
 * Three stations on one track instead of three cards in a row: the repository
 * on both ends, the editor in the middle, and packets travelling the dashes
 * in the order the copy underneath describes. The whole scene runs on one
 * 8-second clock: the .json packet rides out during the first half, the PR
 * packet rides back during the second.
 */
.pipeline { display: flex; flex-direction: column; gap: 10px; margin-top: 2.2rem; }
@media (min-width: 800px) { .pipeline { flex-direction: row; align-items: flex-start; gap: 0; } }
.pl-node { flex: 1; text-align: center; padding: 0 14px; }
.pl-node h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.pl-node p { margin: 0 auto; color: var(--muted); font-size: 0.9rem; max-width: 30ch; }
.pl-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border-strong);
  color: var(--muted);
  box-shadow: var(--shadow);
}
.pl-node-app .pl-icon {
  width: 72px; height: 72px; border-radius: 22px;
  /* -4px top and bottom: the bigger disc overflows its 64px slot symmetrically,
   * so all three titles start on the same line. */
  margin: -4px 0;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, var(--primary), #0891b2) border-box;
  border: 2px solid transparent;
  box-shadow: 0 14px 30px -14px rgb(79 70 229 / .55);
}

/* The track: dashes drawn with a gradient, packets riding them. Aligned to
 * the icon centres, which sit 32px under the top of every node. */
.pl-link {
  position: relative; flex: none;
  align-self: stretch;
  min-height: 44px;
}
@media (min-width: 800px) {
  .pl-link { width: clamp(60px, 9vw, 130px); height: 64px; margin-top: 0; align-self: flex-start; }
  .pl-link::before {
    content: ""; position: absolute; left: -6px; right: -6px; top: 31px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 7px, transparent 7px 14px);
  }
}
@media (max-width: 799px) {
  /* Stacked: the track turns vertical and keeps the packets. */
  .pl-link::before {
    content: ""; position: absolute; top: -4px; bottom: -4px; left: 50%; width: 2px;
    background: repeating-linear-gradient(180deg, var(--border-strong) 0 7px, transparent 7px 14px);
  }
}
.pl-packet {
  position: absolute;
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: #0f172a; color: #e2e8f0;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: 0.68rem; font-weight: 600;
  box-shadow: 0 8px 16px -8px rgb(15 23 42 / .6);
  opacity: 0;
}
.pl-packet-back { background: var(--primary); color: #fff; }
@media (min-width: 800px) {
  .pl-packet { top: 22px; left: 0; }
  .pl-packet-back { }
}
@media (max-width: 799px) {
  .pl-packet { left: 50%; top: 0; margin-left: -18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .pl-packet { animation: packet-out 8s var(--ease) infinite; }
  .pl-packet-back { animation-name: packet-back; }
  /* The dashes crawl in the direction of travel: outbound on the first track,
   * homeward on the second. Slow, so it reads as a live wire, not a marquee. */
  .pl-link::before { animation: dash-march 1.6s linear infinite; }
  .pl-node-app ~ .pl-link::before { animation-direction: reverse; }
  @media (max-width: 799px) {
    .pl-packet { animation-name: packet-down; }
    .pl-packet-back { animation-name: packet-down-late; }
    .pl-link::before { animation-name: dash-march-down; }
  }
}
@keyframes dash-march { to { background-position-x: 14px; } }
@keyframes dash-march-down { to { background-position-y: 14px; } }
@media (prefers-reduced-motion: reduce) {
  /* Parked mid-track: the still frame still tells the direction. */
  .pl-packet { opacity: 1; left: 50%; transform: translateX(-50%); }
  .pl-packet-back { }
}
/* Out during the first half of the clock, back during the second -- the same
 * discipline as the hero: cause, then effect, on one timeline. */
@keyframes packet-out {
  0%, 4%   { left: -8%; opacity: 0; }
  10%      { opacity: 1; }
  38%      { opacity: 1; }
  46%, 100%{ left: 82%; opacity: 0; }
}
@keyframes packet-back {
  0%, 52%  { left: 82%; opacity: 0; }
  58%      { opacity: 1; }
  86%      { opacity: 1; }
  94%, 100%{ left: -8%; opacity: 0; }
}
@keyframes packet-down {
  0%, 4%   { top: -10%; opacity: 0; }
  10%      { opacity: 1; }
  38%      { opacity: 1; }
  46%, 100%{ top: 80%; opacity: 0; }
}
@keyframes packet-down-late {
  0%, 52%  { top: -10%; opacity: 0; }
  58%      { opacity: 1; }
  86%      { opacity: 1; }
  94%, 100%{ top: 80%; opacity: 0; }
}

/* The features, the way the operator's other site does them: a dark field,
 * a spectrum-tinted icon, a title and one line. No cards -- two card designs
 * in a row read as clutter, and the captions carry everything a visitor
 * actually scans for. Hues by position, mirroring the app's per-destination
 * palette as light tints that survive on navy. */
.section-features { background: var(--navy); color: #e2e8f0; }
.section-features h2 { color: #fff; }
.features-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 44px 40px; margin-top: 2.6rem;
}
.feature-item { width: 200px; text-align: center; }
.feature-item svg {
  width: 60px; height: 60px; margin-bottom: 14px;
  color: var(--fi, #a5b4fc);
}
.feature-item h3 { color: #fff; font-size: 1.02rem; margin: 0 0 4px; }
.feature-item p { margin: 0; color: #94a3b8; font-size: 0.9rem; line-height: 1.45; }
.feature-item:nth-child(1) { --fi: #a5b4fc; }
.feature-item:nth-child(2) { --fi: #6ee7b7; }
.feature-item:nth-child(3) { --fi: #c4b5fd; }
.feature-item:nth-child(4) { --fi: #fda4af; }
.feature-item:nth-child(5) { --fi: #5eead4; }
.feature-item:nth-child(6) { --fi: #fcd34d; }
.feature-item:nth-child(7) { --fi: #93c5fd; }
.feature-item:nth-child(8) { --fi: #fdba74; }
@media (max-width: 640px) { .feature-item { width: 42%; min-width: 150px; } }

.plans { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
/* The emphasis sits on Small, not Free: it is the plan the comparison below
 * prices against the world, and the free tier does not need to be sold. */
.plan:nth-child(2) {
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(150deg, rgb(79 70 229 / .65), rgb(8 145 178 / .5)) border-box;
  border: 2px solid transparent;
  padding: 23px;
}
.plan-price { margin: 4px 0 0; display: flex; align-items: baseline; gap: 5px; }
.plan-price strong { font-family: "Space Grotesk Variable", sans-serif; font-size: 2rem; letter-spacing: -0.02em; }
.plan-price span { color: var(--subtle); font-size: 0.9rem; }
.plan-yearly { color: var(--subtle); font-size: 0.86rem; margin: 2px 0 0; }
.plan-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; font-size: 0.95rem; color: var(--muted); }
.plan-list li { padding-left: 22px; position: relative; }
.plan-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 12px; height: 7px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.plan-list strong { color: var(--fg); }

.cta { padding: clamp(60px, 8vw, 96px) 0; text-align: center; background: var(--card); border-top: 1px solid var(--border); }
.cta .lede { margin-inline: auto; max-width: 56ch; }
.cta .btn { margin: 10px 0 14px; }

/* --- legal ----------------------------------------------------------------- */

.legal { padding: clamp(44px, 6vw, 72px) 0 clamp(60px, 8vw, 96px); }
.legal-header { margin-bottom: 36px; }
.legal-meta { color: var(--subtle); font-size: 0.9rem; margin-top: -0.4em; }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal section p, .legal-list li { color: var(--muted); }
.legal-list { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-toc {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 8px;
}
.legal-toc h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin: 0 0 10px; }
.legal-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 5px; font-size: 0.95rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.94rem; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal-table th { background: var(--card); font-weight: 650; }
.legal-table td { color: var(--muted); }
.legal-operator { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--border); }

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

.site-footer { background: var(--navy); color: #cbd5e1; padding: clamp(44px, 6vw, 64px) 0 28px; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-tagline { color: #94a3b8; font-size: 0.94rem; max-width: 40ch; margin-top: 14px; }
.site-footer h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin-bottom: 12px; font-family: inherit; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 0.94rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--navy-soft); }
.footer-bottom p { color: #64748b; font-size: 0.86rem; margin: 0; }

/* --- small screens --------------------------------------------------------- */

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 42px; height: 42px; padding: 0 10px;
    background: none; border: 1px solid var(--border); border-radius: 11px; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 18px; margin: 0; padding: 20px 24px 26px;
    background: var(--card); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 14px; }
  .nav-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================================
 * The details that separate a real page from a template.
 *
 * Every one of them is behind `prefers-reduced-motion`, and every one degrades
 * to the static page underneath: the reveal starts visible and JavaScript hides
 * it, so a browser with scripting off shows the content rather than a blank
 * column. That is the whole reason the reveal is opt-in from JS instead of a
 * CSS default.
 * ========================================================================= */

/* --- the hero performs the invalidation ------------------------------------
 *
 * An eight-second loop: the English is edited, then Czech, German and Polish
 * fall over one after another. The product's one irreplaceable behaviour,
 * shown rather than claimed, and it reads before anybody has got to the
 * paragraph that explains it.
 */
.mock-bar .mock-file {
  /* Sits inside .mock-bar, whose span rule turns every child into a 10px
   * traffic-light dot. The compound selector matters as much as the resets:
   * plain .mock-file loses to .mock-bar span on specificity and the filename
   * stays a dot with a hundred pixels of text overflowing it. */
  width: auto; height: auto; border-radius: 0; background: none;
  margin-left: 10px;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: 0.74rem;
  color: var(--subtle);
}
.mock-source p { position: relative; }
.mock-source del,
.mock-source ins { text-decoration: none; }
/* A two-line diff on purpose: with the sidebar in the window the old and the
 * new sentence no longer fit one line, and a box that grows a line mid-loop
 * jolts every row under it. del on its own line, ins typing in under it --
 * the height never changes, and it reads as the -/+ every developer knows. */
.mock-source del { display: block; }
/* inline-block, or the max-width animation below is silently ignored: max-width
 * does nothing on an inline element, and the "typing" would render as both
 * sentences glued together, fully visible from the first frame. */
.mock-source ins {
  color: var(--fg);
  display: inline-block; overflow: hidden;
  white-space: nowrap; vertical-align: bottom;
}

.chip-ok { background: #d1fae5; color: #065f46; }
/* Both chips occupy the same cell, so the swap does not reflow the row. */
.mock-row .chip { position: absolute; right: 0; }
.mock-row { position: relative; padding-right: 62px; }

@media (prefers-reduced-motion: no-preference) {
  .mock-source del {
    text-decoration: line-through;
    color: var(--subtle);
    animation: strike 8s var(--ease) infinite;
  }
  .mock-source ins { animation: type-in 8s var(--ease) infinite; }
  .caret {
    display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
    background: var(--primary); vertical-align: text-bottom;
    animation: caret 8s steps(1) infinite;
  }
  .chip-ok { animation: chip-out 8s var(--ease) infinite calc(var(--step) * .28s); }
  .chip-fuzzy { animation: chip-in 8s var(--ease) infinite calc(var(--step) * .28s); }
  .chip-stale { animation: chip-in 8s var(--ease) infinite .1s; }
  .mock-row p { animation: nudge 8s var(--ease) infinite calc(var(--step) * .28s); }
}

/* Nothing moving: the finished state, which is also the true one. */
@media (prefers-reduced-motion: reduce) {
  .mock-source del { text-decoration: line-through; color: var(--subtle); }
  .chip-ok { display: none; }
  .caret { display: none; }
}

:root { --ease: cubic-bezier(.22, 1, .36, 1); }

@keyframes strike {
  0%, 18%   { text-decoration-color: transparent; color: var(--fg); }
  26%, 100% { text-decoration-color: currentColor; color: var(--subtle); }
}
@keyframes type-in {
  0%, 20%  { max-width: 0; opacity: 0; }
  34%, 92% { max-width: 14em; opacity: 1; }
  100%     { max-width: 0; opacity: 0; }
}
@keyframes caret {
  0%, 19%  { opacity: 0; }
  20%, 34% { opacity: 1; }
  35%, 100%{ opacity: 0; }
}
@keyframes chip-out {
  0%, 34%  { opacity: 1; transform: none; }
  40%, 92% { opacity: 0; transform: translateY(-4px); }
  100%     { opacity: 1; transform: none; }
}
@keyframes chip-in {
  0%, 36%  { opacity: 0; transform: translateY(4px); }
  44%, 92% { opacity: 1; transform: none; }
  100%     { opacity: 0; transform: translateY(4px); }
}
@keyframes nudge {
  0%, 36%  { color: var(--fg); }
  44%, 92% { color: var(--muted); }
  100%     { color: var(--fg); }
}

/* --- arriving on scroll ----------------------------------------------------
 * Small and once. A page where everything slides in from somewhere is a page
 * that is harder to read than one that just sits there.
 */
[data-reveal] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    transition-delay: calc(var(--reveal-delay, 0) * 70ms);
  }
  .js [data-reveal].in { opacity: 1; transform: none; }
}

/* --- header that knows it has been scrolled past --------------------------- */
.site-header { transition: box-shadow .2s, border-color .2s; }
.site-header.scrolled { box-shadow: 0 4px 20px -12px rgb(16 24 40 / .3); border-color: var(--border-strong); }

/* Accent words in the logo's exact colour -- no gradient. The other site
 * settled this: one heading in a wash of colour reads as decoration, a
 * heading with its key phrase in the brand's own indigo reads as emphasis. */
h1 .hl { color: var(--primary); }
.section-difference h2 .hl { color: #a5b4fc; }

/* --- a dotted field behind the hero, like the app's shell ------------------ */
.hero::after { z-index: 0; }
.hero-dots {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgb(79 70 229 / .16) 1px, transparent 1px);
  background-size: 22px 22px;
  /* Faded at the edges, so it reads as texture rather than as a grid. */
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 78%);
}

/* --- cards that respond ---------------------------------------------------- */
.plan {
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
/* The one gesture the dark grid allows itself. */
.feature-item svg { transition: transform .3s var(--ease); }
.feature-item:hover svg { transform: translateY(-3px) scale(1.1); }

/* --- the eyebrow gets a rule, so it reads as a label ----------------------- */
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow::after {
  content: ""; height: 1px; width: 42px; flex: none;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: .5;
}

/* --- the CTA sits on brand, not on white ----------------------------------- */
.cta {
  position: relative; overflow: hidden;
  background: var(--navy); color: #e2e8f0; border-top: 0;
}
.cta h2 { color: #fff; }
.cta .lede { color: #cbd5e1; }
.cta .hero-note { color: #64748b; }
.cta::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  top: -260px; left: 50%; transform: translateX(-50%);
  background: rgb(79 70 229 / .28); filter: blur(90px); pointer-events: none;
}
.cta .wrap { position: relative; }
.cta .btn-primary { box-shadow: 0 14px 40px -16px rgb(79 70 229 / 1); }


/* ============================================================================
 * Design pass two: the details.
 *
 * Each of these is small on its own; together they are the difference between
 * a page that was assembled and a page that was made. Ordered from fixes to
 * flourishes, because one of them is a genuine bug: anchors were hiding under
 * the sticky header.
 * ========================================================================= */

/* The nav jumps to #pricing, and without this the sticky header sits on top of
 * the section heading it just jumped to. Not a flourish: the header is 68px
 * tall, and every anchor landed 68px too high. */
html { scroll-padding-top: 84px; }

::selection { background: var(--primary); color: #fff; }

/* Headlines break where the sentence does, not where the box happens to end.
 * Both properties are ignored by browsers that predate them. */
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

/* The primary button hovers the way the app's does: a shade darker, a pixel
 * up, nothing sweeping across it. The travelling shine tried its luck here
 * and read as a glitch. */

/* --- nav links underline themselves -------------------------------------- */
.nav-links a { position: relative; padding-bottom: 2px; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  border-radius: 2px; background: var(--primary);
  transition: right .22s var(--ease);
}
.nav-links a:hover::after { right: 0; }

/* --- the mock has depth ----------------------------------------------------
 * A gradient border instead of a flat one, a slight perspective lean that
 * straightens when you reach for it, and a sheen across the top edge. The
 * lean is what makes it read as an object rather than a screenshot.
 */
.mock {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(160deg, rgb(79 70 229 / .45), var(--border) 40%, rgb(8 145 178 / .35)) border-box;
}
@media (min-width: 940px) {
  .hero-visual .mock {
    transform: perspective(1200px) rotateY(-7deg) rotateX(2deg);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  }
  .hero-visual:hover .mock {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgb(79 70 229 / .12);
  }
}

/* --- the dark sections carry the same dotted field as the hero ------------- */
.section-difference, .cta, .section-features { position: relative; overflow: hidden; }
.section-difference::after, .cta::after, .section-features::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(165 180 252 / .14) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 65% 70% at 50% 30%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 65% 70% at 50% 30%, #000 25%, transparent 75%);
}
.section-difference .wrap, .cta .wrap, .section-features .wrap { position: relative; z-index: 1; }
.section-difference::before {
  content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  top: -240px; right: -120px; background: rgb(79 70 229 / .22); filter: blur(90px);
  pointer-events: none;
}

/* --- the footer opens on a brand hairline ---------------------------------- */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgb(99 102 241 / .9) 30%, rgb(8 145 178 / .7) 70%, transparent);
}

/* --- small correctness ------------------------------------------------------ */
.plan-price strong { font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  /* display:block, because the base rule makes this a grid and `columns` is
   * silently ignored on grid containers -- the two-column contents list
   * never rendered until this override existed. */
  .legal-toc ol { display: block; columns: 2; column-gap: 36px; }
  .legal-toc li { break-inside: avoid; margin-bottom: 5px; }
}
.hero-inner { z-index: 1; }

/* --- formats as a wall of files --------------------------------------------
 * Each family is a little file: monospace extension on a tab with a folded
 * corner, the folded corner being what makes it read as a document rather
 * than as one more pill. The fold is a clip-path notch plus a triangle laid
 * into it; a border would be clipped away at the cut, so the tab has none.
 */
.format-grid {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .format-grid { grid-template-columns: repeat(4, 1fr); } }
.format-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.format-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.format-card h3 { margin: 0 0 2px; font-size: 1rem; }
.format-card p {
  margin: 0; color: var(--subtle);
  font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.78rem;
}
.format-badge {
  position: relative; display: inline-block; margin-bottom: 14px;
  padding: 5px 12px;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: 0.8rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px 0 8px 8px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color .2s, color .2s;
}
.format-badge::after {
  content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px;
  background: rgb(79 70 229 / .3);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.format-card:hover .format-badge { background: var(--primary); color: #fff; }

/* --- the language row in the footer ---------------------------------------- */
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 28px;
}
/* The app's languages glyph in front of the row: the one wordless way to say
 * what these seven links are. */
.footer-langs-group { display: flex; align-items: center; gap: 12px; color: #64748b; }
.site-footer .footer-langs {
  /* The compound selector, or this loses to `.site-footer ul`'s grid. */
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.88rem;
}
.site-footer .footer-langs a { color: #94a3b8; }
.site-footer .footer-langs a:hover { color: #fff; }
.site-footer .footer-langs a[aria-current] { color: #fff; font-weight: 650; }

/* --- the hero scene ---------------------------------------------------------
 * One 8-second clock, three actors. The terminal types `git push` (2-12%),
 * the editor reacts: the source row rewrites itself (18-34%), the fuzzy chips
 * land row by row (34-44% staggered), and the sidebar's per-language progress
 * falls in the same beat. One scene with one clock reads as a product; three
 * animations with three clocks read as a screensaver.
 */
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -12% -8%;
  background:
    radial-gradient(420px 300px at 28% 18%, rgb(79 70 229 / .22), transparent 72%),
    radial-gradient(460px 340px at 76% 84%, rgb(8 145 178 / .16), transparent 72%);
  filter: blur(26px);
  z-index: 0; pointer-events: none;
}
.mock { position: relative; z-index: 1; }

/* The trigger: a small dark terminal overlapping the editor's top-right
 * corner. In flow with a negative bottom margin, never absolute -- every
 * floated attempt ended up reaching into the headline column at some width.
 * Its text is genuine git output, which no locale translates. */
.mock-terminal {
  position: relative; z-index: 2;
  width: min(280px, 80%);
  margin: 0 12px -20px auto;
  background: #0f172a;
  border: 1px solid rgb(148 163 184 / .28);
  border-radius: 12px;
  box-shadow: 0 18px 36px -18px rgb(15 23 42 / .55);
  padding: 10px 14px 12px;
  transform: rotate(1.2deg);
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: 0.76rem;
}
.mt-bar { display: flex; gap: 5px; padding-bottom: 8px; }
.mt-bar span { width: 8px; height: 8px; border-radius: 50%; background: rgb(148 163 184 / .35); }
.mock-terminal pre { margin: 0; display: grid; gap: 3px; font: inherit; }
.mt-line { color: #e2e8f0; white-space: nowrap; }
.mt-out { color: #94a3b8; white-space: nowrap; }

/* The window chrome earns a branch: the card is a working copy, not a form.
 * Branch and filename sit LEFT, by the traffic dots -- the right end of the
 * bar is where the terminal overlaps, and a filename under a terminal is a
 * filename nobody can read. */
.mock-bar .mock-branch {
  width: auto; height: auto; margin-left: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary-soft); border-radius: 999px; padding: 2px 9px;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: 0.68rem; font-weight: 600; color: var(--primary);
}

/* Editor body: the app's language sidebar folded into the window. */
.mock-body { display: flex; gap: 14px; }
.mock-side {
  /* flex-start, not stretch: stretched, the panel trails a long empty strip
   * under the three languages and the card's corner looks unfinished. */
  flex: none; width: 122px; align-self: flex-start;
  display: grid; gap: 12px; align-content: start;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 10px;
}
.mock-main { flex: 1; min-width: 0; }
.ms-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 8px; }
.ms-row .mock-flag { font-size: 0.62rem; padding: 1px 5px; }
.ms-num {
  justify-self: end; position: relative;
  font-size: 0.7rem; font-weight: 650; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ms-num b, .ms-num u { text-decoration: none; font-weight: inherit; }
/* Same cell, so the 100 % -> 64 % swap does not reflow the sidebar. */
.ms-num u { position: absolute; inset: 0; text-align: right; color: #92400e; }
.ms-bar {
  grid-column: 1 / -1; height: 5px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.ms-bar i {
  display: block; height: 100%; border-radius: inherit;
  width: var(--drop);
  background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .mt-line {
    max-width: 11ch; overflow: hidden;
    animation: term-type 8s steps(10) infinite;
  }
  .mt-caret {
    display: inline-block; width: 7px; height: 1.05em; margin-left: 2px;
    background: #e2e8f0; vertical-align: text-bottom;
    animation: term-caret 8s steps(1) infinite;
  }
  .mt-out { animation: term-out 8s var(--ease) infinite; }
  .ms-bar i {
    width: 100%;
    background: linear-gradient(90deg, var(--primary), #0891b2);
    animation: bar-drop 8s var(--ease) infinite calc(var(--step) * .28s);
  }
  /* The numbers ride the exact same keyframes as the chips beside them. */
  .ms-num b { animation: chip-out 8s var(--ease) infinite calc(var(--step) * .28s); }
  .ms-num u { animation: chip-in 8s var(--ease) infinite calc(var(--step) * .28s); }
}
@media (prefers-reduced-motion: reduce) {
  .mt-caret { display: none; }
  .ms-num b { visibility: hidden; }
}

/* The push happens first (2-12%), the output lands (14-17%), and only then
 * does the editor start reacting at 18% -- cause before effect. */
@keyframes term-type {
  0%, 2%    { max-width: 0; }
  12%, 100% { max-width: 11ch; }
}
@keyframes term-caret {
  0%, 15%   { opacity: 1; }
  16%, 100% { opacity: 0; }
}
@keyframes term-out {
  0%, 14%  { opacity: 0; transform: translateY(3px); }
  17%, 96% { opacity: 1; transform: none; }
  100%     { opacity: 0; transform: translateY(3px); }
}
/* Full and indigo while the chips say 100 %, dropped and amber while they say
 * fuzzy, back for the loop. --drop differs per language because real projects
 * are never equally finished. */
@keyframes bar-drop {
  0%, 36%  { width: 100%; background: linear-gradient(90deg, var(--primary), #0891b2); }
  44%, 92% { width: var(--drop); background: var(--accent); }
  100%     { width: 100%; }
}

@media (max-width: 599px) {
  /* No room for two columns inside the card: the sidebar becomes a three-up
   * strip under the rows and keeps the whole story on screen. */
  .mock-body { flex-direction: column; }
  .mock-side { order: 2; width: auto; grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* --- pricing: the banner and the comparison --------------------------------
 * The banner is the old footnote promoted: every feature in every plan is the
 * offer, so it opens the section instead of apologising at the bottom of it.
 * The comparison draws two list prices as two bars; the drama is the data.
 */
.allin {
  display: flex; gap: 16px; align-items: flex-start;
  margin: 0 0 26px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, rgb(79 70 229 / .5), var(--border) 45%, rgb(8 145 178 / .4)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.allin-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary);
}
.allin h3 { margin: 2px 0 4px; font-size: 1.02rem; }
.allin p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.compare {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.compare h3 { margin: 0 0 2px; font-size: 1.02rem; }
.cmp-scenario { margin: 0 0 16px; color: var(--muted); font-size: 0.92rem; }
/* The tier switch: four hidden radios, a segmented control of labels, and
 * visibility rules. No script -- with scripting off the checked default
 * (Small) simply stays. */
.cmp-radio { position: absolute; opacity: 0; pointer-events: none; }
.cmp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.cmp-head h3 { margin: 0; }
.cmp-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
}
.cmp-tabs label {
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  transition: background-color .15s, color .15s;
}
.cmp-tabs label:hover { color: var(--fg); }
.compare:has(.cmp-radio:focus-visible) .cmp-tabs { outline: 2px solid var(--primary); outline-offset: 2px; }
#cmp-tier-0:checked ~ .cmp-head label[for="cmp-tier-0"],
#cmp-tier-1:checked ~ .cmp-head label[for="cmp-tier-1"],
#cmp-tier-2:checked ~ .cmp-head label[for="cmp-tier-2"],
#cmp-tier-3:checked ~ .cmp-head label[for="cmp-tier-3"] {
  background: var(--primary); color: #fff;
}

/* Everything tier-scoped hides until its radio says otherwise. */
.compare [data-tier] { display: none; }
#cmp-tier-0:checked ~ .cmp-scenario[data-tier="0"],
#cmp-tier-1:checked ~ .cmp-scenario[data-tier="1"],
#cmp-tier-2:checked ~ .cmp-scenario[data-tier="2"],
#cmp-tier-3:checked ~ .cmp-scenario[data-tier="3"] { display: block; }
#cmp-tier-0:checked ~ .cmp-rows [data-tier="0"],
#cmp-tier-1:checked ~ .cmp-rows [data-tier="1"],
#cmp-tier-2:checked ~ .cmp-rows [data-tier="2"],
#cmp-tier-3:checked ~ .cmp-rows [data-tier="3"] { display: inline; }

.cmp-rows { margin-top: 4px; }
.cmp-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 0 12px;
  padding: 10px 12px 12px;
  border-radius: 10px;
}
.cmp-row + .cmp-row { margin-top: 2px; }
.cmp-row-us { background: var(--primary-soft); }
.cmp-name { font-size: 0.92rem; font-weight: 650; color: var(--fg); }
.cmp-name b { color: var(--primary); font-weight: inherit; }
.cmp-plan { margin-left: 8px; font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.cmp-price-cell { justify-self: end; }
.cmp-price { font-size: 1.06rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* A hairline instead of a bar: the proportion without the furniture. */
.cmp-spark {
  grid-column: 1 / -1; align-self: end;
  height: 3px; margin-top: 7px; border-radius: 999px;
  background: #94a3b8;
}
.cmp-spark[data-tier] { display: none; }
#cmp-tier-0:checked ~ .cmp-rows .cmp-spark[data-tier="0"],
#cmp-tier-1:checked ~ .cmp-rows .cmp-spark[data-tier="1"],
#cmp-tier-2:checked ~ .cmp-rows .cmp-spark[data-tier="2"],
#cmp-tier-3:checked ~ .cmp-rows .cmp-spark[data-tier="3"] { display: block; }
.cmp-spark.cmp-us { background: linear-gradient(90deg, var(--primary), #0891b2); }
.compare .note { margin-top: 14px; margin-bottom: 0; }

/* --- the difference, in three numbers ---------------------------------------
 * No drawing: the hero already performs the product, and this section's
 * claims are about the business model. A very large numeral, a bold label,
 * one quiet line. The hues echo the feature grid's spectrum so the two dark
 * sections read as one family.
 */
.diff-stats {
  display: grid; gap: 32px; grid-template-columns: 1fr;
  margin-top: 2.6rem;
}
@media (min-width: 760px) { .diff-stats { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.diff-stat strong {
  display: block;
  font-family: "Space Grotesk Variable", "Space Grotesk", sans-serif;
  font-size: clamp(2.7rem, 5vw, 3.6rem); font-weight: 700;
  line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ds, #a5b4fc);
}
.diff-stat:nth-child(2) { --ds: #5eead4; }
.diff-stat:nth-child(3) { --ds: #fcd34d; }
.diff-stat span { display: block; margin-top: 8px; color: #fff; font-weight: 650; font-size: 1.02rem; }
.diff-stat p { margin: 6px 0 0; color: #94a3b8; font-size: 0.9rem; max-width: 34ch; }
.section-difference .note { color: #64748b; }
