/* Discerno Newsletter — landing page styles */

:root {
  --paper: oklch(0.975 0.012 80);          /* warm parchment */
  --paper-2: oklch(0.95 0.014 78);
  --paper-3: oklch(0.92 0.016 76);
  --ink: oklch(0.22 0.015 60);             /* deep warm ink */
  --ink-2: oklch(0.36 0.015 60);
  --ink-3: oklch(0.48 0.014 60);  /* tightened for AA contrast on warm paper */
  --rule: oklch(0.88 0.012 70);
  --rule-2: oklch(0.82 0.014 70);
  --accent: oklch(0.74 0.155 75);          /* marigold */
  --accent-soft: oklch(0.94 0.06 80);
  --accent-deep: oklch(0.5 0.14 65);

  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "DM Sans", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

  --container: 1180px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* --- FOCUS --- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav-cta:focus-visible,
.send-btn:focus-visible {
  outline-offset: 4px;
}

/* --- SKIP LINK --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  transition: top 120ms ease;
}
.skip-link:focus {
  top: 12px;
}

/* --- VISUALLY HIDDEN --- */
.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;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* --- NAV --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-sub {
  color: var(--ink-3);
  font-style: italic;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 120ms ease, background 120ms ease;
}
.nav-cta:hover { background: var(--accent-deep); transform: translateY(-1px); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.08), 0 6px 20px -8px oklch(0 0 0 / 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 oklch(0 0 0 / 0.08), 0 12px 30px -10px oklch(0 0 0 / 0.3); }
.btn-meta {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--paper) 70%, var(--accent) 30%);
  background: color-mix(in oklab, var(--paper) 18%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}
.btn-lg { padding: 20px 28px; font-size: 18px; }

/* --- HERO --- */
.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
}
.hero-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.hero-h em {
  font-style: italic;
  color: var(--accent-deep);
}
.hero-lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 36px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-3);
  font-family: var(--mono);
}
.hero-trust strong { color: var(--ink); font-weight: 500; }
.dot-sep { opacity: 0.5; }

/* --- HERO PAPER STACK --- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.paper-stack {
  position: relative;
  width: 100%;
  max-width: 460px;
}
.paper {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.6) inset,
    0 30px 60px -30px oklch(0 0 0 / 0.25),
    0 4px 12px -4px oklch(0 0 0 / 0.08);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  transform: rotate(-1.5deg);
  transition: transform 400ms ease;
}
.paper:hover { transform: rotate(0deg); }
.paper-back {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.paper-back-1 { transform: rotate(2deg) translate(8px, 12px); background: var(--paper-2); }
.paper-back-2 { transform: rotate(4deg) translate(18px, 24px); background: var(--paper-3); }
.paper-stripe {
  height: 6px;
  background: var(--accent);
}
.paper-inner {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}
.paper-mast {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.paper-headline {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.paper-headline em { color: var(--accent-deep); }
.paper-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}
.pblock {
  background: var(--paper-2);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  transition: transform 300ms ease, background 300ms ease;
}
.pblock-text { grid-column: 1 / 2; grid-row: 1 / 3; }
.pblock-image { grid-column: 2 / 3; grid-row: 1 / 2; }
.pblock-callout { grid-column: 2 / 3; grid-row: 2 / 3; background: var(--accent-soft); }
.pblock-list { grid-column: 1 / 3; grid-row: 3 / 4; }
.bar {
  height: 6px;
  background: oklch(0.85 0.014 70);
  border-radius: 3px;
}
.bar-h { height: 8px; background: var(--ink-2); }
.row { display: flex; align-items: center; gap: 6px; }
.dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
.img-ph {
  flex: 1;
  background:
    repeating-linear-gradient(45deg, oklch(0.86 0.018 70) 0 6px, oklch(0.9 0.014 70) 6px 12px);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 50px;
}
.callout { display: flex; flex-direction: column; gap: 6px; }
.callout-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}

/* --- SECTION HEADS --- */
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 16px;
}
.section-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.section-lede {
  font-size: clamp(17px, 1.3vw, 19px);
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

/* --- EDITOR SECTION --- */
.editor-section {
  padding: clamp(56px, 8vw, 112px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.editor-shell {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px oklch(0 0 0 / 0.25);
}
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.et-left, .et-right { display: flex; align-items: center; gap: 10px; }
.et-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-2); }
.et-dot:nth-child(1) { background: oklch(0.74 0.13 30); }
.et-dot:nth-child(2) { background: oklch(0.84 0.13 90); }
.et-dot:nth-child(3) { background: oklch(0.74 0.12 145); }
.et-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 8px;
}
.et-saved {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.saved-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.7 0.14 145);
  box-shadow: 0 0 0 3px color-mix(in oklab, oklch(0.7 0.14 145) 25%, transparent);
}

