/* ============================================================
   DraftsReady — shared landing + legal stylesheet
   Plain modern CSS. No framework, no build step, no webfonts.
   System font stack only. Light background only. No dark theme.

   Tokens, type scale, shape and motion follow docs/design-system.md.
   ============================================================ */

/* ------------------------------------------------------------
   Design tokens (exact values from docs/design-system.md)
   ------------------------------------------------------------ */
:root {
  /* Palette C, "Бумага" - the same values as the :root block in src/client/app.css, so the
     landing and the app read as one product. Picked by Max on 2026-09-20. */
  --bg: #F7F5EF;
  --bg-sunken: #F0ECE2;
  --bg-raised: #FFFFFF;
  --border: #E6E0D4;
  --border-strong: #CFC8B8;
  --text: #1B2A33;
  --text-muted: #6A6A5E;
  --text-faint: #8D8D7F;
  --brand: #159AA8;
  --brand-ink: #0C757F;
  --brand-wash: #DFF0F2;
  --field: #FFFFFF;
  --field-border: #C7DDDA;
  --accent: #4A7C3F;
  --accent-wash: #EAF1E5;
  --warn: #94501D;
  --warn-wash: #FBF0E2;
  --danger: #9D321E;
  --danger-wash: #FBEAE5;
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: var(--brand-ink);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* ------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 16px; /* phone gutter */
}

.wrap--narrow {
  max-width: 68ch; /* prose line length never exceeds 68 characters */
}

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

/* ------------------------------------------------------------
   Header (identical across all pages)
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

/* The mark is an <img> pointing at /icons/icon.svg, not SVG pasted into the page.
   It used to be pasted, in eight places across four files, and it drifted: the favicon was a
   bubble with five bars while every page header drew a bubble with three dots, and nobody
   noticed until Max did (2026-09-20). One file now, so they cannot disagree again. */
.brand-mark {
  display: inline-flex;
  flex: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ------------------------------------------------------------
   Buttons (10px controls, 120ms ease-out)
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color 120ms ease-out, border-color 120ms ease-out,
    color 120ms ease-out;
}

.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--brand-ink);
}

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  padding-block: 56px 40px;
}

.hero-inner {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 68ch;
  margin-inline: auto;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-faint);
}

/* ------------------------------------------------------------
   Proof strip (product shot)
   ------------------------------------------------------------ */
.proof {
  padding-block: 40px 56px;
}

.proof-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin-inline: auto;
}

.proof-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  display: inline-flex;
}

.thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.proof-body {
  flex: 1 1 auto;
  min-width: 0;
}

.comment {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.comment .author {
  font-weight: 700;
}

/* The same box as the app's, to the pixel: white fill, one turquoise hairline, and the caption
   riding on the top border instead of taking a line inside. Whatever the landing promises here
   is what the person meets one click later, so these two rules are kept in step by hand with
   `.draft-block` / `.draft-label` in src/client/app.css. */
.draft-box {
  position: relative;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 12px;
}

.draft-label {
  position: absolute;
  top: -7px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  background: var(--bg-raised);
  font-size: 10px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.reply-mark {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--brand);
}

.draft-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.draft-text {
  flex: 1 1 200px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

.send-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.skip-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
}

.proof-caption {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 16px;
}

/* ------------------------------------------------------------
   Generic section
   ------------------------------------------------------------ */
.section {
  padding-block: 56px;
}

.section--tint {
  background: var(--bg-sunken);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 68ch;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  max-width: 68ch;
}

/* ------------------------------------------------------------
   How it works (steps)
   ------------------------------------------------------------ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 650;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Why it is not just a chatbot (feature blocks)
   ------------------------------------------------------------ */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  margin-bottom: 16px;
}

.feature h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 650;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Roadmap
   ------------------------------------------------------------ */
.roadmap {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadmap li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

.roadmap .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.roadmap .dot--muted {
  background: var(--border-strong);
}

.roadmap-summary {
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.45;
}

/* ------------------------------------------------------------
   Early access form
   ------------------------------------------------------------ */
.early-access {
  padding-block: 56px 72px;
}

.early-access .section-head {
  margin-inline: auto;
  text-align: center;
}

.form-card {
  max-width: 560px;
  margin-inline: auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > label,
.fieldset > legend,
.fieldset-label {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text);
}

.field .hint {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-faint);
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fieldset legend {
  padding: 0;
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px; /* 16px so iOS Safari does not zoom on focus */
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-option {
  position: relative;
  display: inline-flex;
  flex: 1 1 auto;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.radio-option label {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out,
    color 120ms ease-out;
}

.radio-option input:checked + label {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-ink);
}

.radio-option input:focus-visible + label {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.form-submit {
  margin-top: 24px;
  width: 100%;
  font-size: 16px;
}

.form-footnote {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-faint);
  text-align: center;
}

.form-thanks {
  text-align: center;
  padding: 24px 0;
}

.form-thanks-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.form-thanks p {
  color: var(--text-muted);
}

/* Shown in place of a raw error page when the sign-up request does not get through. */
.form-error {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--danger, #b4433a);
  text-align: center;
}

/* ------------------------------------------------------------
   Footer (identical across all pages)
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-note {
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.45;
  max-width: 68ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}

.footer-nav a:hover {
  color: var(--brand-ink);
  text-decoration: none;
}

/* ------------------------------------------------------------
   Legal pages
   ------------------------------------------------------------ */
.legal {
  padding-block: 48px 64px;
}

.legal-header {
  margin-bottom: 32px;
}

.legal-header h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-updated {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-faint);
}

.legal-prose {
  max-width: 68ch;
}

.legal-prose h2 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-prose h2:first-of-type {
  margin-top: 0;
}

.legal-prose h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 650;
  margin-top: 16px;
  margin-bottom: 8px;
}

.legal-prose p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.legal-prose ul,
.legal-prose ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.legal-prose li {
  margin-bottom: 8px;
}

.legal-prose strong {
  color: var(--text);
}

.legal-prose a {
  font-weight: 400;
}

.legal-prose .todo {
  display: inline-block;
  background: var(--bg-sunken);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 14px;
  line-height: 1.45;
}

.legal-prose .steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.legal-prose .steps .step {
  align-items: flex-start;
}

/* ------------------------------------------------------------
   Responsive — tablet and up
   ------------------------------------------------------------ */
@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .step {
    flex-direction: column;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: 24px; /* desktop gutter */
  }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ------------------------------------------------------------
   Deletion status — the block the server writes into the data
   deletion page when Meta sends somebody here with a code.
   ------------------------------------------------------------ */
.status-card {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  background: var(--brand-wash);
}
.status-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.status-card p {
  margin: 0;
}
