/* ── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1D9E75;
  --deep-green:  #1A2E1A;
  --cream:       #F8F5F0;
  --cream-dark:  #EDE9E3;
  --cream-mid:   #E5E0D8;
  --text:        #1A1A1A;
  --text-mid:    #4A4A4A;
  --text-muted:  #888;
  --terracotta:  #C4622D;
  --radius:      12px;
  --max:         960px;
  --max-narrow:  680px;
  --serif:       'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout helpers ─────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
.wrap-narrow {
  max-width: var(--max-narrow);
}

/* ── Nav ────────────────────────────────────────────────────────────── */
nav {
  padding: 22px 0;
  position: relative;
  z-index: 10;
}
nav.nav-light {
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-logo strong { font-weight: 700; color: var(--green); }
.nav-logo span   { font-weight: 400; color: var(--deep-green); }
nav.nav-light .nav-logo strong { color: var(--green); }
nav.nav-light .nav-logo span   { color: var(--deep-green); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-mid);
}
.nav-links a:hover { color: var(--green); text-decoration: none; }

/* ── Shared type ────────────────────────────────────────────────────── */
.serif-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--deep-green);
}
.body-copy {
  font-size: 1.0625rem;
  color: var(--text-mid);
  line-height: 1.75;
}
.body-copy--muted {
  color: rgba(248, 245, 240, 0.72);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--cream);
  color: var(--deep-green);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 100px;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .9; text-decoration: none; }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 100px;
  border: 1.5px solid rgba(248,245,240,.4);
  transition: border-color .15s, opacity .15s;
}
.btn-ghost:hover { border-color: var(--cream); text-decoration: none; opacity: .9; }

/* App Store badge */
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--deep-green);
  color: #fff;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity .15s;
}
.app-badge:hover { opacity: .88; text-decoration: none; }
.app-badge svg { flex-shrink: 0; }
.app-badge-label { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge-label small  { font-size: 0.65rem; font-weight: 400; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
.app-badge-label strong { font-size: 1rem; }

/* ── iPhone frame mockup ────────────────────────────────────────────── */
.iphone-frame {
  position: relative;
  display: inline-block;
  background: #1C1C1E;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 32px 80px rgba(0,0,0,.35),
    0 8px 24px rgba(0,0,0,.2);
  /* Explicit size: 300px wide → inner ~276px → ~600px tall at 9:19.5 ratio */
  width: 300px;
  max-width: 100%;
  flex-shrink: 0;
}

/* Dynamic island */
.iphone-frame::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #1C1C1E;
  border-radius: 20px;
  z-index: 2;
}

/* Home indicator */
.iphone-frame::after {
  content: '';
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
}

.iphone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 33px;
  object-fit: cover;
}

/* Dual-phone fanned layout */
.phone-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
.phone-pair .iphone-frame {
  width: 260px;
}
.phone-pair .iphone-frame:first-child {
  transform: rotate(-6deg) translateX(28px);
  z-index: 1;
}
.phone-pair .iphone-frame:last-child {
  transform: rotate(6deg) translateX(-28px);
  z-index: 2;
}

/* Hero frame: slightly smaller than single-phone sections */
.hero-screenshot-wrap .iphone-frame {
  width: min(280px, 60vw);
}

