/* ─────────────────────────────────────────────────────────────────────────
   alexvestea.com — page styles.
   Loads after nocturne.css and uses only its tokens. No build step.
   Values come from the design handoff prototype; classes replace the
   prototype's inline styles so the HTML stays readable.
   ───────────────────────────────────────────────────────────────────────── */

/* — self-hosted type. Both families are variable fonts covering 400–500,
     so one file per subset serves both weights. No third-party request. — */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1160px;
}

/* — page ground — */
body {
  min-height: 100vh;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 680px at 84% -180px,
      color-mix(in srgb, var(--color-accent-900) 75%, transparent), transparent 60%),
    radial-gradient(1000px 760px at -10% 100%,
      color-mix(in srgb, black 30%, transparent), transparent 55%),
    var(--color-bg);
  background-attachment: fixed;
}
a { text-decoration: none; }
a:hover { color: var(--color-accent-300); }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* — nav — */
.nav {
  padding-inline: var(--gutter);
  max-width: var(--measure);
  margin: 0 auto;
}

/* — the kicker: a 44px accent rule plus an uppercase label.
     One grammar, used for every section opener. — */
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--kicker-gap, 26px);
}
.kicker::before {
  content: '';
  display: inline-block;
  width: 44px;
  height: 1px;
  flex: none;
  background: var(--color-accent);
}
.kicker span {
  font: 400 13px/14px var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.kicker.tnum span { font-feature-settings: 'tnum' 1; }

/* — shared type — */
.display {
  font: 500 clamp(38px, 5vw, 64px)/1.1 var(--font-heading);
  letter-spacing: -0.015em;
  margin: 0 0 0 -0.06em;
}
.standfirst {
  font-size: 17px;
  line-height: 28px;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
  margin: 24px 0 0;
}
.keycap {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--color-neutral-700);
  border-radius: 4px;
  font: 500 0.86em/1.5 var(--font-mono);
  color: var(--color-neutral-300);
}
.mono { font-family: var(--font-mono); }
.tnum { font-feature-settings: 'tnum' 1; }

/* — media placeholders. Replace the inner text with <video>/<img>;
     the frame keeps its aspect ratio either way. — */
.frame {
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--color-neutral-900), var(--color-bg));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--color-neutral-500);
  font-size: 12px;
  line-height: 20px;
}
.frame-4x3 { aspect-ratio: 4 / 3; }
.frame-video {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--color-neutral-900) 0%, var(--color-bg) 72%);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.frame video, .frame img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* — footer — */
.site-footer {
  padding: 64px 0 48px;
  font-size: 13px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* ── home ───────────────────────────────────────────────────────────────── */

.page-head { padding: 88px 0 34px; max-width: 46ch; }

.featured { padding: 12px 0 8px; }
.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 28px clamp(24px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 720px) {
  .featured-grid { grid-template-columns: minmax(0, 1fr); }
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.post-date {
  font: 500 12px/1 var(--font-body);
  letter-spacing: 0.06em;
  color: var(--color-neutral-500);
  font-feature-settings: 'tnum' 1;
}
.post-title {
  font: 500 clamp(27px, 3.1vw, 38px)/1.16 var(--font-heading);
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 26ch;
}
.post-title a { color: inherit; }
.post-title a:hover { color: var(--color-accent-300); }
.dek {
  font-size: 16px;
  line-height: 28px;
  max-width: 60ch;
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
  margin: 16px 0 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 0;
  flex-wrap: wrap;
}
/* The dot + accent price mark a post that carries a purchase.
   Apply to those entries only. */
.has-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-neutral-500);
}
.has-download::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent);
}
.has-download .price {
  color: var(--color-accent-300);
  font-feature-settings: 'tnum' 1;
}

