/* Landing page (index.html) only. Self-contained: the shared style.css centres
   everything in one narrow card, which is the wrong shape for a multi-section page. */

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

:root {
  --bg: #0f0f0f;
  --surface: #161616;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --soft: #b4b0a8;
  --muted: #8b8b8b;
  --accent: #c8b89a;
  --amber: #d9a441;
  --error: #e07070;
  --success: #7ec8a0;
  --mono: 'IBM Plex Mono', 'Menlo', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  --label: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* The drifting-envelope canvas stays, but quieter, so it never fights the copy. */
#bg-canvas { opacity: 0.4; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 35%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
  padding-top: 112px;
  padding-bottom: 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(200,184,154,0.8);
}

h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
h1 .hl { color: var(--accent); }

.lede {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--soft);
  max-width: 34rem;
  margin-bottom: 18px;
}

/* Badges (open source, then the latest issue): sit right under the promise, above the form. */
.pills { display: flex; flex-direction: column; gap: 10px; max-width: 34rem; margin-bottom: 26px; }
.os-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(200,184,154,0.07);
  border: 1px solid rgba(200,184,154,0.4);
  color: var(--soft);
  font-size: 0.78rem; line-height: 1.45;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.os-pill svg { flex-shrink: 0; color: var(--accent); }
.os-pill span:not(.os-pill__arrow) { flex: 1; min-width: 0; }
.os-pill b { color: var(--text); font-weight: 700; }
.os-pill__arrow { color: var(--accent); }
.os-pill:hover { border-color: var(--accent); background: rgba(200,184,154,0.12); }
.os-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ── Signup ───────────────────────────────────────────────────────────────── */
.signup { max-width: 34rem; }

.signup__row { display: flex; gap: 10px; }

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  background: #0a0a0a;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 14px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup input[type="email"]::placeholder { color: #666; }
.signup input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,184,154,0.16);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--label);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: none;
  padding: 14px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, box-shadow 0.2s;
}
.btn:hover { opacity: 0.93; box-shadow: 0 0 22px rgba(200,184,154,0.3); }
.btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.signup__opts { margin-top: 14px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.5;
}
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px; height: 14px; min-width: 14px;
  border: 1px solid #555;
  background: #0a0a0a;
  margin-top: 4px;
  cursor: pointer;
  position: relative;
}
.check-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.check-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; left: 3px; top: 0;
  width: 5px; height: 8px;
  border: 1.5px solid var(--bg);
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.check-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.more-opts { margin-top: 2px; }
.more-opts summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 0;
  width: fit-content;
  transition: color 0.15s;
}
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary::before { content: '+ '; color: var(--accent); }
.more-opts[open] summary::before { content: '– '; }
.more-opts summary:hover { color: var(--accent); }
.more-opts summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.more-opts .check-row { margin-top: 10px; }
.check-desc { display: block; font-size: 0.78rem; color: var(--muted); }

.signup__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.signup__or::before, .signup__or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 12px 16px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn-google:hover { background: rgba(255,255,255,0.08); border-color: rgba(200,184,154,0.45); }
.btn-google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.signup__consent {
  text-align: center; font-size: 0.76rem; color: var(--muted);
  margin: 8px 0 0; letter-spacing: 0.02em;
}
.signup__trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 18px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--soft);
}
.signup__trust li::before { content: '✓'; color: var(--accent); margin-right: 7px; }

.msg { margin-top: 16px; font-size: 0.88rem; line-height: 1.6; display: none; }
.msg.visible { display: block; }
.msg.success { color: var(--success); }
.msg.error   { color: var(--error); }

/* Signed-in visitors: no signup, just the way back into their account. */
.member { display: none; max-width: 34rem; }
.is-signed-in .signup-only { display: none !important; }
.is-signed-in .member { display: block; }
.member .btn { display: block; margin-bottom: 12px; }
.member__status {
  font-size: 0.86rem; color: var(--muted); line-height: 1.6; margin-bottom: 14px;
  overflow-wrap: anywhere;
}
.member__status strong { color: var(--text); font-weight: normal; }
.member__status.is-on .member__tick { color: var(--success); margin-right: 4px; }
.member__status.is-off { color: var(--accent); }
.member__link {
  display: block; text-align: center;
  color: var(--muted); text-decoration: none; font-size: 0.84rem;
  padding: 6px 0; transition: color 0.15s;
}
.member__link:hover { color: var(--accent); }

/* ── Issue excerpt (the product, shown rather than described) ─────────────── */
.issue-wrap { min-width: 0; }
.issue {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid #333;
  background: #0b0b0b;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(200,184,154,0.05), 0 0 50px rgba(200,184,154,0.07);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s;
}
.issue:hover { border-color: rgba(217,164,65,0.6); box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 60px rgba(217,164,65,0.16); }

