/* ==========================================================================
   Keep or Toss — landing page stylesheet
   Own product, own dark visual identity — deliberately separate from the
   main API Espresso site's light/paper theme, not merged into styles.css.
   Rebuilt from a Claude Design visual reference (layout, palette, Space
   Grotesk / IBM Plex Mono pairing) into real markup + CSS.
   ========================================================================== */

:root {
  --bg: #111111;
  --bg-alt: #0c0c0c;
  --bg-alt2: #0d0d0d;
  --text: #ffffff;
  --muted: #a1a1a1;
  --muted2: #8a8a8a;
  --dim: #6b6b6b;
  --purple: #a855f7;
  --pink: #f472b6;
  --blue: #3b82f6;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.14);

  --sans: "Space Grotesk", Helvetica, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--pink); }

::selection { background: var(--purple); color: var(--text); }

h1, h2, p { margin: 0; }

input::placeholder { color: var(--dim); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.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;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__brand { display: flex; align-items: center; gap: 12px; }
.header__wordmark { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; font-weight: 500; }
.header__cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text);
  border: 1px solid var(--border-soft);
  padding: 9px 18px;
  border-radius: 2px;
}
.header__cta:hover { border-color: var(--blue); color: var(--blue); }

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

.hero { padding: 96px 40px 40px; }
.hero__eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--purple); margin-bottom: 28px; }
.hero__title {
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 28px;
  max-width: 15ch;
  text-wrap: balance;
}
.hero__subhead {
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 40px;
  text-wrap: pretty;
}

/* --------------------------------------------------------- notify form */

.notify-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.notify-form input {
  background: #191919;
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 15px 18px;
  width: 320px;
  max-width: 100%;
  border-radius: 2px;
  outline: none;
}
.notify-form input:focus { border-color: var(--blue); }
.notify-form button {
  background: var(--blue);
  color: var(--text);
  border: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 500;
  padding: 16px 26px;
  border-radius: 2px;
  cursor: pointer;
}
.notify-form button:hover { background: #60a5fa; }
.notify-form button:disabled { opacity: 0.6; cursor: default; }
.notify-form__notice { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--dim); min-height: 18px; }

/* ---------------------------------------------------------- demo card */

.demo-section { padding: 56px 40px 120px; }
.demo-card { border: 1px solid var(--border-soft); background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.demo-card__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.demo-card__brand { display: flex; align-items: center; gap: 10px; }
.demo-card__brand span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--muted2); }
.demo-card__topbar-right { display: flex; align-items: center; gap: 14px; }
.demo-card__counter { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--muted2); font-variant-numeric: tabular-nums; }
.demo-card__pause {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.demo-card__pause:hover { border-color: var(--border-soft); color: var(--text); }

.demo-card__viewer {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  padding: 24px;
}
.demo-card__placeholder {
  position: relative;
  width: 100%;
  max-width: 640px;
  height: 400px;
  background: repeating-linear-gradient(135deg, #1a1a1a 0 10px, #141414 10px 20px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-card__placeholder span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: #5a5a5a; }
.demo-card__verdict {
  position: absolute;
  top: 26px;
  right: 30px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  border: 1px solid;
}

.demo-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}
.demo-card__filename { font-family: var(--mono); font-size: 12px; color: #c9c9c9; overflow-wrap: anywhere; }
.demo-card__keys { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.demo-key { display: flex; align-items: center; gap: 9px; }
.demo-key__box {
  font-family: var(--mono);
  font-size: 13px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid;
}
.demo-key__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; }
.demo-key--toss .demo-key__box, .demo-key--toss .demo-key__label { color: var(--pink); border-color: rgba(244, 114, 182, 0.5); }
.demo-key--keep .demo-key__box, .demo-key--keep .demo-key__label { color: var(--blue); border-color: rgba(59, 130, 246, 0.5); }

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

.section { border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt2); }
.section__inner { max-width: 1180px; margin: 0 auto; padding: 90px 40px; }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; margin-bottom: 24px; }
.eyebrow--pink { color: var(--pink); }
.eyebrow--blue { color: var(--blue); }
.eyebrow--purple { color: var(--purple); }

.section h2 { letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; line-height: 1.05; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.two-col p + p { margin-top: 22px; }
.two-col p { font-size: 19px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.two-col p.is-emphasis { color: var(--text); }

/* 01 — speed */

.speed h2 { font-size: clamp(32px, 5vw, 72px); max-width: 18ch; margin-bottom: 32px; }
.speed__subhead { font-size: clamp(16px, 2vw, 21px); line-height: 1.55; color: var(--muted); max-width: 56ch; margin-bottom: 56px; text-wrap: pretty; }
.speed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); }
.speed-card { background: var(--bg-alt2); padding: 34px 30px; }
.speed-card__glyph { font-family: var(--mono); font-size: 40px; margin-bottom: 14px; }
.speed-card__key { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--text); margin-bottom: 10px; }
.speed-card__desc { font-size: 16px; line-height: 1.5; color: var(--muted2); }
.speed__footnote { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--dim); margin-top: 26px; }