.editor-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 560px;
}
.editor-aside {
  padding: 20px 16px;
  border-right: 1px solid var(--rule);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
}
.aside-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.aside-buttons {
  display: grid;
  gap: 4px;
}
.aside-buttons button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}
.aside-buttons button:hover {
  background: var(--paper);
  border-color: var(--rule);
  color: var(--ink);
}
.ab-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.recipient-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; list-style: none; padding: 0; }
.cp-toolbar button:disabled { opacity: 0.35; cursor: not-allowed; }
.cp-block:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.recipient.muted { opacity: 0.55; }
.rc-check {
  width: 16px; height: 16px;
  background: var(--accent);
  color: var(--paper);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.rc-check.empty { background: transparent; border: 1px solid var(--rule-2); }
.rc-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.send-btn {
  margin-top: auto;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}
.send-btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
.send-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.send-toast {
  margin-top: 10px;
  padding: 8px 12px;
  background: oklch(0.95 0.05 145);
  color: oklch(0.4 0.12 145);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: fade-in 200ms ease;
}

/* --- CANVAS PAPER --- */
.editor-canvas {
  padding: 32px 32px 48px;
  background:
    radial-gradient(circle at 50% 0%, var(--paper-2), var(--paper-3));
  position: relative;
  overflow: hidden;
}
.canvas-paper {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  max-width: 580px;
  margin: 0 auto;
  padding: 36px 44px 44px;
  box-shadow: 0 20px 60px -30px oklch(0 0 0 / 0.2);
}
.cp-mast {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.cp-block {
  position: relative;
  padding: 12px 14px 12px 28px;
  margin: 0 -14px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  cursor: pointer;
}
.cp-block:hover {
  background: var(--paper-2);
  border-color: var(--rule);
}
.cp-block.is-selected {
  background: color-mix(in oklab, var(--accent-soft) 60%, var(--paper));
  border-color: var(--accent);
}
.cp-block.is-dragging { opacity: 0.4; }
.cp-block.is-over { border-color: var(--accent); border-style: dashed; }
.cp-handle {
  position: absolute;
  left: 8px;
  top: 14px;
  font-size: 14px;
  color: var(--ink-3);
  cursor: grab;
  opacity: 0;
  transition: opacity 120ms ease;
  letter-spacing: -2px;
}
.cp-block:hover .cp-handle, .cp-block.is-selected .cp-handle { opacity: 0.6; }
.cp-handle:active { cursor: grabbing; }
.cp-toolbar {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 4px 12px -4px oklch(0 0 0 / 0.15);
}
.cp-toolbar button {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-2);
  transition: background 80ms ease;
}
.cp-toolbar button:hover { background: var(--paper-2); color: var(--ink); }

.cp-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 4px 0;
}
.cp-p { margin: 4px 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.cp-list-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 6px;
  font-weight: 500;
}
.cp-list ul { margin: 0; padding: 0; list-style: none; }
.cp-list li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 15px;
  color: var(--ink-2);
}
.cp-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.cp-img figure, .cp-img { margin: 0; }
.cp-img .img-ph { aspect-ratio: 16 / 9; min-height: 0; }
.cp-img figcaption {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
}
.cp-callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
}
.cp-callout-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 4px;
}
.cp-callout p { margin: 0; font-size: 15px; color: var(--ink); }