/* Foot of the card: always visible (the body above it is what gets cropped on desktop). */
.issue__foot { flex-shrink: 0; background: #f5f2eb; padding: 12px 22px 18px; }
.issue__open {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #121212;
  border-left: 4px solid var(--amber);
  color: var(--amber);
  font-family: var(--label);
  font-size: 1.2rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none;
  padding: 13px 18px;
  transition: background 0.15s;
}
/* Stretched link: a click anywhere on the excerpt opens the issue. */
.issue__open::after { content: ''; position: absolute; inset: 0; }
.issue:hover .issue__open { background: #000; }
.issue__open:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.issue__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: #1b1b1b;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.issue__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a3a; }
.issue__bar span { margin-left: 8px; }

.issue__body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #f5f2eb; color: #1b1b1b; padding: 16px 22px 0; }

.paper {
  background: #121212;
  color: #ececec;
  border-left: 4px solid var(--amber);
  padding: 18px 20px 20px;
}
.paper__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber);
}
.paper__meta b { font-weight: 400; color: #bdb6a8; }
/* Titles and summaries are line-clamped so the paper AND several stories fit together:
   the point of the excerpt is that the articles are summarised too, not just the paper. */
.paper h3 {
  font-size: 0.95rem; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em;
  margin: 10px 0 4px; color: #f4f1ea;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.paper__by { font-size: 0.72rem; color: #8f8a80; margin-bottom: 8px; }
.paper p {
  font-size: 0.82rem; line-height: 1.6; color: #cfcac0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.paper__cta {
  display: inline-block; margin-top: 10px;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber);
}
.paper { padding: 14px 18px 14px; }

.stories { margin-top: 6px; }
.story { padding: 12px 0 13px; border-top: 1px solid #dcd7cb; }
.story:first-child { border-top: none; padding-top: 14px; }
.story__sec {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
  font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: #6d6860;
}
.story__sec b { color: #1b1b1b; font-weight: 700; margin-right: 4px; }
.story h4 {
  font-size: 0.9rem; line-height: 1.38; letter-spacing: -0.01em; margin-bottom: 4px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.story p:not(.story__sec) {
  font-size: 0.8rem; line-height: 1.55; color: #3a3833;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* Desktop: the whole hero (copy, form and excerpt) fits one viewport. The excerpt is cropped to
   what is left and fades out, which reads as "the issue goes on". */
@media (min-width: 961px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 84px;
    padding-bottom: 36px;
  }
  .issue {
    max-height: max(440px, calc(100vh - 84px - 36px - 40px));
    max-height: max(440px, calc(100svh - 84px - 36px - 40px));
  }
  .issue__body::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
    background: linear-gradient(to bottom, rgba(245,242,235,0), #f5f2eb 88%);
    pointer-events: none;
  }
}
/* Short laptop screens: tighten the copy column so it still clears the fold. */
@media (min-width: 961px) and (max-height: 800px) {
  h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); margin-bottom: 14px; }
  .eyebrow { margin-bottom: 14px; }
  .lede { margin-bottom: 14px; line-height: 1.6; }
  .pills { margin-bottom: 16px; gap: 8px; }
  .os-pill { padding: 7px 12px; }
  .signup__or { margin: 14px 0 12px; }
  .signup__trust { margin-top: 14px; }
  .paper p { -webkit-line-clamp: 2; }
}

/* Very short windows: drop the third story rather than cut it off mid-line. */
@media (min-width: 961px) and (max-height: 740px) {
  .story:nth-child(3) { display: none; }
}
@media (min-width: 961px) and (max-height: 700px) {
  .hero { padding-top: 70px; padding-bottom: 16px; }
  h1 { font-size: 1.75rem; margin-bottom: 10px; }
  .lede { font-size: 0.92rem; margin-bottom: 10px; }
  .pills { margin-bottom: 12px; gap: 6px; }
  .os-pill { padding: 5px 10px; font-size: 0.74rem; }
  .signup input[type="email"], .btn { padding-top: 11px; padding-bottom: 11px; }
  .signup__trust { margin-top: 10px; }
  .issue { max-height: max(380px, calc(100svh - 70px - 16px - 40px)); }
}

.issue-caption {
  margin-top: 12px;
  font-size: 0.74rem; color: var(--muted);
}

/* ── Why it's different ───────────────────────────────────────────────────── */
.why { padding: 72px 0 80px; border-top: 1px solid var(--border); }
.section-label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2; letter-spacing: -0.02em;
  max-width: 34ch;
  margin-bottom: 14px;
}
.why__sub { color: var(--soft); max-width: 40rem; margin-bottom: 44px; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pillar {
  background: rgba(22,22,22,0.85);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 24px 22px 26px;
}
.pillar__n { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 14px; }
.pillar h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 10px; }
.pillar p { font-size: 0.86rem; line-height: 1.7; color: var(--soft); }

/* Open source: a full-width band under the three claims, so it reads as its own selling point. */
.opensource {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  margin-top: 20px;
  background: rgba(22,22,22,0.85);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 28px 30px;
}
.opensource h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.opensource p:not(.pillar__n) { font-size: 0.88rem; line-height: 1.7; color: var(--soft); max-width: 52rem; }
.opensource .btn { flex-shrink: 0; }

/* ── Closing call to action ───────────────────────────────────────────────── */
.final { padding-bottom: 96px; }
.final__box {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: linear-gradient(90deg, rgba(200,184,154,0.14), rgba(200,184,154,0.04));
  border: 1px solid rgba(200,184,154,0.4);
  border-left: 5px solid var(--accent);
  padding: 36px 36px;
}
.final h2 { margin-bottom: 8px; max-width: none; }
.final p { color: var(--soft); font-size: 0.9rem; }
.final__actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; flex-shrink: 0; min-width: 220px; }
.final__link { text-align: center; color: var(--muted); text-decoration: none; font-size: 0.8rem; transition: color 0.15s; }
.final__link:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 88px; padding-bottom: 64px; }
  .signup, .lede, .member, .pills { max-width: none; }
  .issue-wrap { max-width: 600px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .opensource { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 22px; }
  .final__box { flex-direction: column; align-items: stretch; gap: 22px; padding: 28px 22px; }
  .final__actions { min-width: 0; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 76px; }
  .signup__row { flex-direction: column; }
  .btn { width: 100%; }
  .issue__mast, .issue__body { padding-left: 18px; padding-right: 18px; }
  .paper { padding: 16px 16px 18px; }
  .why { padding: 56px 0 60px; }
}
