/* ZonePen marketing page. Hand-written, no build step, no external
   assets. Palette: clean light workbench, near-white paper, slate ink,
   indigo accent, amber for the staged/drift state. Dark: navy-tinted
   near-black paper (as in the app), cards a step lighter, accent and
   amber lifted so they still read against it. Each colour is a
   light-dark() pair, so the page follows the OS until the theme switch
   pins color-scheme on <html> (see index.html). */

:root {
  color-scheme: light dark;
  --bg: light-dark(#fafaf9, #0f1421);
  --surface: light-dark(#ffffff, #171d2c);
  --line: light-dark(#e4e2dd, #2a3245);
  --ink: light-dark(#1d2129, #e4e8f0);
  --muted: light-dark(#6b7078, #97a3b9);
  --accent: light-dark(#4f46e5, #818cf8);
  --accent-hover: light-dark(#4338ca, #a5b4fc);
  --accent-ink: light-dark(#ffffff, #0f1421);
  --accent-soft: light-dark(#eef0fe, #23264d);
  --accent-line: light-dark(#d9dcfc, #343a6e);
  --input-line: light-dark(#b5b8c9, #3d4760);
  --staged: light-dark(#b45309, #e0a24f);
  --staged-soft: light-dark(#fdf6ec, #33270f);
  --error: light-dark(#a12828, #f08a8a);
  --success: light-dark(#285e3b, #6fcf97);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Masthead */
.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .mark {
  width: 1.625rem;
  height: 1.625rem;
  display: block;
  color: light-dark(#2b3f8f, #ffffff);
}
.wordmark .alt { font-weight: 500; color: var(--muted); }
.masthead-end { display: flex; align-items: center; gap: 0.75rem; }
.theme-switch {
  display: flex;
  gap: 0.125rem;
  padding: 0.125rem;
  border-radius: 0.375rem;
  background: var(--line);
}
.theme-switch[hidden] { display: none; }
.theme-switch button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.3rem;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 2px rgb(29 33 41 / 12%);
}
.theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.beta-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.375rem;
  padding: 0.875rem 2rem;
}
.btn:hover, .btn:focus-visible { background: var(--accent-hover); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-small { padding: 0.5rem 1.125rem; font-size: 0.9375rem; }

/* Hero */
.hero { text-align: center; padding: 4rem 0 3rem; }
.eyebrow {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
}
h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.375rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 47.5rem;
  margin: 0 auto;
}
h1 em { font-style: normal; color: var(--accent); }
.pitch { color: var(--muted); margin: 1.25rem auto 2rem; max-width: 37.5rem; }
.feature-strip {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
}
.hero-interest { margin-top: 1.25rem; color: var(--muted); font-size: 0.9375rem; }
.interest a, .beta-signin a, .text-button { color: var(--accent); text-underline-offset: 0.2em; }

/* Signature: templates + records combine into a zone, deployed to targets */
.flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
}
.flow-col { display: flex; flex-direction: column; gap: 0.5rem; }
.flow-arrow { color: var(--muted); flex: none; }
.chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font: 500 0.8125rem var(--mono);
  color: var(--muted);
}
.chip-tpl { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip-kind { font-weight: 500; color: var(--muted); }
.chip-more { color: var(--ink); }
.flow-zone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.875rem 1.375rem;
  font: 600 0.875rem var(--mono);
  box-shadow: 0 1px 2px rgba(29, 33, 41, 0.04);
}
.target {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.target strong { color: var(--ink); font-weight: 600; }
.target strong.drift { color: var(--staged); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; }
.dot-ok { background: var(--accent); }
.dot-drift { background: var(--staged); }

.providers-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  padding-bottom: 4.5rem;
}

/* Declare / Deploy / Defend */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 4.5rem;
}
.steps article { border-top: 3px solid var(--accent); padding-top: 1.25rem; }
.steps .step-defend { border-top-color: var(--staged); }
.step-label { font: 700 0.8125rem var(--mono); color: var(--accent); margin-bottom: 0.75rem; }
.step-defend .step-label { color: var(--staged); }
.steps h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 0.625rem; }
.steps p { color: var(--muted); font-size: 1rem; }

/* Why use ZonePen? */
.why-head { text-align: center; padding-bottom: 1.5rem; }
.why-head h2 { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.02em; }
.why-head p { color: var(--muted); margin-top: 0.5rem; }
.why-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 4.5rem;
}
.why-cards article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1.75rem;
}
.card-label {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
}
.card-label-drift { color: var(--staged); }
.why-cards h3 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 0.625rem; }
.why-cards p { color: var(--muted); font-size: 1rem; }

/* Deliberate by design */
.deliberate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 2.5rem;
  margin-bottom: 4.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}
.deliberate h2 { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.deliberate p { color: var(--muted); }
.vignette {
  font: 0.8125rem/1.7 var(--mono);
  color: var(--muted);
  border-left: 3px solid var(--accent-soft);
  padding-left: 1.25rem;
}
.staged-flag { color: var(--staged); }
.vignette-review { margin-top: 0.5rem; color: var(--ink); font-weight: 600; }
.vignette-done { color: var(--accent); }

/* Closing CTA */
.cta { text-align: center; padding: 0 0 4.5rem; }
.cta h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.cta p { color: var(--muted); }

/* Interest registration */
[data-interest-ready][hidden] { display: none; }
.interest-unavailable { text-align: center; margin-bottom: 4.5rem; }
.interest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  padding: 2.5rem;
  margin-bottom: 4.5rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 0.5rem;
  scroll-margin-top: 2rem;
}
.interest h2 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 1rem; }
.interest-intro > p:not(.eyebrow) { color: var(--muted); }
.interest-small { font-size: 0.875rem; margin-top: 1rem; }
.email-label { display: block; font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.5rem; }
#interest-email {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--input-line);
  border-radius: 0.375rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.interest-consent { display: flex; align-items: flex-start; gap: 0.625rem; margin: 1.25rem 0; font-size: 0.9375rem; cursor: pointer; }
#interest-consent { width: 1.125rem; height: 1.125rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
button.btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
button.btn-small { font-size: 0.9375rem; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.interest :focus-visible, .text-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.interest-status { font-size: 0.9375rem; margin-top: 1rem; }
.interest-status:empty { margin-top: 0; }
.interest-status[data-state="error"] { color: var(--error); }
.interest-status[data-state="success"] { color: var(--success); }
.text-button { border: 0; background: none; font: inherit; font-size: 0.875rem; text-decoration: underline; cursor: pointer; margin-top: 0.5rem; }
#interest-dialog {
  width: min(42rem, calc(100% - 2rem));
  max-height: 85dvh;
  margin: auto;
  padding: 2rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
#interest-dialog::backdrop { background: rgb(29 33 41 / 45%); }
.interest-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.interest-dialog-head h2 { font-size: 1.25rem; line-height: 1.4; }
#interest-terms { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
.privacy { margin-top: 0.5rem; }
.beta-signin { margin-bottom: 1.5rem; font-size: 0.9375rem; }

@media (max-width: 52rem) {
  .masthead, .masthead-end { gap: 0.5rem; }
  .theme-switch button { width: 1.625rem; }
  .beta-badge { padding: 0.375rem 0.5rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .steps, .why-cards, .deliberate { grid-template-columns: 1fr; }
  .deliberate { padding: 1.75rem; gap: 1.75rem; }
  .interest { grid-template-columns: 1fr; padding: 1.75rem; gap: 2rem; }
  #interest-submit { width: 100%; }
  #interest-dialog { padding: 1.25rem; }
}