.cp-add { text-align: center; margin-top: 16px; }
.cp-add button {
  background: transparent;
  border: 1px dashed var(--rule-2);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.cp-add button:hover { border-color: var(--accent); color: var(--accent-deep); }

/* Send overlay */
.send-overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--paper-2) 88%, transparent);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  animation: fade-in 200ms ease;
}
.envelope {
  width: 120px;
  height: 80px;
  position: relative;
  perspective: 600px;
}
.env-body {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.env-flap {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 4px;
  transform-origin: top;
  clip-path: polygon(0 0, 100% 0, 50% 65%);
  animation: env-fly 1.4s ease forwards;
}
.send-overlay.sent .env-flap { animation: none; transform: rotateX(-180deg) translateY(-40px); }
.send-overlay.sent .envelope { animation: env-leave 1s ease forwards; }
@keyframes env-fly {
  0% { transform: rotateX(0deg); }
  40% { transform: rotateX(-180deg); }
  60% { transform: rotateX(-180deg) translateY(0); }
  100% { transform: rotateX(-180deg) translateY(-40px); }
}
@keyframes env-leave {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-30px) scale(0.7); opacity: 0; }
}
.send-msg {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- FEATURES --- */
.features {
  padding: clamp(72px, 10vw, 128px) 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -20px oklch(0 0 0 / 0.15);
}
.feature-visual {
  height: 220px;
  background: var(--paper-2);
  border-radius: 8px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
}
.feature-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}
.feature-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.feature-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* visuals inside features */
.vis { width: 80%; max-width: 320px; }
.vis-blocks { display: flex; flex-direction: column; gap: 8px; }
.vb-row { display: flex; gap: 6px; }
.vb-row-h .vb-bar { height: 12px; background: var(--ink-2); }
.vb-bar { height: 8px; background: oklch(0.85 0.014 70); border-radius: 3px; }
.vb-img {
  height: 60px;
  background: repeating-linear-gradient(45deg, oklch(0.86 0.018 70) 0 6px, oklch(0.9 0.014 70) 6px 12px);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.vis-link { width: 88%; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.vl-bar {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.vl-lock { color: oklch(0.7 0.14 145); font-size: 8px; }
.vl-url b { color: var(--ink); font-weight: 500; }
.vl-copy {
  margin-left: auto;
  background: var(--accent);
  color: var(--paper);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vl-cards { display: flex; gap: 8px; }
.vl-card {
  flex: 1;
  height: 60px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  position: relative;
}
.vl-card::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.vl-card-2 { transform: translateY(-6px); }
.vl-card-3 { transform: translateY(4px); }

.vis-email { width: 86%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; }
.ve-row {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.ve-3 { transform: translateX(8px); opacity: 0.7; }
.ve-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 14px; font-weight: 500;
}
.ve-2 { background: oklch(0.5 0.13 250); }
.ve-3a { background: oklch(0.6 0.14 25); }
.ve-meta { display: flex; flex-direction: column; }
.ve-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.ve-sub { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.vis-templates { width: 100%; padding: 0 32px; display: flex; gap: 8px; align-items: flex-end; }
.vt-card {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.vt-1 { transform: rotate(-3deg) translateY(8px); }
.vt-2 { transform: translateY(-8px); z-index: 2; box-shadow: 0 8px 20px -8px oklch(0 0 0 / 0.15); border-color: var(--accent); }
.vt-3 { transform: rotate(3deg) translateY(8px); }
.vt-head { height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 4px; }
.vt-line { height: 4px; background: oklch(0.85 0.014 70); border-radius: 2px; }
.vt-line.short { width: 60%; }
.vt-block { height: 20px; background: oklch(0.9 0.014 70); border-radius: 3px; margin: 4px 0; }
.vt-img {
  height: 28px;
  background: repeating-linear-gradient(45deg, oklch(0.86 0.018 70) 0 4px, oklch(0.9 0.014 70) 4px 8px);
  border-radius: 3px;
  margin: 4px 0;
}

/* --- HOW IT WORKS --- */
.how {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--accent-deep);
  font-weight: 500;
  margin-bottom: 24px;
}
.step-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.step-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 24px;
  flex: 1;
}
.step-vis {
  height: 120px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.sv-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 70%;
  box-shadow: 0 6px 16px -8px oklch(0 0 0 / 0.15);
}
.sv-line { height: 6px; background: var(--ink-2); border-radius: 3px; }
.sv-line.w-50 { width: 80%; }
.sv-line.w-30 { width: 40%; }
.sv-meta { background: var(--accent) !important; height: 4px; }
.sv-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  width: 60px; height: 36px;
  position: relative;
}
.sv-block::before {
  content: "";
  position: absolute; inset: 6px;
  background: oklch(0.88 0.012 70);
  border-radius: 2px;
}
.sv-1 { transform: rotate(-4deg) translateY(4px); }
.sv-2 { transform: translateY(-8px); border-color: var(--accent); }
.sv-2::before { background: var(--accent); }
.sv-3 { transform: rotate(4deg) translateY(4px); }

.sv-channel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.sv-c-2 { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sv-c-3 { transform: translateY(8px); }

/* --- CTA STRIP --- */
.cta-strip {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  bottom: -200px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 40%, transparent), transparent 70%);
  pointer-events: none;
}
.cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  text-wrap: balance;
}
.cta-h em { color: var(--accent); }
.cta-strip .btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.cta-strip .btn-primary:hover { background: oklch(0.8 0.16 75); }
.cta-strip .btn-meta {
  background: oklch(0 0 0 / 0.12);
  color: oklch(0.25 0.05 60);
}
.cta-meta {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: oklch(0.7 0.02 70);
}

/* --- FOOTER --- */
.footer {
  padding: 64px 0 32px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-tag {
  font-size: 15px;
  color: var(--ink-3);
  max-width: 36ch;
  margin: 0;
  line-height: 1.5;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col-h {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-col a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink-2);
  flex-wrap: wrap;
  transition: color 120ms ease;
}
.footer-col a:hover { color: var(--ink); }
.fc-mark {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}
.fc-classroom { background: oklch(0.45 0.08 145); }  /* Classroom = green */
.fc-newsletter { background: var(--accent); }
.fc-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-basis: 100%;
  padding-left: 18px;
  margin-top: -2px;
}
.fc-current { color: var(--ink) !important; font-weight: 500; }

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

/* --- DENSITY TWEAK --- */
.density-compact .hero { padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 4vw, 48px); }
.density-compact .features,
.density-compact .how,
.density-compact .editor-section,
.density-compact .cta-strip { padding: clamp(48px, 7vw, 80px) 0; }
.density-compact .feature { padding: 20px; }
.density-compact .feature-visual { height: 160px; margin-bottom: 16px; }
.density-compact .step { padding: 24px; }
.density-compact .hero-h { font-size: clamp(36px, 5vw, 60px); }

