/* Liber's site: the app's own paper, ink and type (New York and San Francisco on Apple devices). */
:root {
  --paper: #f5f4f1;
  --paper-2: #efede8;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #4d4d52;
  --ink-3: #6b6b70;
  --rule: rgba(29, 29, 31, 0.1);
  --dark: #0e0d0c;
  --light: rgba(255, 244, 226, 1);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper) linear-gradient(180deg, #f8f7f4 0%, #f5f4f1 40%, #efede8 100%) no-repeat;
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.soft { color: var(--ink-3); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.06; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* the bar */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(245, 244, 241, 0.8); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--rule); }
.bar-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.mark { font: 600 24px/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: none; gap: 28px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; transition: color 150ms var(--ease); }
.nav a:hover { color: var(--ink); }
@media (min-width: 820px) { .nav { display: flex; } }
.pill { margin-left: auto; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform 150ms var(--ease), background 150ms var(--ease); }
@media (min-width: 820px) { .pill { margin-left: 8px; } }
.pill:active, .button:active { transform: scale(0.97); }
[data-app][aria-disabled="true"] { background: rgba(29, 29, 31, 0.08); color: var(--ink-2); pointer-events: none; }

/* hero */
.hero { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 56px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.2fr 0.8fr; padding-top: 72px; padding-bottom: 88px; } }
/* sized to its column, so "Your cookbooks," always fits on the first line */
.hero-copy { container-type: inline-size; }
.hero h1 { font-size: min(clamp(44px, 7.4vw, 84px), 12.2cqi); line-height: 1.02; letter-spacing: -0.02em; }
.cycle { display: inline-grid; vertical-align: bottom; }
.cycle > span { grid-area: 1 / 1; transition: opacity 260ms var(--ease), transform 260ms var(--ease); }
.cycle > span.out { opacity: 0; transform: translateY(-0.18em); }
.cycle > span.in { opacity: 0; transform: translateY(0.18em); }
.cycle > .hold { visibility: hidden; }
.lede { margin: 22px 0 0; max-width: 34em; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 600; text-decoration: none; transition: transform 150ms var(--ease); }
.cta-note { font-size: 15px; color: var(--ink-3); }
.hero-phone { display: flex; justify-content: center; }

/* a phone with a real screen in it */
.phone { position: relative; width: min(320px, 78vw); aspect-ratio: 1206 / 2622; border-radius: 52px; padding: 10px; background: #111; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 60px -20px rgba(40, 30, 20, 0.45), 0 12px 24px -12px rgba(40, 30, 20, 0.3); }
.phone .screen { width: 100%; height: 100%; object-fit: cover; border-radius: 42px; background: var(--paper); }
.phone.small { width: min(240px, 64vw); border-radius: 40px; padding: 8px; }
.phone.small .screen { border-radius: 32px; }

/* three ways in */
.ways { border-block: 1px solid var(--rule); background: rgba(255, 255, 255, 0.45); }
.ways-row { display: grid; gap: 22px; padding-top: 26px; padding-bottom: 26px; }
@media (min-width: 820px) { .ways-row { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.way { display: flex; gap: 14px; align-items: flex-start; }
.way svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.way b { display: block; font-size: 16px; }
.way span { display: block; font-size: 15px; line-height: 1.45; color: var(--ink-3); }

/* sections */
.section { padding-top: 72px; padding-bottom: 72px; }
@media (min-width: 900px) { .section { padding-top: 104px; padding-bottom: 104px; } }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 48px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { display: flex; flex-direction: column; align-items: flex-start; }
.steps .phone { margin-bottom: 26px; }
.steps h3 { font-size: 24px; line-height: 1.2; display: flex; align-items: baseline; gap: 10px; }
.num { font: 600 13px/1 var(--sans); color: var(--ink-3); min-width: 1.2em; }
.steps p { margin: 8px 0 0; color: var(--ink-2); max-width: 26em; }

/* the dark room */
.dark { position: relative; overflow: hidden; background: var(--dark) radial-gradient(60% 70% at 70% 30%, rgba(255, 244, 226, 0.14), rgba(255, 244, 226, 0) 70%); color: #f7f4ee; }
.dark-row { display: grid; gap: 44px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 900px) { .dark-row { grid-template-columns: 1fr 1fr; padding-top: 112px; padding-bottom: 112px; } }
.dark h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.dark p { margin: 20px 0 0; max-width: 30em; font-size: 19px; color: rgba(247, 244, 238, 0.72); }
.dark .phone { justify-self: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -24px rgba(0, 0, 0, 0.9); }

/* what it keeps: a list, not a grid of cards */
.keeps { margin: 44px 0 0; display: grid; gap: 0 48px; }
@media (min-width: 820px) { .keeps { grid-template-columns: 1fr 1fr; } }
.keeps div { padding: 18px 0; border-top: 1px solid var(--rule); }
.keeps dt { font: 600 19px/1.3 var(--serif); }
.keeps dd { margin: 4px 0 0; color: var(--ink-2); }

/* inside */
.inside { padding: 72px 0 80px; border-block: 1px solid var(--rule); background: rgba(255, 255, 255, 0.45); }
.shots { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 40px max(20px, calc((100vw - 1120px) / 2 + 32px)) 8px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots figure { margin: 0; scroll-snap-align: center; flex: none; }
.shots figcaption { margin-top: 16px; max-width: 240px; font-size: 15px; color: var(--ink-2); }

/* privacy */
.points { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 22px; }
@media (min-width: 820px) { .points { grid-template-columns: 1fr 1fr; gap: 28px 48px; } }
.points li { color: var(--ink-2); max-width: 34em; }
.points b { color: var(--ink); }

/* pricing */
.plans { display: grid; gap: 20px; margin-top: 44px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border-radius: 24px; padding: 28px; background: var(--card); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); }
.plan h3 { font-size: 22px; }
.price { margin: 12px 0 0; font: 600 40px/1.1 var(--serif); }
.price span { font: 400 17px/1 var(--sans); color: var(--ink-3); }
.for { margin: 6px 0 0; color: var(--ink-2); }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.plan.plus { background: var(--ink); color: #f7f4ee; box-shadow: none; }
.plan.plus .for, .plan.plus .price span { color: rgba(247, 244, 238, 0.7); }
.fine { margin: 18px 0 0; font-size: 14px; color: var(--ink-3); }

/* faq */
.faq { padding: 72px 0 96px; }
.faq h2 { margin-bottom: 28px; }
.faq details { max-width: 760px; border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; position: relative; font: 600 19px/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font: 300 24px/1 var(--sans); color: var(--ink-3); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; max-width: 40em; color: var(--ink-2); }

/* footer */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 32px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot-row p { margin: 6px 0 0; font-size: 15px; }
.foot nav { display: flex; gap: 24px; font-size: 15px; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.copy { margin-top: 28px; font-size: 13px; color: var(--ink-3); }

/* the legal pages */
.doc { max-width: 720px; padding-top: 56px; padding-bottom: 88px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; }
.doc h2 { font-size: 24px; line-height: 1.25; margin-top: 40px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { color: var(--ink-3); font-size: 15px; }

/* things that move: in only, quickly; nothing at all if you've asked for less motion */
.rise { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.rise.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .cycle > span { transition: none; }
}