/* — the dated list, for when a second post exists (treatment A) — */
.post-list { margin: 46px 0 0; }
.post-list a {
  display: flex;
  align-items: baseline;
  gap: 4px 20px;
  flex-wrap: wrap;
  padding: 8px 0;
  line-height: 40px;
  color: inherit;
  background: linear-gradient(to right, transparent,
    color-mix(in srgb, var(--color-text) 8%, transparent) 48px calc(100% - 48px),
    transparent) no-repeat bottom / 100% 1px;
}
.post-list a:hover .pl-title { color: var(--color-accent-300); }
.pl-date {
  flex: 0 0 100px;
  font-size: 12.5px;
  color: var(--color-neutral-500);
  font-feature-settings: 'tnum' 1;
}
.pl-title {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-topic { flex: 0 0 auto; margin-left: auto; font-size: 12px; color: var(--color-neutral-600); }

/* ── post ───────────────────────────────────────────────────────────────── */

.post-header { padding: 74px 0 0; max-width: 880px; }
.post-header .display {
  font: 500 clamp(36px, 4.9vw, 62px)/1.11 var(--font-heading);
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.post-header .standfirst {
  font-size: 18px;
  line-height: 30px;
  max-width: 56ch;
  color: var(--color-text);
  margin: 28px 0 0;
}

/* The offer line — deliberately NOT the kicker grammar; the header already
   used it and repeating it reads as a stutter. This catches the reader who
   leaves before the buy block. */
.offer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 22px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  margin: 24px 0 0;
  padding: 9px 14px;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
}
.offer .price {
  font: 500 15px/1 var(--font-heading);
  color: var(--color-text);
  font-feature-settings: 'tnum' 1;
}
.offer .divider { width: 1px; height: 16px; background: var(--color-neutral-800); }

figure.loop { margin: 42px 0 0; }
figure.loop figcaption {
  font-size: 13px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin: 12px 0 0;
}

/* The one saturated field on the site. Full-bleed, and it appears ONCE —
   repeating it anywhere else halves its force. */
.figures {
  margin: 54px 0 0;
  padding: 44px 0;
  background:
    radial-gradient(900px 420px at 85% -40%,
      color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%),
    var(--color-section);
}
.figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
}
.figure-value {
  font: 500 clamp(32px, 3.4vw, 48px)/1.12 var(--font-heading);
  margin: 0 0 0 -0.055em;
  color: var(--color-text);
  font-feature-settings: 'tnum' 1;
}
.figure-label {
  font: 400 13px/14px var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 64%, transparent);
  margin: 14px 0 0;
}

.prose { max-width: 62ch; }
.prose p {
  font-size: 17px;
  line-height: 30px;
  color: var(--color-text);
  margin: 0;
}
.prose p + p {
  margin: 20px 0 0;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}

.section { padding: 56px 0 0; }
.section-lead {
  font-size: 16px;
  line-height: 28px;
  max-width: 60ch;
  color: color-mix(in srgb, var(--color-text) 76%, transparent);
  margin: 18px 0 0;
}
h2.section-title {
  font: 500 clamp(25px, 2.7vw, 33px)/1.26 var(--font-heading);
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 28ch;
}
h2.sub { font: 500 20px/28px var(--font-heading); margin: 0; }

.scroller { overflow-x: auto; }
.table-note {
  font-size: 13px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin: 14px 0 0;
  max-width: 62ch;
}
.them { color: color-mix(in srgb, var(--color-text) 70%, transparent); }

/* The proof table must outrank the comparison table visually — hence the
   2px accent cap and its own ground. */
.proof {
  margin: 30px 0 0;
  overflow-x: auto;
  border-top: 2px solid var(--color-accent-700);
  border-radius: 2px 2px var(--radius-md) var(--radius-md);
  background: color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
  padding: 4px clamp(12px, 2vw, 22px) 10px;
  font-feature-settings: 'tnum' 1;
}
.proof .table { font-size: 14.5px; }
.proof .table th { color: var(--color-accent); }
.proof .verifies {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-neutral-300);
}

/* — the one inline commerce card — */
.buy {
  border: 1px solid var(--color-accent-700);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--color-accent-900) 70%, transparent), var(--color-surface) 78%);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px 40px;
  align-items: end;
}
.buy-version {
  font: 400 12px/14px var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.buy h3 {
  font: 500 clamp(24px, 2.6vw, 30px)/1.22 var(--font-heading);
  margin: 14px 0 0;
  max-width: 20ch;
}
.buy-body {
  font-size: 15px;
  line-height: 26px;
  max-width: 46ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  margin: 12px 0 0;
}
.buy-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.buy-price {
  font: 500 clamp(32px, 3.4vw, 44px)/1 var(--font-heading);
  margin: 0;
  font-feature-settings: 'tnum' 1;
}
.buy-price span { font-size: 15px; color: var(--color-neutral-500); }
.fine-print {
  font-size: 12.5px;
  line-height: 22px;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
  margin: 2px 0 0;
  max-width: 40ch;
}

.cols {
  padding: 52px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px 40px;
}
.cols p {
  font-size: 15px;
  line-height: 26px;
  color: color-mix(in srgb, var(--color-text) 76%, transparent);
  margin: 14px 0 0;
  max-width: 46ch;
}
.symbols { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.symbols .tag { font-family: var(--font-mono); }

.delivery {
  padding: 20px;
  gap: 12px;
  background: color-mix(in srgb, var(--color-neutral-900) 72%, transparent);
  box-shadow: var(--shadow-sm);
}
.delivery p {
  font-size: 14px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
  margin: 0;
  max-width: none;
}
.delivery-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-sm);
  font: 400 12px/1.4 var(--font-mono);
  color: var(--color-neutral-400);
}
.delivery-file span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa { display: flex; flex-direction: column; margin: 18px 0 0; }
.qa > div {
  padding: 18px 0;
  background: linear-gradient(to right, transparent,
    color-mix(in srgb, var(--color-text) 8%, transparent) 48px calc(100% - 48px),
    transparent) no-repeat bottom / 100% 1px;
}
.qa > div:last-child { background: none; }
.qa dt, .qa .q { font: 500 15px/24px var(--font-heading); margin: 0; }
.qa dd, .qa .a {
  font-size: 14.5px;
  line-height: 26px;
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
  margin: 8px 0 0;
}

