/* ==========================================================================
   Commerce Titans — styles.css
   Vanilla CSS, no frameworks. Edit the tokens in :root to restyle the site.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #24224D;
  --navy-hover: #3B3878;
  --gold: #F2B33D;
  --tint: #EEEEF6;        /* light navy tint for soft backgrounds */
  --tint-line: #CFCDE6;
  --on-navy-muted: #D9D8EC;

  /* Neutrals */
  --ink: #0E1116;
  --text: #22262D;
  --muted: #4A5059;
  --subtle: #5C626B;
  --faint: #B5BAC2;
  --line: #ECEDF0;
  --field: #D5D8DE;
  --bg: #FFFFFF;

  /* Type */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --wide: 1200px;
  --narrow: 880px;
  --reading: 680px;
  --gutter: 24px;
  --radius: 16px;
  --radius-lg: 28px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-hover); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }
.container--reading { max-width: calc(var(--reading) + var(--gutter) * 2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-weight: 700; font-size: 20px;
  color: var(--ink); text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px;
}

.btn-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* ---------- Subscribe (beehiiv) ---------- */
/* The beehiiv script renders its form inside .subscribe. min-height avoids layout jump while it loads. */
.subscribe { max-width: 560px; min-height: 64px; }
.subscribe-note { font-size: 14px; color: var(--subtle); margin-top: 12px; }
html.is-subscribed #subscribe,
html.is-subscribed .hero .subscribe,
html.is-subscribed .hero .subscribe-note,
html.is-subscribed a[href="#subscribe"] {
  display: none;
}

/* ---------- Home: hero ---------- */
.hero { padding: 56px 0 88px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero-art { flex: 1 1 380px; min-width: 0; }

.display {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(transparent 60%, var(--gold) 60%, var(--gold) 90%, transparent 90%);
  padding: 0 4px;
}

.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 580px; }

/* ---------- Home: proof strip ---------- */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.proof-item strong { display: block; font-family: var(--font-serif); font-size: 30px; line-height: 1.2; }
.proof-item span { font-size: 15px; color: var(--subtle); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section--tight-top { padding-top: 0; }
.section-title { font-size: clamp(32px, 4vw, 50px); line-height: 1.08; max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 32px; }

/* ---------- Home: value ---------- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px; }
.value-item { display: flex; flex-direction: column; gap: 14px; }
.value-item h3 { font-family: var(--font-sans); font-size: 21px; font-weight: 600; letter-spacing: 0; }
.value-item p { color: var(--muted); }
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px; background: var(--tint);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Home: frameworks list ---------- */
.fw-list { display: flex; flex-direction: column; gap: 12px; }
.fw-row {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center;
  padding: 26px 32px; border-radius: 20px; border: 1.5px solid var(--line);
  color: var(--ink); text-decoration: none;
}
a.fw-row { background: var(--tint); border-color: var(--tint); }
a.fw-row:hover { border-color: var(--navy); color: var(--ink); }
.fw-num { font-family: var(--font-serif); font-size: 38px; font-weight: 700; color: var(--navy); line-height: 1; }
.fw-row--soon .fw-num { color: var(--faint); }
.fw-title { flex: 999 1 420px; font-size: 20px; font-weight: 600; line-height: 1.35; }
.fw-action { font-size: 15px; font-weight: 600; color: var(--navy); }
.fw-row--soon .fw-action { font-weight: 400; color: var(--subtle); }

/* ---------- Home: about ---------- */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.about-photo {
  flex: 0 0 200px; width: 200px; height: 200px; border-radius: var(--radius-lg);
  background: var(--tint); object-fit: cover; object-position: center;
  display: block;
}
.about-copy { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.about-copy h2 { font-size: 32px; }
.about-copy p { font-size: 18px; color: var(--muted); max-width: 640px; }

/* ---------- CTA band (navy) ---------- */
.cta-band {
  background: var(--navy); color: #fff; border-radius: 32px;
  padding: 72px 32px; display: flex; flex-direction: column; gap: 18px;
  align-items: center; text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(30px, 4vw, 52px); max-width: 760px; }
.cta-band .gold { color: var(--gold); }
.cta-band p { color: var(--on-navy-muted); font-size: 17px; }
.cta-band .subscribe {
  width: 100%; background: #fff; border-radius: var(--radius); padding: 8px;
}

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; }
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: 14px; color: var(--subtle);
}
.footer-links { display: flex; gap: 20px; }

/* ---------- Article ---------- */
.article-header { padding: 56px 0 40px; }
.article-header .stack { gap: 20px; }
.article-title { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.12; letter-spacing: -0.015em; }
.article-summary { font-size: 21px; line-height: 1.5; color: var(--muted); }
.article-meta { font-size: 15px; color: var(--subtle); }

.cover { margin: 0 auto 48px; max-width: calc(var(--narrow) + var(--gutter) * 2); padding: 0 var(--gutter); }
.cover img,
.cover .cover-placeholder {
  width: 100%; border-radius: 20px; background: var(--tint);
}
.cover img { height: auto; display: block; }
.cover .cover-placeholder { aspect-ratio: 16 / 9; object-fit: cover; }
.cover-placeholder { display: flex; align-items: center; justify-content: center; color: var(--subtle); font-size: 15px; text-align: center; padding: 16px; }

.prose { font-size: 19px; line-height: 1.75; color: var(--text); }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: 30px; line-height: 1.2; margin-top: 44px; }
.prose h3 { font-size: 23px; line-height: 1.3; margin-top: 32px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose blockquote {
  margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold);
  font-family: var(--font-serif); font-size: 22px; color: var(--ink);
}

