/*
 * nooksave.com. The app's own tokens (mobile/lib/theme.ts, light): warm paper
 * background, near-black ink, burnt orange as the ONE saturated colour. Type is
 * the app's too: Plus Jakarta Sans and nothing else, the wordmark included.
 * Everything is centred on the page's axis.
 *
 * The layout is huge display type, a lot of air and one idea per
 * screen. Every motion respects prefers-reduced-motion.
 */

@font-face { font-family: 'Jakarta'; src: url('/assets/fonts/PlusJakartaSans_400Regular.v1.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/assets/fonts/PlusJakartaSans_500Medium.v1.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/assets/fonts/PlusJakartaSans_700Bold.v1.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/assets/fonts/PlusJakartaSans_800ExtraBold.v1.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --bg: #FBF8F4;
  --surface: #F3EDE6;
  --ink: #131110;
  --muted: #6B6560;
  --accent: #B4530F;
  --accent-soft: #FBEBDD;
  --on-accent: #FFFFFF;
  --line: rgba(19, 17, 16, 0.08);
  --gutter: clamp(16px, 4vw, 40px);
  --display: clamp(3rem, 10.5vw, 9rem);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 17px/1.5 'Jakarta', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* The fanned side phones reach past a phone's edge on purpose. `clip`, not
   `hidden`: hidden on body still let the page widen and pushed the fixed nav
   off screen, and clip creates no scroll container. */
html, body { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: normal; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.wordmark {
  font: 800 26px/1 'Jakarta', system-ui, sans-serif;
  letter-spacing: -0.04em; text-decoration: none; color: var(--ink);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px;
}
.pill-accent { background: var(--accent); color: var(--on-accent); }
.lang {
  height: 38px; min-width: 44px; padding: 0 12px; border-radius: 999px;
  border: 0; background: var(--surface); color: var(--ink);
  font: 700 13px/1 'Jakarta', sans-serif; letter-spacing: .04em; cursor: pointer;
}

/* ---------- type ---------- */
.display {
  margin: 0;
  font-weight: 800; font-size: var(--display);
  line-height: .9; letter-spacing: -0.055em;
}
.body {
  margin: 28px 0 0;
  font-size: clamp(19px, 2vw, 24px); line-height: 1.35;
  color: var(--muted);
}
.fine { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  padding: 120px var(--gutter) 80px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero .display span { display: block; }
.hero-second { color: var(--accent); }
.fan {
  position: relative; width: min(980px, 100%);
  margin: clamp(32px, 6vw, 64px) auto 0;
  /* Tall enough for the side phones, which sit lower and rotated: the centre
     phone is ~2.16x its width, the sides add about a fifth on top. */
  height: calc(clamp(170px, 26vw, 300px) * 2.45);
}
.phone {
  border-radius: 34px;
  box-shadow: 0 30px 60px -20px rgba(80, 40, 10, .28), 0 0 0 1px var(--line);
  background: #fff;
}
.fan .phone { position: absolute; top: 0; width: clamp(170px, 26vw, 300px); }
.phone-center { left: 50%; transform: translateX(-50%); z-index: 2; }
.phone-left { left: 50%; transform: translateX(-118%) translateY(9%) rotate(-7deg); }
.phone-right { left: 50%; transform: translateX(18%) translateY(9%) rotate(7deg); }
.tag {
  position: absolute; z-index: 3;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; box-shadow: 0 10px 24px -10px rgba(80, 40, 10, .3);
  font-size: 14px; font-weight: 700; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.tag em { font-weight: 800; color: var(--accent); }
.tag-a { left: 6%; top: 18%; }
.tag-b { right: 6%; top: 52%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }
.lede {
  margin: 40px 0 0;
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3;
  color: var(--muted);
}
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 168px; height: 58px; padding: 0 22px;
  border-radius: 16px; background: var(--ink); color: var(--bg); text-decoration: none;
  transition: transform .2s ease;
}
.store:hover { transform: translateY(-2px); }
.store small { font-size: 11px; opacity: .75; }
.store strong { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- video ---------- */
.video-section { padding: 40px var(--gutter) 120px; display: flex; justify-content: center; }
/* `display: flex` above would otherwise beat the hidden attribute. */
.video-section[hidden] { display: none; }
.video-frame { position: relative; width: min(380px, 80vw); }
.video-frame video {
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 36px; background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(80, 40, 10, .28);
}
.mute {
  position: absolute; right: 14px; bottom: 14px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(19, 17, 16, .7); color: #fff;
  font: 700 13px/1 'Jakarta', sans-serif; cursor: pointer;
}

/* ---------- sections ---------- */
.block { padding: clamp(100px, 16vw, 200px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; text-align: center; }
.split { display: flex; flex-direction: column; align-items: center; gap: clamp(48px, 6vw, 80px); }
.phone-solo { width: min(340px, 100%); }

/* saved-things carousel */
.marquee {
  margin-top: clamp(56px, 8vw, 96px);
  overflow: hidden; padding: 24px 0 8px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track, .card-copy { display: flex; align-items: flex-end; gap: 36px; }
/* Moved by main.js (startCarousel), not by a CSS animation, so it can be
   paused, dragged, swiped and scrolled sideways. pan-y keeps vertical page
   scrolling on touch screens; the sideways swipe belongs to the strip. */
.marquee-track {
  width: max-content; padding-right: 36px; will-change: transform;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.marquee-track.dragging { cursor: grabbing; }
.marquee-track.dragging .card-art { transition: none; }
.marquee-track img { -webkit-user-drag: none; pointer-events: none; }

.card { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; flex: none; }
.card figcaption { font: 700 15px/1 'Jakarta', system-ui, sans-serif; color: var(--muted); }
.card:nth-child(3n+2) figcaption { color: var(--accent); }
.card-art {
  position: relative; overflow: hidden; border-radius: 18px;
  background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 36px -18px rgba(80, 40, 10, .3);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card-art { transform: translateY(-6px) rotate(-1deg); }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-art b { font-weight: 700; letter-spacing: -0.01em; }
.card-art small { color: var(--muted); font-size: 12px; }

.card-video .card-art { width: 300px; height: 170px; }
.play {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: rgba(255, 255, 255, .92);
}
.play::after {
  content: ''; position: absolute; left: 18px; top: 14px;
  border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent var(--ink);
}
.card-post .card-art { width: 250px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.post-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.card-post p { margin: 0; font-size: 15px; line-height: 1.35; }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px;
}
.avatar.big { width: 56px; height: 56px; font-size: 18px; }
/* Landscape, so it reads as a photo and not as another thumbnail. */
.card-image .card-art { width: 380px; height: 250px; }
.card-pdf .card-art { width: 180px; height: 240px; padding: 22px 18px; display: flex; flex-direction: column; gap: 9px; }
.card-pdf b { font-size: 17px; margin: 18px 0 6px; }
.card-pdf i { display: block; height: 7px; border-radius: 4px; background: var(--surface); }
.card-pdf i.short { width: 60%; }
.pdf-tag {
  align-self: flex-start; padding: 4px 8px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.card-site .card-art { width: 280px; display: flex; flex-direction: column; }
.card-site .bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface); }
.card-site .bar { align-items: center; }
.card-site .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(19, 17, 16, .18); }
.card-site .bar span { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: #fff; font-size: 11px; color: var(--muted); }
.card-site img { height: 123px; object-position: top; }
.card-product .card-art { width: 190px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.card-product img { height: 170px; border-radius: 12px; margin-bottom: 8px; }
.card-book .card-art {
  width: 170px; height: 250px; padding: 22px 18px; border-radius: 6px 14px 14px 6px;
  background: #2F3B33; color: #F2EFEA; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 8px 0 0 rgba(0, 0, 0, .22), 0 18px 36px -18px rgba(0, 0, 0, .4);
}
.card-book b { font-size: 24px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.card-book small { color: rgba(242, 239, 234, .7); }

/* Cards that are OBJECTS, not boxes: no white card behind them. */
.card-music .card-art, .card-podcast .card-art, .card-note .card-art,
.card-article .card-art, .card-contact .card-art, .card-book .card-art { overflow: visible; }
.card-music .card-art, .card-podcast .card-art { background: none; box-shadow: none; border-radius: 0; }

/* music: a record */
.card-music .card-art { width: 230px; height: 230px; }
.disc {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255, 255, 255, .06) 30.5% 31%, transparent 31.5%),
    repeating-radial-gradient(circle, #171412 0 2px, #221d1a 2px 4px);
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .55), inset 0 0 0 3px #0e0c0b;
  display: grid; place-items: center;
}
.disc::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 10%, rgba(255, 255, 255, .10) 14%, transparent 20% 55%, rgba(255, 255, 255, .07) 60%, transparent 66%);
}
.disc-label {
  position: relative; z-index: 1; width: 39%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 6%, var(--accent) 7% 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10px; gap: 16px;
}
/* Title above the spindle hole, artist below it. */
.disc-label b { font-size: 10px; line-height: 1.1; }
.disc-label small { font-size: 8px; color: rgba(255, 255, 255, .8); }

/* note: a sticky note */
.card-note .card-art {
  width: 210px; height: 210px; padding: 30px 20px 20px; border-radius: 2px 2px 18px 2px;
  background: linear-gradient(170deg, #FFE27A, #FFD24D);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 18px 26px -16px rgba(80, 60, 0, .45);
  display: flex; flex-direction: column; gap: 9px; transform: rotate(-3deg);
}
.card-note .card-art::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px;
  background: linear-gradient(315deg, var(--bg) 50%, #E8BC32 50%); border-radius: 0 0 18px 0;
}
.tape {
  position: absolute; left: 50%; top: -12px; width: 78px; height: 24px; margin-left: -39px;
  background: rgba(255, 255, 255, .55); transform: rotate(4deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.card-note b { font-size: 17px; font-weight: 800; line-height: 1.15; color: #4A3B07; margin-bottom: 4px; }
.card-note span:not(.tape) { font-size: 13px; color: #4A3B07; padding-left: 14px; position: relative; }
.card-note span:not(.tape)::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #B08A12; }

/* article: a newspaper page */
.card-article .card-art {
  width: 250px; padding: 16px 16px 18px; border-radius: 3px;
  background: linear-gradient(90deg, #F6F1E7 0 49.6%, #E9E2D4 50%, #F3EEE3 50.4%);
  box-shadow: 0 18px 30px -16px rgba(60, 40, 10, .4);
  display: flex; flex-direction: column; gap: 6px; transform: rotate(2deg);
}
.masthead {
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em; text-align: center;
  padding-bottom: 6px; border-bottom: 3px double var(--ink);
}
.dateline { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.card-article b { font-size: 17px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 4px 0 2px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.columns span { display: flex; flex-direction: column; gap: 5px; }
.columns i { display: block; height: 5px; border-radius: 3px; background: rgba(19, 17, 16, .14); }
.columns i.short { width: 65%; }

/* contact: a business card */
.card-contact .card-art {
  width: 270px; height: 150px; padding: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-left: 6px solid var(--accent);
}
.bc-text { display: flex; flex-direction: column; gap: 4px; }
.bc-text b { font-size: 17px; }
.bc-phone { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent); }

/* podcast: a studio microphone */
.card-podcast .card-art { width: 170px; height: 300px; }
.mic-head {
  position: absolute; left: 50%; top: 6px; width: 96px; height: 150px; margin-left: -48px; border-radius: 48px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .35), transparent 40%),
    repeating-linear-gradient(0deg, #3a332e 0 3px, #1f1b18 3px 6px),
    #1f1b18;
  box-shadow: inset 0 0 0 4px #57504a, 0 20px 30px -16px rgba(0, 0, 0, .5);
}
.mic-ring {
  position: absolute; left: 50%; top: 104px; width: 108px; height: 16px; margin-left: -54px; border-radius: 8px;
  background: linear-gradient(180deg, #E87A2E, var(--accent));
}
.mic-neck { position: absolute; left: 50%; top: 156px; width: 14px; height: 70px; margin-left: -7px; background: linear-gradient(90deg, #57504a, #2a2522); }
.mic-base { position: absolute; left: 50%; top: 222px; width: 110px; height: 18px; margin-left: -55px; border-radius: 50%; background: #2a2522; box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .45); }
.mic-tag {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line);
  font-size: 12px; color: var(--muted);
}
.mic-tag b { color: var(--ink); }

/* search demo */
.search-demo {
  display: flex; align-items: center; gap: 10px;
  margin: 32px auto 0; max-width: 460px; height: 56px; padding: 0 20px;
  border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 12px 30px -16px rgba(80, 40, 10, .25);
  font-size: 18px; font-weight: 500;
}
.search-glass {
  width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 50%;
  position: relative; flex: none;
}
.search-glass::after {
  content: ''; position: absolute; width: 2px; height: 7px; background: var(--muted);
  right: -4px; bottom: -6px; transform: rotate(-45deg);
}
.caret { width: 2px; height: 22px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* together */
.together { text-align: center; }
.together .body { margin-inline: auto; }
.chat { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 48px auto 0; text-align: left; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 16px; max-width: 80%; }
.bubble-in { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble-out { background: var(--accent); color: var(--on-accent); align-self: flex-end; border-bottom-right-radius: 6px; }
.linkcard {
  display: flex; flex-direction: column; gap: 2px; align-self: flex-start; width: 80%;
  padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line);
}
.linkcard-type { font-size: 12px; font-weight: 800; color: var(--accent); }
.linkcard-nook { font-size: 13px; color: var(--muted); }

/* manifesto */
.manifesto {
  max-width: 1100px; margin: clamp(140px, 20vw, 240px) auto 0; padding: 0 var(--gutter);
  text-align: center;
}
.kicker { font-size: 18px; font-weight: 800; color: var(--accent); margin: 0 0 32px; }
.m-lead { font-weight: 800; font-size: clamp(2.2rem, 5.5vw, 4.6rem); line-height: 1; letter-spacing: -0.045em; margin: 0 0 40px; }
.m-body { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.35; color: var(--muted); margin: 0 0 56px; }
.m-close { font-weight: 800; font-size: clamp(3rem, 9vw, 8rem); line-height: .9; letter-spacing: -0.055em; color: var(--accent); margin: 80px 0 0; }

/* final */
.final { text-align: center; padding: clamp(140px, 20vw, 240px) var(--gutter) clamp(100px, 14vw, 160px); }
.final .body { margin-inline: auto; }

/* footer */
.footer {
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  padding: 36px var(--gutter); border-top: 1px solid var(--line);
}
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.footer-links a:hover { color: var(--ink); }
.copy { color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .phone-solo { width: min(280px, 80%); }
  .body br, .lede br { display: none; }
  .tag-a { left: 0; top: 10%; }
  .tag-b { right: 0; top: 58%; }
  .fan .phone { border-radius: 22px; }
  .nav .pill { height: 34px; padding: 0 14px; font-size: 14px; }
  .lang { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag, .caret { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