/* — command blocks. Used by open-source posts where "run it yourself" is
     the equivalent of the buy block. — */
.code {
  margin: 18px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-neutral-900) 72%, transparent);
  font: 400 13px/24px var(--font-mono);
  color: var(--color-neutral-300);
  tab-size: 2;
}
.code .c { color: var(--color-neutral-600); }

/* — a way back at the TOP of a long post, not only in the footer — */
.back {
  display: inline-block;
  font-size: 13px;
  line-height: 24px;
  color: var(--color-neutral-500);
  margin: 0 0 26px;
}
.back:hover { color: var(--color-accent-300); }

/* — features variant of the full-bleed band. Same ground and grid, but the
     content is short names + a line of prose rather than big numerals, so the
     display size comes down and the label loses its uppercase/tracking. — */
.figures.features .figures-grid { gap: 28px clamp(24px, 4vw, 48px); }
.features .figure-value {
  font: 500 clamp(19px, 2vw, 23px)/1.28 var(--font-heading);
  letter-spacing: -0.01em;
  margin: 0;
}
.features .figure-label {
  font: 400 14px/23px var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  margin: 10px 0 0;
}

/* — numbered walkthrough. Accent ring + tabular numeral, same grammar as the
     kicker bar: the accent is a line or a mark, never a flood. — */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 26px 0 0;
  padding: 0;
  max-width: 62ch;
}
.steps li { position: relative; padding-left: 46px; margin-top: 24px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent-700);
  border-radius: 50%;
  font: 500 12px/1 var(--font-mono);
  color: var(--color-accent);
  font-feature-settings: 'tnum' 1;
}
.steps strong {
  display: block;
  font: 500 16px/24px var(--font-heading);
  margin-bottom: 5px;
}
.steps p {
  font-size: 15px;
  line-height: 26px;
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
  margin: 0;
}

/* Screen-reader-only. An empty <th> is fine visually but leaves the row-label
   column unnamed for anyone navigating the table by voice or braille. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* — measurement chart. Inline SVG, tokens only, scales with the column. — */
.chart {
  margin: 30px 0 0;
  padding: 22px 20px 14px;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
}
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption {
  font-size: 13px;
  line-height: 22px;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
  margin: 16px 0 0;
  max-width: 62ch;
}
.chart .lbl { font: 400 12px/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.chart .num { font: 400 11px/1 var(--font-mono); }

/* — screenshot carousel. Scroll-snap, no JavaScript required: a carousel that
     depended on script would contradict the whole argument, so carousel.js is
     an enhancement only (the page ships script-src 'self', no inline script).
     Dots are plain anchors; the browser scrolls the nearest scrollable
     ancestor, so they work with scripting disabled. — */
.carousel { margin: 42px 0 0; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-neutral-700) transparent;
}
.carousel-track:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.carousel-track > figure {
  scroll-snap-align: center;
  min-width: 0;
  margin: 0;
  scroll-margin: 0;
}
.carousel-track img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--color-bg);
}
.carousel-track figcaption {
  font-size: 13px;
  line-height: 22px;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
  margin: 14px 0 0;
  max-width: 62ch;
}
.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.carousel-dots a {
  font-size: 12.5px;
  line-height: 1;
  padding: 7px 13px;
  border: 1px solid var(--color-neutral-800);
  border-radius: 999px;
  color: var(--color-neutral-400);
}
.carousel-dots a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.carousel-hint {
  font-size: 12px;
  color: var(--color-neutral-600);
  margin: 16px 0 0;
  align-self: center;
}

/* Arrows are anchors to the neighbouring slide id — the browser scrolls the
   track, so prev/next works with scripting disabled. Swipe and trackpad
   still work underneath; the scrollbar is hidden now that arrows lead. */
.carousel-track { scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }

.slide-media { position: relative; }
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-neutral-700);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(6px);
  color: var(--color-neutral-300);
}
.nav-arrow.prev { left: 14px; }
.nav-arrow.next { right: 14px; }
.nav-arrow:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
}
.nav-arrow svg { width: 18px; height: 18px; display: block; }
@media (max-width: 560px) {
  .nav-arrow { width: 38px; height: 38px; }
  .nav-arrow.prev { left: 8px; }
  .nav-arrow.next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
}

/* home featured image */
.card-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
}
.card-img:hover img { border-color: var(--color-accent-700); }