.author-line { font-size: 16px; color: var(--muted); }
.author-line strong { color: var(--ink); }

.up-next { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.up-next h2 { font-size: 24px; }
.up-next p { font-size: 17px; font-weight: 600; line-height: 1.4; }
.up-next .soon { font-weight: 400; font-size: 14px; color: var(--subtle); }

/* ---------- Hub ---------- */
.hub-header { padding: 64px 0 32px; }
.hub-header .stack { gap: 14px; }
.hub-title { font-size: clamp(40px, 5vw, 60px); }
.hub-list { border-top: 1px solid var(--line); }
.hub-item {
  display: flex; flex-direction: column; gap: 8px; padding: 32px 0;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.hub-item:hover .hub-item-title { text-decoration: underline; text-decoration-thickness: 2px; }
.hub-item-meta { font-size: 14px; color: var(--subtle); }
.hub-item-title { font-family: var(--font-serif); font-size: 28px; font-weight: 700; line-height: 1.25; }
.hub-item--soon .hub-item-title { color: var(--subtle); }
.hub-item-summary { font-size: 17px; color: var(--muted); }
.hub-item-action { font-size: 15px; font-weight: 600; color: var(--navy); }

/* ---------- Simple centered pages (thank-you, 404) ---------- */
.center-page { min-height: 60vh; display: flex; align-items: center; padding: 80px 0; }
.center-page .stack { gap: 18px; align-items: flex-start; }
.center-page h1 { font-size: clamp(40px, 5vw, 60px); }
.center-page p { font-size: 19px; color: var(--muted); max-width: 560px; }
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px;
  background: var(--navy); color: #fff; border-radius: 12px; font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--navy-hover); color: #fff; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .hero { padding: 32px 0 48px; }
  .hero-grid { gap: 36px; }
  .lead { font-size: 17px; }
  .section { padding: 64px 0; }
  .section--tight-top { padding-top: 0; }
  .value-grid { gap: 32px; }
  .fw-row { padding: 22px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .fw-num { font-size: 30px; }
  .fw-title { flex-basis: auto; font-size: 17px; }
  .about { gap: 20px; }
  .about-photo { flex-basis: 112px; width: 112px; height: 112px; border-radius: 22px; }
  .about-copy h2 { font-size: 24px; }
  .about-copy p { font-size: 15px; }
  .cta-band { border-radius: 24px; padding: 44px 20px; }
  .article-summary { font-size: 17px; }
  .prose { font-size: 17px; line-height: 1.7; }
  .prose h2 { font-size: 24px; margin-top: 36px; }
  .hub-item-title { font-size: 22px; }
}

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