/* ── 1. HERO ────────────────────────────────────────────────────────── */
.hero-v2 {
  background: var(--deep-green);
  padding: 72px 0 0;
  overflow: hidden;
}
.hero-v2-text {
  text-align: center;
  padding-bottom: 56px;
}
.hero-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 20px;
}
.hero-subhead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(248,245,240,.85);
  margin-bottom: 10px;
}
.hero-subhead-secondary {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: rgba(248,245,240,.95);
  margin-bottom: 40px;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-icon {
  margin-bottom: 32px;
}
.hero-icon img {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}

.hero-screenshot-wrap {
  display: flex;
  justify-content: center;
  padding: 0 28px;
  margin-top: 56px;
}

/* ── 2. TAGLINE STRIP ───────────────────────────────────────────────── */
.tagline-strip {
  background: #fff;
  border-bottom: 1px solid var(--cream-dark);
  padding: 56px 0;
  text-align: center;
}
.tagline-main {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--deep-green);
  margin-bottom: 12px;
  line-height: 1.3;
}
.tagline-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── 3. CENTERED CONTENT (Library) ─────────────────────────────────── */
.content-centered {
  padding: 96px 0;
  text-align: center;
  background: var(--cream);
}
.content-centered .serif-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  margin-bottom: 24px;
}
.content-centered .body-copy {
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── 4–6. SPLIT CONTENT (Shelf, Log, Stats) ─────────────────────────── */
.content-split {
  padding: 96px 0;
  background: var(--cream);
}
.content-split--tinted {
  background: #fff;
}
.content-split .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.content-split--reversed .wrap {
  direction: rtl;
}
.content-split--reversed .wrap > * {
  direction: ltr;
}

.split-text { display: flex; flex-direction: column; gap: 20px; }
.split-text .serif-headline { margin-bottom: 4px; }

.split-image {
  display: flex;
  justify-content: center;
}

/* Tier list */
.tier-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.tier-list li {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.5;
  padding-left: 16px;
  border-left: 2px solid var(--cream-dark);
}
.tier-name {
  font-weight: 600;
  color: var(--deep-green);
}

/* ── 5. LOG BENEFITS ─────────────────────────────────────────────────── */
.log-benefits {
  background: #fff;
  padding: 96px 0;
}
.log-benefits .serif-headline {
  text-align: center;
  margin-bottom: 56px;
}
.log-pairs {
  display: flex;
  flex-direction: column;
  gap: 56px;
  max-width: 820px;
  margin: 0 auto;
}
.log-pair {
  display: flex;
  align-items: center;
  gap: 48px;
}
.log-pair:nth-child(even) { flex-direction: row-reverse; }
.log-pair .iphone-frame {
  width: 160px;
  flex-shrink: 0;
}
.log-pair .ui-card {
  width: 280px;
  flex-shrink: 0;
}
.log-pair-copy {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--deep-green);
  line-height: 1.35;
}

/* ── 7. ALERTS ──────────────────────────────────────────────────────── */
.alerts-v2 {
  background: var(--deep-green);
  padding: 96px 0;
}
.alerts-v2 .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.alerts-v2 .serif-headline {
  color: var(--cream);
  margin-bottom: 4px;
}

/* ── 8. CTA ─────────────────────────────────────────────────────────── */
.cta-v2 {
  background: var(--cream);
  border-top: 1px solid var(--cream-dark);
  padding: 96px 0;
  text-align: center;
}
.cta-v2-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cta-v2 .serif-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 300;
}
.cta-v2 .body-copy { color: var(--text-mid); }
.cta-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── 9. FOOTER ──────────────────────────────────────────────────────── */
.footer-v2 {
  background: var(--deep-green);
  padding: 52px 0 40px;
}
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.125rem;
  color: rgba(248,245,240,.6);
  text-align: center;
  margin-bottom: 32px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(248,245,240,.1);
}
.footer-copy {
  font-size: 0.8125rem;
  color: rgba(248,245,240,.4);
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-size: 0.8125rem;
  color: rgba(248,245,240,.4);
}
.footer-links a:hover { color: var(--cream); text-decoration: none; }

/* ── Prose pages (Privacy, Terms) ───────────────────────────────────── */
/* These styles are used by privacy.html and terms.html */
footer:not(.footer-v2) {
  border-top: 1px solid var(--cream-dark);
  padding: 28px 0;
}
footer:not(.footer-v2) .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer:not(.footer-v2) .footer-copy { color: var(--text-muted); }
footer:not(.footer-v2) .footer-links a { color: var(--text-muted); }
footer:not(.footer-v2) .footer-links a:hover { color: var(--green); }

.prose-page {
  padding: 64px 0 80px;
}
.prose-page h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--deep-green);
  margin-bottom: 8px;
  font-weight: 700;
}
.prose-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cream-dark);
}
.prose h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--deep-green);
  font-weight: 700;
  margin: 36px 0 12px;
}
.prose p, .prose li {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 12px;
}
.prose ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.prose ul li { margin-bottom: 6px; }
.prose a { color: var(--green); }

/* ── UI Card components (Section 5) ─────────────────────────────────── */
.ui-card {
  background: var(--cream);
  border: 1px solid var(--cream-mid);
  border-radius: var(--radius);
  overflow: hidden;
}
.ui-card-header {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--deep-green);
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--cream-mid);
}

