/* Docuspeak — docuspeak.app
   Cool neutrals, one warm accent: the amber is the app's reading highlight,
   the only warm thing on a deliberately cool page.
   System font stacks only — a privacy-first app must not phone a font CDN. */

:root {
  /* Ground and ink */
  --paper: #fbfbfd;
  --surface: #ffffff;
  --ink: #14161c;
  --slate: #5a6070;
  --rule: #e4e5ec;

  /* The reading highlight, straight from the app */
  --amber: #f0b429;
  --amber-wash: #fff0bd;
  --amber-edge: #f6d98a;

  /* Type */
  --serif: ui-serif, "New York", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.8rem;
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.6rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.6vw, 4rem);

  /* Layout */
  --prose: 34rem;
  --wide: 66rem;
  --radius: 14px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101219;
    --surface: #181b24;
    --ink: #e9eaf0;
    --slate: #9aa1b4;
    --rule: #272b37;
    --amber: #f5cf5a;
    --amber-wash: #4a3c14;
    --amber-edge: #6b5620;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}

.prose {
  width: min(100% - 2.5rem, var(--prose));
  margin-inline: auto;
}

.stack { display: flex; flex-direction: column; }
.stack-sm { gap: 0.75rem; }
.stack-md { gap: 1.5rem; }
.stack-lg { gap: 2.5rem; }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--slate);
  text-wrap: pretty;
}

.small {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--slate);
}

/* ---------- Header ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
  font-family: var(--sans);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark .bars { display: flex; align-items: center; gap: 2px; height: 1em; }

.wordmark .bars i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--amber);
}

.wordmark .bars i:nth-child(1) { height: 42%; }
.wordmark .bars i:nth-child(2) { height: 88%; }
.wordmark .bars i:nth-child(3) { height: 62%; }
.wordmark .bars i:nth-child(4) { height: 30%; }

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: var(--step--1);
}

.masthead nav a {
  color: var(--slate);
  text-decoration: none;
  white-space: nowrap;
}

.masthead nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn {
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-quiet {
  border-color: var(--rule);
  color: var(--ink);
}

.btn-quiet:hover { border-color: var(--slate); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(2rem, 5vw, 4rem); }

.hero-copy { max-width: 36rem; display: flex; flex-direction: column; gap: 1.25rem; }

.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--amber-wash) 62%);
  padding-inline: 0.08em;
}

/* The reading pane: the product's signature moment, at page scale. */

.pane {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 24px 60px -30px rgba(20, 22, 28, 0.35);
  overflow: hidden;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--slate);
}

.pane-title { font-family: var(--serif); font-size: var(--step-0); color: var(--ink); }

.pane-body {
  padding: clamp(1.75rem, 4vw, 3.25rem);
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.4rem);
  line-height: 1.62;
  /* Keep the demo at a real reading measure — a reading app should not
     show 100-character lines. */
  max-width: 42rem;
  margin-inline: auto;
}

.pane-body p + p { margin-top: 1.1em; }

.pane-body .s {
  border-radius: 3px;
  padding: 0.08em 0.02em;
  transition: background-color 0.45s ease;
  background-color: transparent;
}

.pane-body .s.on { background-color: var(--amber-wash); }

.pane-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--slate);
}

.pane-foot .play {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  flex: none;
}

.pane-foot .play svg { width: 13px; height: 13px; fill: currentColor; }

.meter { display: flex; align-items: flex-end; gap: 3px; height: 20px; }

.meter i {
  width: 3px;
  border-radius: 2px;
  background: var(--amber);
  height: 30%;
  animation: pulse 1.1s ease-in-out infinite;
}

.meter i:nth-child(2) { animation-delay: 0.15s; }
.meter i:nth-child(3) { animation-delay: 0.3s; }
.meter i:nth-child(4) { animation-delay: 0.45s; }
.meter i:nth-child(5) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

.track {
  flex: 1;
  height: 3px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  width: 18%;
  background: var(--amber);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ---------- Feature rows ---------- */

.features { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 4rem); }

.feature {
  display: grid;
  gap: 0.6rem 2.5rem;
  grid-template-columns: 1fr;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .feature { grid-template-columns: 14rem 1fr; }
}

.feature h3 { color: var(--ink); }
.feature p { color: var(--slate); max-width: 34rem; }

/* ---------- Shots ---------- */

.shots {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  align-items: start;
  justify-items: center;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 19rem;
}

.shot img {
  border-radius: 22px;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 50px -28px rgba(20, 22, 28, 0.45);
}

.shot figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--slate); }

/* ---------- Privacy panel ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }

.claims li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  color: var(--slate);
}

.claims li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
  transform: translateY(-1px);
}

.claims strong { color: var(--ink); font-weight: 600; }

/* ---------- Docs (privacy / support pages) ---------- */

.doc h2 { font-size: var(--step-2); margin-top: 2.75rem; margin-bottom: 0.6rem; }
.doc h3 { margin-top: 1.75rem; margin-bottom: 0.4rem; }
.doc p, .doc li { color: var(--slate); }
.doc p + p { margin-top: 1rem; }
.doc ul { padding-left: 1.15rem; display: grid; gap: 0.5rem; margin: 1rem 0 0; }
.doc a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 3px; }

.updated {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--slate);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  display: inline-block;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--slate);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
