/* Shelfish site, after Apple's Apple Books page: a white page, big centred headlines, a row of phones under the hero,
   then features as rounded tiles on light grey. The type and colour come from the Play Store set: lowercase stacked
   headlines in heavy Google Sans (a small lead-in over one big word), ink and red, the mascot dropping in here and there. */
@font-face { font-family: GS; src: url(assets/fonts/google_sans_regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: GS; src: url(assets/fonts/google_sans_medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: GS; src: url(assets/fonts/google_sans_semibold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Literata; src: url(assets/fonts/literata.ttf); font-display: swap; }

:root {
  --ink: #0A0A0B; --red: #E8202E; --deep: #C8101C; --paper: #F4F0EA;
  --text: #1D1D1F; --gray: #6E6E73; --soft: #86868B; --fog: #F5F5F7; --line: #D2D2D7;
  --wrap: 1040px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--text); font: 400 19px/1.5 GS, system-ui, sans-serif; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
b { font-weight: 600; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* Local nav: thin, white, frosted */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0, 0, 0, .08); }
.top .wrap { display: flex; align-items: center; gap: 26px; height: 54px; max-width: 1080px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--text); text-decoration: none; font-size: 13px; opacity: .8; }
.top nav a:hover { opacity: 1; color: var(--red); }

/* Buttons: the red pill */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 500; font-size: 17px; white-space: nowrap; transition: background .2s, transform .15s; }
.btn:hover { background: var(--deep); }
.btn:active { transform: scale(.97); }
.btn.small { height: 30px; padding: 0 14px; font-size: 13px; font-weight: 500; }
.btn.light { background: #fff; color: var(--red); }
.btn.light:hover { background: var(--paper); }

/* The headline, as on the store slides: a small lead-in over one big word, both heavy, tight and lowercase */
h1, h2, h3 { margin: 0; font-weight: 600; }
.stack { display: inline-flex; flex-direction: column; align-items: flex-start; letter-spacing: -.05em; color: var(--ink); }
.stack.center, .hero .stack { align-items: center; }
.stack span { display: block; white-space: nowrap; position: relative; -webkit-text-stroke: .02em currentColor; paint-order: stroke fill; }
.stack .s { font-size: .52em; line-height: 1; letter-spacing: -.045em; }
.stack .b { font-size: 1em; line-height: .9; letter-spacing: -.065em; -webkit-text-stroke-width: .028em; }
.stack .red { color: var(--red); }
h1.stack, .hero .stack { margin: 0; font-weight: 600; font-size: clamp(76px, 15vw, 188px); }
/* The page's real h1 on the home page: a small line naming the app above the big headline, as on Apple's product pages */
.eyebrow { margin: 0 0 14px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h2.stack { font-size: clamp(64px, 11vw, 140px); }
h3.stack { font-size: clamp(52px, 6.4vw, 84px); }
/* The mascot's yellow surprise lines, lifted from the hero art */
.spark { position: absolute; width: .34em; right: -.3em; top: -.16em; filter: saturate(2.6) brightness(1.04); }
.stack .s .spark { width: .7em; right: -.62em; top: -.42em; }
/* The black highlighter swipe behind "stick" */
.stack .hl { isolation: isolate; }
.stack .hl::before { content: ""; position: absolute; z-index: -1; left: -.06em; right: -.04em; bottom: -.05em; height: .42em; background: var(--ink); transform: rotate(-1.6deg); }
.lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--gray); max-width: 34em; margin: 26px auto 0; }

