/* Dogear — dogearreader.com
   The app's palette and type: lavender and plum from the guide cover, cream paper, Fraunces and Inter. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --lavender: #b6a1d3;
  --lavender-soft: #d9cdea;
  --plum: #3b2350;
  --ink: #2a1b33;
  --cream: #fcefda;
  --paper: #faf8f3;
  --text: #262320;
  --muted: #6d6476;
  --night: #1e1726;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --wrap: min(1160px, 100% - 48px);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 800;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--plum);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7vw, 5.6rem); }
h2 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }
h3 { font-size: 1.45rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: var(--wrap); margin-inline: auto; }
.eyebrow {
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  opacity: 0.7;
  margin-bottom: 18px;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 34ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 14px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--plum) 8%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum);
  font: 800 1.35rem/1 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-header nav { display: flex; gap: 26px; margin-left: auto; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--plum); }
.beta-pill { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--plum); color: var(--cream);
  font: 600 0.9rem/1 var(--sans); text-decoration: none; }
.beta-pill:hover { background: var(--ink); }

/* ── Buttons ──────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--plum); color: var(--cream);
  font: 600 1rem/1 var(--sans); text-decoration: none;
  box-shadow: 0 10px 26px rgb(59 35 80 / 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgb(59 35 80 / 0.3); }
.button.soon { cursor: default; }
.button.soon:hover { transform: none; }
.button svg { width: 20px; height: 20px; }
.button.ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--plum) 30%, transparent); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: radial-gradient(120% 90% at 20% 0%, #cbbbe2 0%, var(--lavender) 48%, #9e86c0 100%);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
  padding-block: clamp(56px, 9vw, 112px);
}
.hero h1 { color: var(--plum); }
.hero .lede { color: color-mix(in srgb, var(--plum) 80%, transparent); margin-top: 22px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 34px; }
.hero .note { font-size: 0.9rem; color: color-mix(in srgb, var(--plum) 70%, transparent); }
.hero-media { position: relative; justify-self: center; width: min(360px, 100%); padding: 18px; }
.hero-media video {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 34px; background: var(--cream);
  box-shadow: 0 40px 80px rgb(42 27 51 / 0.35), 0 0 0 10px rgb(255 255 255 / 0.18);
}
.sound {
  position: absolute; right: 16px; bottom: 16px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgb(30 23 38 / 0.62); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.sound svg { width: 20px; height: 20px; }

/* ── Sections ─────────────────────────────────────────────── */
section { padding-block: clamp(72px, 10vw, 128px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split.reverse .copy { order: 2; }
.copy p + p { margin-top: 14px; }
.copy .lede { margin-top: 20px; }
.copy ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.copy li { display: flex; gap: 12px; align-items: baseline; }
.copy li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.5em;
  background: var(--lavender); clip-path: polygon(0 0, 100% 0, 100% 100%); }

.phone {
  width: min(320px, 80%); margin-inline: auto;
  border-radius: 44px; padding: 10px; background: #141017;
  box-shadow: 0 34px 70px rgb(42 27 51 / 0.28), inset 0 0 0 2px #3a3342;
}
.phone img { border-radius: 35px; }

/* The iPhone Duo: closed (its front screen, 1398 × 2034) and open (2852 × 2006, the fold down the middle). */
.duo-closed {
  aspect-ratio: 1398 / 2034; width: min(340px, 100%); margin-inline: auto;
  padding: 11px; border-radius: 40px; background: #17131b;
  box-shadow: 0 40px 80px rgb(42 27 51 / 0.38), inset 0 0 0 2px #3a3342, 14px 0 0 -4px #0e0b11;
  transform: rotate(-3deg);
}
.duo-closed img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.duo-open {
  position: relative; aspect-ratio: 2852 / 2006; width: 100%;
  padding: 10px; border-radius: 30px; background: #17131b;
  box-shadow: 0 34px 70px rgb(42 27 51 / 0.28), inset 0 0 0 2px #3a3342;
}
.duo-open img { width: 100%; height: 100%; object-fit: cover; border-radius: 21px; }
.duo-open::after { /* the fold */
  content: ""; position: absolute; top: 10px; bottom: 10px; left: 50%; width: 2px; margin-left: -1px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.05));
}
/* The scroll scene: the section is tall, and its sticky panel holds the Duo on screen while it plays. */
.foldable { padding-block: 0; }
.duo-scroll { height: 320vh; height: 320svh; }
.duo-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; padding-block: calc(68px + clamp(18px, 4vh, 48px)) clamp(20px, 4vh, 40px); /* clear the sticky site header */
}
.duo-3d { position: relative; width: 100%; flex: 1; min-height: 260px; }
.duo-steps { list-style: none; display: flex; justify-content: center; gap: clamp(14px, 4vw, 48px); margin: 0; padding: 0 16px;
  font-size: 0.92rem; color: #8f80a6; }
.duo-steps li { transition: color 0.3s, opacity 0.3s; opacity: 0.55; text-align: center; }
.duo-steps li strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 800; color: inherit; }
.duo-steps li.active { color: var(--cream); opacity: 1; }
@media (max-width: 860px) {
  .duo-sticky .lede { display: none; }
  .duo-steps { font-size: 0.8rem; }
}
.duo-held .duo-scroll { height: auto; }
.duo-held .duo-sticky { position: static; height: 900px; }
@media (prefers-reduced-motion: reduce) {
  .duo-scroll { height: auto; }
  .duo-sticky { position: static; height: auto; }
  .duo-3d { height: 460px; flex: none; }
}
.duo-3d canvas { display: block; width: 100%; height: 100%; }
.duo-caption { margin-top: 8px; font-size: 0.95rem; color: #b9abcd; text-align: center; }
.duo-caption strong { color: var(--cream); font-weight: 600; }

/* The foldable, closed and open */
.foldable { background: var(--night); color: #e9e1f2; }
.foldable h2 { color: var(--cream); }
.foldable .lede, .foldable .eyebrow { color: #cdbfe0; }
.duo { display: grid; grid-template-columns: 0.42fr 1fr; gap: 28px; align-items: end; margin-top: 56px; }
.duo figure { margin: 0; }
.duo .device { background: #141017; border-radius: 30px; padding: 9px; box-shadow: 0 30px 60px rgb(0 0 0 / 0.45), inset 0 0 0 2px #3a3342; }
.duo .device img { border-radius: 22px; }
.duo figcaption { margin-top: 16px; font-size: 0.95rem; color: #b9abcd; }
.duo figcaption strong { color: var(--cream); font-weight: 600; }

/* Formats: three paper cards with a turned-down corner */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
.card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 30px 28px 32px;
  box-shadow: 0 1px 0 rgb(42 27 51 / 0.05), 0 18px 40px rgb(42 27 51 / 0.08);
  --ear: 0px;
  clip-path: polygon(0 0, calc(100% - var(--ear)) 0, 100% var(--ear), 100% 100%, 0 100%);
  transition: --ear 0.35s;
}
.card::after {
  content: ""; position: absolute; top: 0; right: 0; width: var(--ear); height: var(--ear);
  background: linear-gradient(225deg, transparent 50%, #e9dcc4 50%, #f4ead8 100%);
  border-bottom-left-radius: 6px; box-shadow: -3px 3px 8px rgb(42 27 51 / 0.12);
  transition: width 0.35s, height 0.35s;
}
.card:hover { --ear: 34px; }
.card .tag { display: inline-block; font: 600 0.78rem/1 var(--sans); letter-spacing: 0.12em; padding: 8px 12px;
  border-radius: 999px; background: var(--lavender-soft); color: var(--plum); margin-bottom: 20px; }
.card p { color: var(--muted); margin-top: 10px; font-size: 1rem; }
@property --ear { syntax: "<length>"; inherits: false; initial-value: 0px; }

/* Read your way */
.yourway { background: var(--cream); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips span { padding: 9px 15px; border-radius: 999px; background: var(--paper); border: 1px solid #eadcc2; font-size: 0.95rem; }
.chips .f1 { font-family: var(--serif); }
.chips .f2 { font-family: Georgia, serif; }
.chips .f3 { font-family: Palatino, "Palatino Linotype", serif; }
.chips .f4 { font-family: "Avenir Next", Avenir, sans-serif; }

/* Pricing */
.pricing { text-align: center; }
.pricing .lede { margin: 18px auto 0; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 22px; margin-top: 52px; text-align: left; }
.plan { background: #fff; border-radius: var(--radius); padding: 34px; box-shadow: 0 18px 40px rgb(42 27 51 / 0.08); }
.plan.pro { background: var(--plum); color: #eadff4; box-shadow: 0 24px 50px rgb(59 35 80 / 0.35); }
.plan.pro h3, .plan.pro .price { color: var(--cream); }
.plan .price { font: 800 2.6rem/1 var(--serif); color: var(--plum); margin: 14px 0 6px; }
.plan .per { font-size: 0.95rem; opacity: 0.75; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 600; color: var(--lavender); }

/* Open beta invitation */
.beta { text-align: center; background: radial-gradient(120% 120% at 50% 0%, #cbbbe2 0%, var(--lavender) 60%); }
.beta .lede { margin: 18px auto 0; max-width: 46ch; color: color-mix(in srgb, var(--plum) 80%, transparent); }
.beta .actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; }
.beta .note { font-size: 0.9rem; color: color-mix(in srgb, var(--plum) 75%, transparent); }

/* Privacy band */
.privacy-band { background: var(--lavender); text-align: center; padding-block: 72px; }
.privacy-band h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.privacy-band p { max-width: 52ch; margin: 16px auto 0; color: color-mix(in srgb, var(--plum) 82%, transparent); }

/* Watch */
.watch video { width: 100%; border-radius: var(--radius); box-shadow: 0 30px 70px rgb(42 27 51 / 0.2); background: var(--cream); }
.watch h2 { margin-bottom: 36px; text-align: center; }

/* Footer */
.site-footer { background: var(--ink); color: #b9abcd; padding-block: 56px; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand { color: var(--cream); margin-right: auto; }

/* Long-form pages: privacy, support */
.doc { padding-block: clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 720px; }
.doc h1 { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.doc .updated { color: var(--muted); margin-top: 12px; }
.doc h2 { font-size: 1.5rem; margin-top: 42px; }
.doc p, .doc li { margin-top: 12px; font-size: 1.05rem; }
.doc ol { padding-left: 1.3em; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .site-header nav { display: none; }
  .beta-pill { margin-left: auto; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .split.reverse .copy { order: 0; }
  .hero-media { width: min(300px, 100%); }
  .formats, .plans { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .duo figure:first-child { width: 62%; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .card, .card::after { transition: none; }
}