/* --- HEADER TONE TWEAK --- */
.tone-paper .nav { background: color-mix(in oklab, var(--paper-2) 92%, transparent); }
.tone-accent .nav { background: color-mix(in oklab, var(--accent-soft) 92%, transparent); }
.tone-accent .nav { border-bottom-color: color-mix(in oklab, var(--accent) 40%, var(--rule)); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 380px; margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .editor-body { grid-template-columns: 1fr; min-height: 0; }
  .editor-aside {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 16px;
  }
  .aside-buttons {
    grid-template-columns: repeat(5, 1fr);
  }
  .aside-buttons button { flex-direction: column; padding: 8px 4px; font-size: 11px; gap: 4px; }
  .recipient-list { display: none; }
  .send-btn { margin-top: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 600px) {
  .canvas-paper { padding: 24px 20px; }
  .editor-canvas { padding: 16px 12px 24px; }
  .footer-cols { grid-template-columns: 1fr; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* --- HERO MOTION TOGGLE (S4, WCAG 2.2.2) --- */
/* Visible control to pause/resume the hero auto-shuffle for users who have
   not set an OS reduced-motion preference. Positioned under the paper stack. */
.hero-motion-toggle {
  display: inline-block;
  margin: 16px auto 0;
  padding: 7px 14px;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.hero-motion-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.hero-visual {
  flex-direction: column;
  align-items: center;
}

/* --- REDUCED MOTION (S4, WCAG 2.3.3 / 2.2.2) --- */
/* Honors the OS "reduce motion" setting. Animations and continuous
   transitions that convey no information are neutralized; the JS auto-shuffle
   is separately suppressed in app.jsx via matchMedia. Functional transitions
   are reduced to near-instant rather than removed so focus/hover affordances
   still register. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .paper { transform: rotate(-1.5deg); }
  .paper:hover { transform: rotate(-1.5deg); }
  .pblock { transition: none !important; }
  .send-overlay { animation: none !important; }
  .env-flap { animation: none !important; }
  .send-overlay.sent .env-flap { animation: none !important; }
  .send-overlay.sent .envelope { animation: none !important; }
  .send-toast { animation: none !important; }
}

.nav-cta--ghost {
  background: transparent;
  border: 1px solid var(--rule, #e2e8f0);
  color: var(--ink);
}
.nav-cta--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ============================================================ */
/* Demo editor parity pass (v3) -- match the real editor        */
/* All selectors scoped under .editor-section so they override  */
/* anything in landing-additions.css without leaking elsewhere. */
/* ============================================================ */

/* Real-editor textarea behavior: invisible field, no resize grip,
   height managed by the auto-grow listener in app.js. Copied from
   app-shared.css (.cp-textarea is the canonical definition there). */
.cp-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  font: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  line-height: inherit;
  letter-spacing: inherit;
  display: block;
}

/* Three-region toolbar with the title centered, matching the real
   .editor-bar (back link | centered title | undo / saved / publish). */
.editor-section .editor-toolbar { gap: 12px; }
.editor-section .et-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.editor-section .demo-title-input {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 10px;
  width: 100%;
  max-width: 320px;
  color: var(--ink);
  transition: border-color 120ms ease, background 120ms ease;
}
.editor-section .demo-title-input:hover { border-color: var(--rule); }
.editor-section .demo-title-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

/* The demo list now uses the real editor's markup (a bullet span per
   row). Suppress the landing-page ::before accent dot and its 20px
   indent so the marker isn't doubled. */
.editor-section .cp-list li::before { content: none; }
.editor-section .cp-list li { padding-left: 0; }