/* Bookmuse — bookmuse.date */

:root {
  color-scheme: light;

  --bg: #fbf8f3;
  --paper: #f5f1e8;
  --card: #ffffff;
  --ink: #1d1a16;
  --ink-2: #5b544c;
  --ink-3: #8b8379;
  --line: rgba(29, 26, 22, 0.09);
  --accent: #a84c15;
  --accent-hover: #933f0c;
  --accent-soft: #fbe9db;
  --peach: #ffb98a;
  --sun: #ffd166;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --radius: 22px;
  --shadow-card: 0 1px 2px rgba(29, 26, 22, 0.04), 0 8px 28px rgba(29, 26, 22, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 28px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 10px; }

/* ---------- Navigation (glass bar) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 22.5%; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  letter-spacing: -0.005em;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(168, 76, 21, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-glass {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-glass:hover { background: #fff; color: var(--ink); }

.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }

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

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p, li { text-wrap: pretty; }

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 20px 0 0;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- iPhone frame ---------- */

.phone {
  --pw: 300px;
  width: var(--pw);
  flex: none;
  container-type: inline-size;
}
.phone .bezel {
  position: relative;
  padding: 3cqw;
  border-radius: 16.4cqw;
  background: linear-gradient(145deg, #3b3a3c, #1a191b 40%, #2a292b);
  box-shadow:
    inset 0 0 0 0.6cqw #4a494c,
    inset 0 0 0 1.1cqw #121113,
    0 2px 4px rgba(29, 26, 22, 0.1),
    0 30px 60px -12px rgba(29, 26, 22, 0.28),
    0 18px 36px -18px rgba(29, 26, 22, 0.3);
}
/* side buttons */
.phone .bezel::before,
.phone .bezel::after {
  content: "";
  position: absolute;
  width: 0.9cqw;
  border-radius: 1cqw;
  background: #2c2b2e;
}
.phone .bezel::before { left: -0.6cqw; top: 26%; height: 12%; box-shadow: 0 -9cqw 0 0 #2c2b2e; }
.phone .bezel::after { right: -0.6cqw; top: 30%; height: 18%; }

.phone img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  border-radius: 13.4cqw;
  background: var(--paper);
}

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

.hero {
  position: relative;
  padding: 64px 0 0;
  text-align: center;
  overflow: clip visible; /* let the glow fade into the next section */
}
.hero::before {
  /* a soft sunrise, like the icon */
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(1100px, 160vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 209, 102, 0.42), rgba(255, 185, 138, 0.32) 45%, rgba(255, 185, 138, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 26px;
}
.pill:hover { color: var(--ink); }
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.16);
}

.hero .display { max-width: 15ch; margin: 0 auto; }
.hero .lede { max-width: 36em; margin-left: auto; margin-right: auto; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.fine {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.hero-phones {
  --cw: clamp(240px, 34vw, 320px);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 64px;
  height: calc(var(--cw) * 1.62);
  overflow: visible clip; /* phones sink into the page; the sides may lean out */
}
.hero-phones .phone { position: absolute; top: 0; }
.hero-phones .center { --pw: var(--cw); z-index: 2; }
.hero-phones .side { --pw: clamp(210px, 29vw, 276px); top: 48px; opacity: 0.98; }
.hero-phones .left { transform: translateX(-74%) rotate(-5deg); }
.hero-phones .right { transform: translateX(74%) rotate(5deg); }
@media (max-width: 560px) {
  .hero-phones .left { transform: translateX(-62%) rotate(-6deg); }
  .hero-phones .right { transform: translateX(62%) rotate(6deg); }
}
/* fade the bottom of the phones into the page */
.hero-phones::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(251, 248, 243, 0), var(--bg) 92%);
  z-index: 3;
  pointer-events: none;
}

/* ---------- Value strip ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 8px auto 0;
}
.strip div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-2);
}
.strip strong { display: block; color: var(--ink); font-weight: 600; }
.strip svg { width: 28px; height: 28px; flex: none; color: var(--accent); }
@media (max-width: 760px) {
  .strip { grid-template-columns: 1fr; }
}

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

.section { padding: 120px 0 0; }
@media (max-width: 760px) { .section { padding-top: 88px; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto; }

.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 72px;
  padding: 56px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .copy { order: 2; }
.feature .copy { max-width: 470px; }
.feature.flip .copy { justify-self: end; }
.feature .phone { --pw: clamp(240px, 26vw, 290px); }
.feature .phones { display: flex; gap: 22px; align-items: flex-start; }
.feature .phones .phone:nth-child(2) { margin-top: 48px; }
.feature .phones .phone { --pw: clamp(200px, 21vw, 250px); }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.5;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.4l2.6 2.6L14 7.6' fill='none' stroke='%23a84c15' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

@media (max-width: 860px) {
  .feature, .feature.flip {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    justify-items: center;
  }
  .feature.flip .copy { order: 0; justify-self: center; }
  .checks { text-align: left; max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 520px) {
  .feature .phones { gap: 12px; }
  .feature .phones .phone { --pw: calc((100vw - 2 * var(--gutter) - 12px) / 2); }
}

/* ---------- Card grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}
.card .icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

/* ---------- Privacy band ---------- */

.privacy-band {
  margin-top: 120px;
  padding: 72px var(--gutter);
  border-radius: 32px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 209, 102, 0.22), rgba(255, 185, 138, 0) 60%),
    var(--paper);
  text-align: center;
}
.privacy-band .lede { max-width: 34em; margin-left: auto; margin-right: auto; }
.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.promises span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  font-weight: 500;
}
.promises svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 760px) { .privacy-band { margin-top: 88px; padding: 56px 20px; border-radius: 26px; } }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin: 48px auto 0; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 9v10M9 14h10' stroke='%235b544c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); font-size: 16px; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer ol, .faq .answer ul { margin: 0 0 10px; padding-left: 22px; }

/* ---------- Final CTA ---------- */

.final {
  text-align: center;
  padding: 120px 0 40px;
}
.final .app-icon {
  width: 96px; height: 96px;
  margin: 0 auto 28px;
  border-radius: 22.5%;
  box-shadow: 0 12px 32px rgba(168, 76, 21, 0.22);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
}
.steps li {
  counter-increment: step;
  background: var(--card);
  border-radius: 18px;
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-card);
  font-size: 15px;
  color: var(--ink-2);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}
.steps strong { display: block; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; max-width: 420px; } }

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

.footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--ink-3);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer .brand { font-size: 15px; }
.footer .brand img { width: 24px; height: 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { color: var(--ink-2); }
.footer nav a:hover { color: var(--ink); }

/* ---------- Document pages (privacy, support) ---------- */

.doc { max-width: 720px; margin: 0 auto; padding: 72px var(--gutter) 0; }
.doc h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
.doc .meta { margin: 14px 0 0; color: var(--ink-3); font-size: 15px; }
.doc .summary {
  margin: 36px 0 8px;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--paper);
  font-size: 17px;
  color: var(--ink);
}
.doc h2 { font-size: 22px; letter-spacing: -0.01em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--ink); font-weight: 600; }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
  padding: 26px 26px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.contact-card h2 { margin: 0 0 4px; font-size: 20px; }
.contact-card p { margin: 0; font-size: 15px; }

.doc .faq { margin-top: 8px; }

/* ---------- Reveal on scroll (only when JS runs and motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
