/* Tome — the same warm, printed-page feel as the app.
   Palette mirrors lib/theme.dart so the site and the product read as one
   thing rather than a marketing page bolted onto a different product. */

:root {
  --bg: #F4EEE2;
  --card: #FBF7EE;
  --panel-alt: #EFE7D8;
  --ink: #3A2F26;
  --text: #3A2F26;
  --text-body: #463B2E;
  --text-secondary: #6B5D4B;
  --text-muted: #9C8B72;
  --amber: #C9A26B;
  --amber-deep: #8A5A34;
  --border: #D9CBB2;
  --border-warm: #E3D6BC;
  --border-tag: #D9BE93;
  --error: #A3452F;
  --success: #5F7A4E;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  /* Georgia first: a screen-readable serif present nearly everywhere, so the
     page looks right immediately with no webfont round trip. */
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Faint ruled paper, echoing the app's background. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 39px,
    rgba(138, 90, 52, 0.055) 39px 40px
  );
}

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

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 76px 24px 40px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 11vw, 76px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tagline {
  margin: 8px 0 22px;
  font-size: clamp(17px, 3.4vw, 20px);
  color: var(--text-secondary);
  font-style: italic;
}

.lede {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-secondary);
}

main { max-width: 1120px; margin: 0 auto; padding: 0 24px 40px; }

/* ---------------------------------------------------------------- account */

.account {
  max-width: 620px;
  margin: 0 auto 30px;
}

.account-inner {
  background: var(--card);
  border: 1px solid var(--border-warm);
  border-radius: 14px;
  padding: 20px 22px;
  text-align: center;
}

.account-line { margin: 0 0 12px; font-size: 15px; color: var(--text-secondary); }
.account-line:last-child { margin-bottom: 0; }
.account-line.muted { color: var(--text-muted); font-size: 14px; }
.account-line.error { color: var(--error); }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--amber-deep);
  text-decoration: underline;
  cursor: pointer;
}

/* --------------------------------------------------------------- controls */

.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--amber-deep); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--amber-deep);
  border-color: var(--border-tag);
}
.btn-outline:hover:not(:disabled) { background: var(--panel-alt); }

.btn:disabled { opacity: 0.45; cursor: default; }

#sign-in { width: auto; padding-inline: 32px; }

.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 26px;
}

.toggle {
  background: transparent;
  border: 1px solid var(--border-warm);
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.save {
  font-size: 12px;
  font-style: italic;
  opacity: 0.8;
}

/* ------------------------------------------------------------------ plans */

.plans {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  align-items: start;
}

.plan {
  background: var(--card);
  border: 1px solid var(--border-warm);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan.featured {
  border-color: var(--amber);
  border-width: 2px;
}

.flag {
  margin: -6px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.plan h2 {
  margin: 0 0 6px;
  font-size: 23px;
  color: var(--ink);
}

.price { margin: 0 0 4px; }
.amount { font-size: 33px; font-weight: 700; color: var(--ink); }
.period { font-size: 14px; color: var(--text-muted); }

.blurb {
  margin: 0 0 16px;
  font-size: 14.5px;
  font-style: italic;
  color: var(--text-muted);
}

.plan ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  flex-grow: 1;
}

.plan li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: 15px;
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--amber-deep);
  font-weight: 700;
}

.cta-note {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  padding: 13px 0;
}

/* ------------------------------------------------------------------ story */

.story {
  max-width: 640px;
  margin: 68px auto 0;
  text-align: left;
}

.story h2 {
  font-size: 27px;
  color: var(--ink);
  margin: 0 0 14px;
  text-align: center;
}

.story p { margin: 0 0 16px; color: var(--text-secondary); }

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

footer {
  margin-top: 70px;
  padding: 28px 24px 44px;
  text-align: center;
  border-top: 1px solid var(--border-warm);
  color: var(--text-muted);
  font-size: 14px;
}

footer p { margin: 0 0 6px; }
footer a { color: var(--amber-deep); }
.fine { font-size: 12.5px; }

@media (max-width: 560px) {
  .hero { padding-top: 52px; }
  body { font-size: 16px; }
}