/* Phone frame around an app capture */
.phone { width: 100%; padding: 2.6%; border-radius: 13% / 6%; background: linear-gradient(145deg, #3A3A40, #111113 40%, #2A2A2F);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(0, 0, 0, .45); }
.phone img { width: 100%; aspect-ratio: 1080 / 2400; object-fit: cover; object-position: top; border-radius: 11% / 5%; background: var(--ink); }

/* Hero: centred headline and button, then a row of phones cut off at the bottom */
.hero { position: relative; padding: 84px 0 0; text-align: center; overflow: hidden; }
.hero .btn { margin-top: 34px; }
.hero .note { color: var(--soft); font-size: 14px; margin: 14px 0 0; }
/* --u is one design pixel: the five phones (1322px wide at full size) shrink together to fit narrower windows */
.hero .row { --u: min(1px, 100vw / 1400); position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end;
  gap: calc(28 * var(--u)); margin: calc(76px - 40 * var(--u)) auto 0; height: calc(600 * var(--u)); overflow: hidden; }
/* Bezel padding as a share of the phone itself, since % padding would follow the whole row */
.hero .row .phone { flex: 0 0 calc(230 * var(--u)); margin-bottom: calc(-150 * var(--u)); padding: calc(230 * .026 * var(--u)); }
.hero .row .phone.main { flex-basis: calc(290 * var(--u)); margin-bottom: calc(-60 * var(--u)); padding: calc(290 * .026 * var(--u)); }
.hero .row .phone:nth-child(1), .hero .row .phone:nth-child(5) { margin-bottom: calc(-260 * var(--u)); }
/* The icon's mascot leaning in from the right edge: turned so both of the art's cut edges run off the page's side */
.hero .peek { --w: min(440px, 28vw); position: absolute; z-index: 2; width: var(--w); right: calc(var(--w) * -.34); top: calc(330px + (440px - var(--w)) * .35); transform: rotate(-6deg); }

/* A real bookshelf: the coverflow render, books spilling out of the phone */
.shelf { padding: 150px 0 40px; text-align: center; overflow: hidden; background: #FEFEFE; }
.shelf .art { width: min(1400px, 140vw); max-width: none; margin: 30px 0 0 50%; transform: translateX(-50%); }

/* Tiles on light grey */
.tiles { background: var(--fog); padding: 130px 0 120px; text-align: center; }
.tiles > .wrap > h2 { margin-bottom: 70px; }
.tile { position: relative; overflow: hidden; background: #fff; border-radius: 30px; text-align: left; display: flex; flex-direction: column; }
.tile + .tile, .tile + .pair, .pair + .tile, .pair + .pair { margin-top: 24px; }
.pair > .tile + .tile { margin-top: 0; }
.tile .copy { padding: 54px 54px 0; }
.tile p { margin: 26px 0 0; color: var(--soft); font-size: 19px; line-height: 1.45; max-width: 30em; }
.tile p b { color: var(--text); font-weight: 600; }
.tile .shot { margin-top: auto; padding-top: 44px; display: flex; justify-content: center; }
.tile .shot .phone { width: 300px; margin-bottom: -170px; padding: 8px; }
.tile .shot .phone.tilt { transform: rotate(-5deg); transform-origin: 50% 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pair .tile { min-height: 760px; }
.pair .tile .copy { padding: 48px 44px 0; }
.pair .tile .shot .phone { width: 270px; margin-bottom: -230px; padding: 7px; }
/* A wide tile: words on the left, the phone on the right */
.tile.wide { flex-direction: row; align-items: stretch; min-height: 520px; }
.tile.wide .copy { flex: 1; padding: 64px 0 64px 64px; align-self: center; }
.tile.wide .shot { flex: 0 0 44%; padding: 54px 0 0; align-items: flex-start; }
.tile.wide .shot .phone { margin-bottom: -280px; }
/* Red and ink tiles, as the store slides alternate */
.tile.red { background: var(--red); }
.tile.red .stack, .tile.red p b { color: #fff; }
.tile.red p { color: rgba(255, 255, 255, .78); }
.tile.ink { background: var(--ink); }
.tile.ink .stack, .tile.ink p b { color: #fff; }
.tile.ink p { color: #8E8E93; }
/* Human voices: the headphones mascot leaning in from the bottom-left, the words on the right */
.tile.listen { min-height: 560px; background: radial-gradient(90% 120% at 0% 100%, #2A1012, var(--ink) 60%); }
.tile.listen .buddy { position: relative; flex: 0 0 48%; align-self: flex-end; width: 48%; margin: 0 0 -70px -16px; }
.tile.listen .copy { padding: 64px 64px 64px 10px; }
/* Make it all stick: the quote-card pile itself */
/* The art's front card spans 803 of its 908px width and 977 of its 1100px height (the rest is shadow room on the right and below).
   Size and offset it so the card sits --g in from the tile's left and right and runs flush to its bottom, cutting off the shadow below. */
.tile .shot.card { --g: 32px; padding: 40px var(--g) 0; justify-content: flex-start; }
.tile .shot.card img { flex: none; width: calc(100% * 908 / 803); max-width: none; margin: 0 0 -15.32% calc(-100% * 2 / 803);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .22)); }
/* Hit your goals: the goal sheet laid straight on the ink, no frame */
.tile .shot.slice { padding: 30px 30px 0; overflow: hidden; }
.tile .shot.slice img { width: 100%; max-width: 440px; aspect-ratio: 1080 / 1420; object-fit: cover; object-position: 0 81%; }

/* Private: three points under one line */
.private { padding: 140px 0; text-align: center; }
.points { list-style: none; padding: 0; margin: 70px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 840px; }
.points li { color: var(--soft); font-size: 17px; }
.points b { display: block; color: var(--text); font-size: 21px; margin: 18px 0 4px; }
.points i { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto; border-radius: 22px; background: var(--fog); }
.points i svg { width: 34px; height: 34px; fill: var(--red); }

/* FAQ */
.faq { padding: 40px 0 140px; text-align: center; }
.faq .list { max-width: 820px; margin: 60px auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--line); padding: 26px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 22px; font-weight: 600; letter-spacing: -.015em; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 30px; line-height: .9; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--gray); margin: 12px 0 0; max-width: 42em; }

/* Closing: the wide mascot art across the panel's foot, its flat red sky carried up behind the line */
.cta { padding: 0 22px 120px; }
.cta .panel { max-width: 1240px; margin: 0 auto; border-radius: 34px; overflow: hidden; text-align: center;
  background: linear-gradient(to right, #8F020B, #A1010D 50%, #95010D); }
.cta .copy { position: relative; z-index: 1; padding: 96px 20px 0; display: flex; flex-direction: column; align-items: center; }
.cta .stack { color: #fff; }
.cta .btn { margin-top: 30px; }
.cta .art { width: 100%; margin-top: 50px; -webkit-mask-image: linear-gradient(transparent, #000 6%); mask-image: linear-gradient(transparent, #000 6%); }

/* Long-form pages: privacy, terms, support, 404 */
.doc { max-width: 720px; margin: 0 auto; padding: 84px 22px 60px; }
.doc h1 { font-size: clamp(64px, 11vw, 120px); letter-spacing: -.06em; line-height: .9; color: var(--ink); -webkit-text-stroke: .025em currentColor; paint-order: stroke fill; }
.doc h1.stack { font-size: clamp(64px, 12vw, 140px); }
.doc .date { color: var(--soft); font-size: 15px; margin: 18px 0 0; }
.doc h3 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 52px 0 8px; padding-top: 30px; border-top: 1px solid var(--line); line-height: 1.2; color: var(--text); }
.doc p, .doc li { color: var(--gray); }
.doc b { color: var(--text); }
.doc li::marker { color: var(--red); }
.doc .lede { margin: 24px 0 0; color: var(--text); }
.doc[style] .lede { margin: 28px auto 34px; }

/* Footer: small and grey, as Apple's */
footer { background: var(--fog); padding: 40px 0 50px; color: var(--soft); font-size: 13px; line-height: 1.6; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
footer h4 { margin: 0 0 8px; color: var(--text); font-size: 13px; font-weight: 600; }
footer a { display: block; color: var(--gray); text-decoration: none; margin: 4px 0; }
footer a:hover { color: var(--text); text-decoration: underline; }
footer .brand { margin-bottom: 10px; font-size: 17px; }
footer .brand img { width: 24px; height: 24px; border-radius: 6px; }

@media (max-width: 900px) {
  .pair { grid-template-columns: 1fr; }
  .pair .tile { min-height: 680px; }
  .tile.wide, .tile.listen { flex-direction: column; }
  .tile.wide .copy { padding: 48px 36px 0; }
  .tile.wide .shot { flex-basis: auto; padding-top: 40px; justify-content: center; }
  .tile.wide .shot .phone { margin-bottom: -200px; }
  .tile.listen { flex-direction: column-reverse; }
  .tile.listen .copy { padding: 48px 36px 0; }
  .tile.listen .buddy { width: 80%; margin: 20px 0 -60px -30px; }
  .tile .copy, .pair .tile .copy { padding: 44px 32px 0; }

}
@media (max-width: 760px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
  .hero { padding-top: 56px; }
  /* On phones only the middle three fit at a readable size */
  .hero .row { --u: calc(100vw / 860); margin-top: 84px; }
  .hero .row .phone:nth-child(1), .hero .row .phone:nth-child(5) { display: none; }
  /* Pinned to the phone row: the side phone's top sits 346.5 row units (100vw / 860) above the hero's bottom */
  .hero .peek { --w: 140px; top: auto; bottom: calc(100vw * 346.5 / 860 + 24px); }
  .shelf { padding-top: 100px; }
  .tiles { padding: 100px 0; }
  .points { grid-template-columns: 1fr; gap: 40px; }
  .private { padding: 100px 0; }
  .cta { padding-bottom: 80px; }
  .cta .panel { border-radius: 26px; }
  .cta .copy { padding-top: 64px; }
  .cta .art { width: 136%; max-width: none; margin: 40px 0 0 -18%; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  footer .wrap > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