/* Rating scale */
.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--cream-dark);
}
.rating-row:last-child { border-bottom: none; }
.rating-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-mid);
  flex-shrink: 0;
  border-radius: 50%;
}
.rating-num--10 { background: var(--terracotta); color: #fff; }
.rating-num--9  { background: var(--green);      color: #fff; }
.rating-num--8  { background: var(--deep-green);  color: #fff; }
.rating-desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.rating-row--muted .rating-num,
.rating-row--muted .rating-desc { color: var(--text-muted); }

/* Must Recommends */
.genre-group {
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--cream-mid);
}
.genre-group:last-child { border-bottom: none; }
.genre-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep-green);
  margin-bottom: 6px;
}
.genre-count { font-weight: 400; }
.book-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.book-row:last-child { border-bottom: none; }
.book-row .rating-num { margin-top: 1px; }
.book-info { flex: 1; min-width: 0; }
.book-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--deep-green);
  line-height: 1.3;
}
.book-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.book-quote {
  font-size: 0.75rem;
  color: var(--green);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.3;
}

/* Leaderboard */
.leaderboard-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--cream-mid);
}
.leaderboard-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toggle-pill {
  display: flex;
  background: var(--cream-dark);
  border-radius: 100px;
  padding: 2px;
}
.toggle-pill span {
  font-size: 0.625rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  color: var(--text-muted);
}
.toggle-pill span.active {
  background: #fff;
  color: var(--deep-green);
  font-weight: 600;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--cream-dark);
}
.leaderboard-row:last-child { border-bottom: none; }
.lb-rank {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.lb-info { flex: 1; }
.lb-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--deep-green);
  line-height: 1.2;
}
.lb-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.lb-chevron {
  font-size: 1rem;
  color: var(--cream-mid);
  flex-shrink: 0;
  line-height: 1;
}

/* ── Hero lock screen ────────────────────────────────────────────────── */
.lock-screen {
  display: block;
  width: 100%;
  aspect-ratio: 6 / 13;
  border-radius: 33px;
  background: #000;
  overflow: hidden;
  position: relative;
  color: #fff;
  font-family: var(--sans);
  padding: 52px 0 28px;
  box-sizing: border-box;
  text-align: center;
}
.ls-time {
  font-size: 4rem;
  font-weight: 200;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}
.ls-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  margin-bottom: 20px;
}
.ls-notification {
  background: rgba(50,50,50,0.92);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 14px;
  text-align: left;
}
.ls-notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.ls-notif-icon {
  width: 22px;
  height: 22px;
  background: #2A5A41;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: #5FCAA5;
  flex-shrink: 0;
  line-height: 1;
}
.ls-notif-app {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
  flex: 1;
}
.ls-notif-time {
  font-size: 11px;
  color: rgba(255,255,255,0.60);
}
.ls-notif-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  line-height: 1.3;
}
.ls-notif-body {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.95);
  line-height: 1.35;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .content-split .wrap,
  .content-split--reversed .wrap,
  .alerts-v2 .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    direction: ltr;
  }

  /* On mobile, always put image after text */
  .content-split--reversed .wrap .split-image { order: 1; }
  .content-split--reversed .wrap .split-text  { order: 0; }

  .iphone-frame { width: min(260px, 70vw); }
  .hero-screenshot-wrap .iphone-frame { width: min(220px, 55vw); }
  .phone-pair .iphone-frame { width: min(180px, 40vw); }
  .log-pair { gap: 24px; }
  .log-pair .iphone-frame { width: min(140px, 38vw); }
  .phone-pair .iphone-frame:first-child { transform: rotate(-5deg) translateX(16px); }
  .phone-pair .iphone-frame:last-child  { transform: rotate(5deg) translateX(-16px); }

  .hero-v2 { padding-top: 56px; }
  .hero-v2-text { padding-bottom: 40px; }
  .content-centered,
  .content-split,
  .content-split--tinted,
  .alerts-v2,
  .cta-v2 { padding: 64px 0; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
  footer:not(.footer-v2) .wrap { flex-direction: column; align-items: flex-start; }

  .cta-v2 .serif-headline br { display: none; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .nav-links { gap: 18px; }
  .iphone-frame { width: min(240px, 72vw); }
  .hero-screenshot-wrap .iphone-frame { width: min(200px, 60vw); }
  .phone-pair .iphone-frame { width: min(150px, 36vw); }
  .hero-icon img { width: 80px; height: 80px; }
  .log-pair { flex-direction: column; align-items: center; }
  .log-pair:nth-child(even) { flex-direction: column; }
  .log-pair .iphone-frame { width: min(200px, 60vw); }
  .log-pair .ui-card { width: 100%; max-width: 340px; }
}