/* 02 — safety */

.safety .two-col { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.safety h2 { font-size: clamp(30px, 4.5vw, 60px); max-width: 14ch; margin-bottom: 26px; }
.recovery-card { border: 1px solid rgba(168, 85, 247, 0.35); background: #131313; border-radius: 4px; padding: 30px; }
.recovery-card__path { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--muted2); margin-bottom: 20px; word-break: break-all; }
.recovery-card__rows { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.recovery-card__row {
  background: #131313;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
}
.recovery-card__row span:first-child { color: #c9c9c9; overflow-wrap: anywhere; }
.recovery-card__row .tossed { color: var(--pink); flex-shrink: 0; }
.recovery-card__row .restored { color: var(--purple); flex-shrink: 0; }
.recovery-card__notes { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--dim); margin-top: 20px; line-height: 1.8; }

/* 03 — formats */

.formats h2 { font-size: clamp(26px, 4vw, 44px); max-width: 22ch; margin-bottom: 18px; }
.formats__subhead { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 52ch; margin-bottom: 40px; text-wrap: pretty; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; color: var(--text); border: 1px solid var(--border-soft); padding: 11px 18px; }
.pill--dashed { color: var(--dim); border-style: dashed; }

/* 04/05 — resilience / multi-folder */

.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.pair-grid h2 { font-size: clamp(26px, 3.5vw, 40px); max-width: 18ch; margin-bottom: 20px; line-height: 1.08; }
.pair-grid p { font-size: 18px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ------------------------------------------------------------- closing */

.closing { text-align: center; }
.closing__logo { margin-bottom: 30px; }
.closing h2 { font-size: clamp(30px, 5vw, 58px); line-height: 1.02; max-width: 16ch; margin: 0 auto 24px; }
.closing p { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 46ch; margin: 0 auto 40px; text-wrap: pretty; }
.closing .notify-form { justify-content: center; }
.closing .notify-form__notice { margin-top: 4px; }

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

.footer-bar {
  border-top: 1px solid var(--border);
  padding: 26px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .header { padding: 16px 24px; }
  .hero { padding: 64px 24px 32px; }
  .demo-section { padding: 40px 24px 80px; }
  .section__inner { padding: 64px 24px; }
  .footer-bar { padding: 22px 24px; }
  .two-col, .pair-grid { grid-template-columns: 1fr; gap: 40px; }
  .safety .two-col { grid-template-columns: 1fr; }
  .speed-grid { grid-template-columns: 1fr; }
  .demo-card__viewer { min-height: 260px; }
  .demo-card__placeholder { height: 300px; }
}

@media (max-width: 560px) {
  .header__cta { padding: 8px 14px; font-size: 11px; }
  .notify-form { flex-direction: column; align-items: stretch; }
  .notify-form input { width: 100%; }
  .notify-form button { width: 100%; }
  .demo-card__topbar { flex-wrap: wrap; }
  .demo-card__footer { flex-direction: column; align-items: flex-start; }
  .demo-card__verdict { position: static; margin-top: 14px; align-self: flex-start; }
  .demo-card__viewer { padding: 16px; }
}
