/* Einband — einband.app
   Colors from the iOS app (BackgroundColor, ForegroundColor, AccentColor in light and dark).
   Details after manuelkunert.de: glass pill with a sliding highlight, rounded panels, italic accent words.
   Apple marketing guidelines: device bezels unaltered (no shadow, crop, tilt); one App Store badge per page. */

@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Regular.woff2") format("woff2"); font-weight: 450; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Medium.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-MediumOblique.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ——— Tokens ——— */
:root {
  --page: #F2EFE7;
  --panel-top: #F8F6F0;
  --panel-bottom: #ECE8DE;
  --panel-edge: rgb(15 15 15 / 0.06);
  --ink: #0F0F0F;
  --muted: #67635B;
  --faint: #8C877E;
  --accent: #4A7393;               /* AccentColor #80A3BF, darkened for text on paper */
  --accent-soft: rgb(128 163 191 / 0.20);
  --hairline: rgb(15 15 15 / 0.09);
  --surface: #FAF8F3;
  --glass: rgb(250 248 243 / 0.72);
  --header: rgb(242 239 231 / 0.82);
  --indicator: rgb(15 15 15 / 0.07);
  --stage-a: linear-gradient(170deg, #E9DCD5 0%, #D6BEB3 100%);
  --stage-b: linear-gradient(170deg, #DCE5ED 0%, #BACCDB 100%);
  --stage-c: linear-gradient(170deg, #E3E5D8 0%, #C6CDB6 100%);
  --app-bg: #F2EFE7;               /* app surfaces inside mockups */
  --app-card: #FBF9F4;
  --app-field: #F7F4EE;
  --wood-board: #CDB28C;
  --material-dim: brightness(1);
  --focus: #4A7393;
  --shadow: 0 1px 2px rgb(60 45 20 / 0.05), 0 10px 30px rgb(60 45 20 / 0.06);

  --panel-radius: 40px;
  --card-radius: 28px;
  --gutter: clamp(16px, 3.4vw, 56px);
  --width: 1180px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0C0C0B; --panel-top: #151514; --panel-bottom: #1C1B19; --panel-edge: rgb(242 239 231 / 0.05);
    --ink: #F2EFE7; --muted: #A29E96; --faint: #77736C; --accent: #9DB8CD; --accent-soft: rgb(128 163 191 / 0.18);
    --hairline: rgb(242 239 231 / 0.10); --surface: #1A1918; --glass: rgb(36 35 33 / 0.72); --header: rgb(12 12 11 / 0.8);
    --indicator: rgb(242 239 231 / 0.10);
    --stage-a: linear-gradient(170deg, #4A2F2A 0%, #2E1E1B 100%); --stage-b: linear-gradient(170deg, #2A3846 0%, #1A232C 100%);
    --stage-c: linear-gradient(170deg, #2E3528 0%, #1D211A 100%);
    --app-bg: #121211; --app-card: #222120; --app-field: #262523; --wood-board: #6E5A43;
    --material-dim: brightness(0.66);
    --focus: #BFD1DF; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0C0C0B; --panel-top: #151514; --panel-bottom: #1C1B19; --panel-edge: rgb(242 239 231 / 0.05);
  --ink: #F2EFE7; --muted: #A29E96; --faint: #77736C; --accent: #9DB8CD; --accent-soft: rgb(128 163 191 / 0.18);
  --hairline: rgb(242 239 231 / 0.10); --surface: #1A1918; --glass: rgb(36 35 33 / 0.72); --header: rgb(12 12 11 / 0.8);
  --indicator: rgb(242 239 231 / 0.10);
  --stage-a: linear-gradient(170deg, #4A2F2A 0%, #2E1E1B 100%); --stage-b: linear-gradient(170deg, #2A3846 0%, #1A232C 100%);
  --stage-c: linear-gradient(170deg, #2E3528 0%, #1D211A 100%);
  --app-bg: #121211; --app-card: #222120; --app-field: #262523; --wood-board: #6E5A43;
  --material-dim: brightness(0.66);
  --focus: #BFD1DF; --shadow: none; color-scheme: dark;
}

/* Theme-specific images */
.for-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .for-dark { display: block !important; }
  :root:not([data-theme="light"]) .for-light { display: none !important; }
}
:root[data-theme="dark"] .for-dark { display: block !important; }
:root[data-theme="dark"] .for-light { display: none !important; }

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--page); }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "ABC Normal", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400; font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
em { font-style: italic; color: var(--accent); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 40; background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--width) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ——— Header: wordmark, section pill, actions in one row ——— */
.site-header {
  position: sticky; top: 0; z-index: 30; padding: 12px 0;
  transition: background-color 250ms ease, box-shadow 250ms ease;
}
.site-header.is-scrolled {
  background: var(--header); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--hairline);
}
.bar { display: flex; align-items: center; gap: 8px; min-height: 50px; }
.wordmark { display: inline-flex; color: var(--ink); padding: 6px 0; margin-right: auto; }
.wordmark svg { height: 24px; width: auto; }

.pill {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 2px;
  height: 46px; padding: 0 4px; border-radius: 23px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hairline);
}
.pill-indicator {
  position: absolute; top: 4px; left: 0; z-index: 1; height: 38px; width: 0; border-radius: 19px;
  background: var(--indicator); pointer-events: none; opacity: 0; transform: translate3d(0, 0, 0); will-change: transform, width;
}
.pill-indicator.is-ready { transition: transform 350ms var(--ease-out), width 350ms var(--ease-out), opacity 150ms ease; }
.pill-link {
  position: relative; z-index: 2; display: flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px;
  font-size: 15px; font-weight: 600; line-height: 1; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color 150ms ease, box-shadow 150ms ease;
}
.pill-link:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.pill-link:active span { transform: translateY(-0.1em) scale(0.94); }
.pill-link.is-active { color: var(--ink); }
.pill-link.is-active:hover { box-shadow: none; }


.actions { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.round {
  width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; text-decoration: none;
  display: grid; place-items: center; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background-color 150ms ease, transform 120ms ease;
}
.round:hover { background: var(--accent-soft); }
.round:active { transform: scale(0.94); }
.round svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

.button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--page); font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: opacity 150ms ease, transform 120ms ease;
}
.button:hover { opacity: 0.88; }
.button:active { transform: scale(0.97); }
.button svg { width: 16px; height: 16px; }
.button.small { min-height: 42px; padding: 0 18px; font-size: 15px; }

@media (max-width: 940px) { .pill { display: none; } }
@media (max-width: 420px) { .actions .button.small { padding: 0 14px; } .actions { gap: 4px; } }

/* ——— Layout ——— */
main { padding-top: 4px; }
.panel {
  border-radius: var(--panel-radius);
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  box-shadow: inset 0 0 0 1px var(--panel-edge);
  padding: clamp(36px, 6vw, 88px) clamp(22px, 6vw, 88px);
}
:root { --header-h: 74px; --section-pad: clamp(96px, 12vw, 168px); }
.section { padding-top: var(--section-pad); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 4.5vw, 60px); }
/* Anchors land on the heading, a little below the header, not on the empty top padding of the section. */
section[id] { scroll-margin-top: 88px; }
.section[id] { scroll-margin-top: calc(var(--header-h) + 40px - var(--section-pad)); }

h1, h2 { font-weight: 600; letter-spacing: -0.014em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.12; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.14; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.lede { color: var(--muted); font-size: clamp(18px, 1.6vw, 20px); max-width: 31em; margin: 20px 0 0; text-wrap: pretty; }

/* Reveal on scroll (only when JS runs and motion is welcome) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: var(--delay, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ——— Store / beta ——— */
.store { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.store-badge { display: inline-block; padding: 13px; margin: -13px; }
.store-badge img { height: 52px; width: auto; }
.store-note { color: var(--faint); font-size: 15px; line-height: 1.35; }

/* ——— Apple product bezels (shown as is) ——— */
.device { position: relative; width: 100%; }
.device .screen { position: absolute; overflow: hidden; background: #000; z-index: 1; }
.device .screen img, .device .screen video { width: 100%; height: 100%; object-fit: cover; }
.device .frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
/* iPhone 18 Pro, portrait: 1350 × 2760, screen 1206 × 2622 at (72, 69) */
.iphone { aspect-ratio: 1350 / 2760; }
.iphone .screen { left: 5.333%; top: 2.5%; width: 89.333%; height: 95%; border-radius: 13% / 6%; }
/* iPhone Duo, open, landscape: 3093 × 2247, screen 2853 × 2007 at (120, 120) */
.duo { aspect-ratio: 3093 / 2247; }
.duo .screen { left: 3.88%; top: 5.34%; width: 92.241%; height: 89.319%; border-radius: 4.6% / 6.5%; }

/* ——— Hero ——— */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero .iphone { max-width: 320px; justify-self: end; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero .iphone { justify-self: center; max-width: 260px; }
}

/* ——— Big cards ——— */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.show { --show-r: 36px; --show-pad: 10px; border-radius: var(--show-r); padding: var(--show-pad); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow); display: flex; flex-direction: column; }
.show-stage { border-radius: calc(var(--show-r, 36px) - var(--show-pad, 10px)); overflow: hidden; display: flex; justify-content: center; align-items: center; }
.show-stage.a { background: var(--stage-a); }
.show-stage.b { background: var(--stage-b); }
.show-stage.c { background: var(--stage-c); }
.show-text { padding: 22px 18px 16px; }
.show-text p { margin: 0; color: var(--muted); }
.cards-3 .show-stage { height: clamp(300px, 27vw, 350px); padding: 26px; }
.cards-2 .show-stage { padding: clamp(28px, 4vw, 48px) 24px; }
.cards-2 .show-stage .iphone { width: min(260px, 72%); }
@media (max-width: 1000px) { .cards-3 { grid-template-columns: 1fr; } .cards-3 .show-stage { height: 320px; } }
@media (max-width: 860px) { .cards-2 { grid-template-columns: 1fr; } }

/* Mock: ISBN card */
.isbn-card { width: 100%; max-width: 290px; border-radius: 26px; padding: 22px 20px 16px; text-align: center; background: #FBF9F4; color: #0F0F0F; box-shadow: 0 10px 30px rgb(30 40 50 / 0.12); }
.isbn-card .isbn { font-weight: 700; font-size: 15px; letter-spacing: 0.08em; margin-bottom: 12px; }
.isbn-card .barcode { width: 100%; height: auto; }
.scan-line {
  position: absolute; left: 10%; right: 10%; height: 2px; top: 50%; border-radius: 2px;
  background: #E5484D; box-shadow: 0 0 12px 2px rgb(229 72 77 / 0.55); opacity: 0.85;
  animation: scan 2.6s var(--ease-out) infinite alternate;
}
.isbn-wrap { position: relative; width: 100%; max-width: 290px; }
@keyframes scan { from { transform: translateY(-46px); } to { transform: translateY(40px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }

/* Mock: search, built like the app's Discover field and result rows */
.mock { width: 100%; max-width: 320px; font-size: 15px; color: var(--ink); }
.mock-field {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 23px;
  background: var(--app-field); box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 20px rgb(40 30 20 / 0.08);
}
.mock-field svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.mock-field .typed { font-weight: 450; white-space: pre; }
.mock-field .placeholder { color: var(--faint); }
.caret { width: 2px; height: 19px; margin-left: -8px; background: var(--accent); border-radius: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.mock-results { margin: 10px 0 0; padding: 6px 0; list-style: none; border-radius: 22px; background: var(--app-card); box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 20px rgb(40 30 20 / 0.08); }
.mock-results li { display: flex; align-items: center; gap: 12px; padding: 8px 14px; opacity: 1; transform: none; transition: opacity 300ms ease, transform 300ms var(--ease-out); }
.mock-results li + li { border-top: 1px solid var(--hairline); }
.mock-results img { width: 34px; height: 51px; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 2px 6px rgb(0 0 0 / 0.18); flex: none; }
.mock-results strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.mock-results span { display: block; color: var(--muted); font-size: 13.5px; }
.mock-results.is-waiting li { opacity: 0; transform: translateY(6px); }

/* Mock: Discover departments, with the app's illustrated book groups */
.dept {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 16px 16px 0 18px; border-radius: 22px;
  background: var(--app-card); box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 20px rgb(40 30 20 / 0.08); overflow: hidden;
}
.dept + .dept { margin-top: 10px; }
.dept strong { display: block; font-weight: 600; font-size: 16px; line-height: 1.2; }
.dept span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; padding-bottom: 18px; }
.dept-books { position: relative; width: 120px; padding-bottom: 6px; }
.dept-books img { width: 100%; position: relative; z-index: 1; }
.dept-books::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 8px; border-radius: 2px; background: var(--wood-board); box-shadow: 0 3px 6px rgb(0 0 0 / 0.12); }

/* ——— Shelf designs: captures of the app's own shelf, one per design and appearance ——— */
.shelf-demo { display: grid; justify-items: center; gap: 22px; padding: clamp(28px, 4vw, 48px) clamp(12px, 3vw, 40px) clamp(20px, 3vw, 32px); border-radius: var(--panel-radius); background: var(--app-bg); box-shadow: inset 0 0 0 1px var(--panel-edge); }
.shelf-view {
  position: relative; width: min(100%, 420px); aspect-ratio: 1174 / 1700;
  -webkit-mask-image: linear-gradient(#000 84%, transparent 100%); mask-image: linear-gradient(#000 84%, transparent 100%);
}
.shelf-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms ease; }
.shelf-layer.is-current { opacity: 1; }
.shelf-layer img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .shelf-layer { transition: none; } }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; border-radius: 30px; max-width: 760px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hairline); max-width: 100%; }
.swatch {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 0 6px; border: 0; border-radius: 21px; cursor: pointer;
  background: transparent; font-size: 15px; font-weight: 600; color: var(--muted); transition: background-color 150ms ease, color 150ms ease;
}
.swatch:hover { color: var(--ink); background: var(--indicator); }
.swatch[aria-checked="true"] { color: var(--ink); background: var(--app-card); box-shadow: inset 0 0 0 1px var(--hairline), 0 2px 8px rgb(0 0 0 / 0.06); }
.swatch i { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; }
.swatch i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14); }
.swatch i img { width: 100%; height: 100%; object-fit: cover; }

/* ——— Duo ——— */
.duo-stage { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 860px) { .duo-stage { grid-template-columns: 1fr; } }

/* ——— Small cards ——— */
.card { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow); border-radius: var(--card-radius); padding: 26px 28px; }
.card p { margin: 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.icon { width: 52px; height: 52px; margin-bottom: 22px; padding: 12px; border-radius: 16px; color: var(--accent); background: var(--accent-soft); }
.icon svg { width: 100%; height: 100%; }
@media (max-width: 1000px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* ——— Privacy ——— */
.privacy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.privacy dl { margin: 0; display: grid; gap: 12px; }
.privacy .card { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: start; }
.privacy .icon { margin: 0; grid-row: span 2; }
.privacy dt { font-weight: 600; font-size: 19px; }
.privacy dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; } }

/* ——— Closing ——— */
.closing { margin-top: clamp(96px, 12vw, 168px); text-align: center; }
.closing .mark { color: var(--ink); width: min(380px, 72%); margin: 0 auto 30px; }
.closing p { color: var(--muted); margin: 16px auto 0; max-width: 30em; }
.closing .store { justify-content: center; margin-top: 30px; }

/* ——— Footer ——— */
.site-footer { padding: clamp(72px, 9vw, 120px) 0 48px; color: var(--faint); font-size: 15px; text-align: center; }
.maker { display: inline-block; color: var(--ink); opacity: 0.82; transition: opacity 150ms ease; }
.maker:hover { opacity: 1; }
.maker svg { width: 168px; height: auto; }
.made { margin: 18px 0 clamp(48px, 6vw, 72px); color: var(--muted); font-size: 16px; }
.site-footer .wrap { text-align: left; border-top: 1px solid var(--hairline); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ——— Legal pages ——— */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { margin-bottom: 32px; font-size: clamp(36px, 4.4vw, 54px); }
.legal h2 { font-size: 26px; margin: 48px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 6px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal address { color: var(--ink); font-style: normal; margin: 0 0 16px; }
.legal .stand { font-size: 15px; margin-top: 48px; }
.legal .lead-note { font-size: 15px; padding: 14px 18px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); }
.legal ul { padding-left: 1.2em; }

@media (max-width: 600px) {
  .wordmark svg { height: 21px; }
  .panel { padding: 32px 20px; border-radius: 32px; }
  .card { padding: 22px; }
}


/* Stagger for reveals in a row */
.reveal[data-delay="1"] { --delay: 90ms; }
.reveal[data-delay="2"] { --delay: 180ms; }
.reveal[data-delay="3"] { --delay: 270ms; }

/* Phones: swatches scroll sideways like the category chips in the app */
@media (max-width: 600px) {
  .shelf-demo { justify-items: stretch; padding: 24px 0 18px; border-radius: 32px; overflow: hidden; }
  .shelf-view { justify-self: center; width: calc(100% - 32px); }
  /* A free-running row of chips (no capsule around it), fading out at the panel edges. */
  .swatches { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    background: none; box-shadow: none; border-radius: 0; padding: 4px 16px; gap: 8px; scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  .swatch { background: var(--app-card); box-shadow: inset 0 0 0 1px var(--hairline); }
  .swatches::-webkit-scrollbar { display: none; }
  .swatch { flex: none; scroll-snap-align: start; }
}

/* ABC Normal's visual center sits below its typographic center (AppStyle.primaryButtonLabelOffset = -2 pt at 20 pt).
   Shift labels in fixed-height controls up by about a tenth of the font size. */
.button > span:not(.button-arrow), .pill-link span, .lang-list a span, .round > span, .swatch-label { display: inline-block; transform: translateY(-0.1em); }
.button-arrow { display: inline-flex; width: 15px; height: 15px; transition: transform 200ms var(--ease-out); }
.button-arrow svg { width: 100%; height: 100%; }
.button:hover .button-arrow { transform: translate(2px, -2px); }

/* Language menu: round button, glass list like the pill */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; display: grid; gap: 2px; min-width: 160px; padding: 5px;
  border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 14px 40px rgb(0 0 0 / 0.14);
  transform-origin: top right; animation: menu-in 160ms var(--ease-out);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .lang-list { animation: none; } }
.lang-list a { display: flex; align-items: center; height: 40px; padding-inline: 14px; border-radius: 17px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-list a:hover { color: var(--ink); background: var(--indicator); }
.lang-list a[aria-current="page"] { color: var(--ink); background: var(--indicator); }

/* Footer row */
.foot { flex-direction: row; }
.foot .copy { color: var(--faint); }

/* ——— Phones ——— */
@media (max-width: 700px) {
  .actions .button.small { display: none; }                 /* the hero carries the call to action */
  :root { --section-pad: 88px; }
  /* Intro: left-aligned like every other section; the phone rises from the bottom edge of the panel. */
  .hero { gap: 36px; padding-bottom: 0; overflow: hidden; }
  .hero .store { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
  .hero > .reveal:last-child { height: 340px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; }
  .hero .iphone { width: 250px; max-width: none; justify-self: center; }
  h1 { font-size: 36px; }
  h2 { font-size: 31px; }
  .lede { font-size: 18px; }
  .show { --show-r: 30px; --show-pad: 8px; }
  .cards-3 .show-stage { height: auto; min-height: 250px; padding: 22px 18px; }
  .show-text { padding: 18px 14px 12px; }
  .site-footer { padding-top: 72px; }
  .maker svg { width: 140px; }
  .foot { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .foot nav { justify-content: center; gap: 6px 20px; }
}

/* ——— Bento cards (after AppView's card grid: fixed height, ⅓ and ⅔ widths, soft inner glow) ——— */
.bento { --gap: 16px; display: flex; flex-wrap: wrap; gap: var(--gap); }
.bento-card {
  container-type: inline-size; position: relative; box-sizing: border-box; height: 280px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 30px;
  border-radius: 35px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 0 28px var(--bento-glow), var(--shadow);
}
.bento-card.third { width: calc((100% - 2 * var(--gap)) / 3); }
.bento-card.two-thirds { width: calc(100% - var(--gap) - (100% - 2 * var(--gap)) / 3); }
.bento-card .icon { margin: 0; width: 56px; height: 56px; padding: 13px; border-radius: 18px; }
.bento-info h3 { font-size: 20px; margin: 0 0 6px; }
.bento-info p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.4; }
@container (min-width: 520px) {
  .bento-card { justify-content: center; align-items: center; text-align: center; gap: 24px; }
  .bento-card .icon { width: 68px; height: 68px; padding: 16px; border-radius: 22px; }
  .bento-info { max-width: 30em; }
  .bento-info h3 { font-size: 24px; }
}
@media (max-width: 860px) {
  .bento-card.third, .bento-card.two-thirds { width: 100%; height: auto; min-height: 0; gap: 28px; }
  .bento-card { justify-content: flex-start; }
}
:root { --bento-glow: rgb(255 255 255 / 0.65); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bento-glow: rgb(242 239 231 / 0.04); } }
:root[data-theme="dark"] { --bento-glow: rgb(242 239 231 / 0.04); }

/* Picker chips without a material: drawn, not cropped */
.chip-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.chip-art .ca-bg { fill: var(--app-bg); }
.chip-art .ca-board { fill: #C2A27A; }
.chip-art .ca-b1 { fill: #E0A93E; }
.chip-art .ca-b2 { fill: #2F5D8A; }
.chip-art .ca-b3 { fill: #C2553F; }

/* ——— Contact ——— */
/* ——— Contact: headline, then the form beside one grouped FAQ list ——— */
.contact-head { max-width: 680px; margin: clamp(28px, 5vw, 72px) 0 clamp(32px, 4.5vw, 56px); }
.contact-direct { margin: 18px 0 0; font-weight: 600; font-size: 18px; }
.contact-direct a { color: var(--accent); text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.contact-grid h2 { font-size: 24px; margin: 0 0 18px; }

.contact-card { border-radius: 35px; padding: clamp(22px, 3vw, 34px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), inset 0 0 28px var(--bento-glow), var(--shadow); }
.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field legend { font-weight: 600; font-size: 15px; padding: 0; }
.field small { font-weight: 400; color: var(--faint); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field input, .field textarea {
  font: inherit; font-size: 17px; color: var(--ink); width: 100%;
  padding: 13px 16px; border: 0; border-radius: 16px; background: var(--app-field);
  box-shadow: inset 0 0 0 1px var(--hairline); appearance: none; -webkit-appearance: none;
  transition: box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.45; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.field legend { margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 15px 10px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: var(--app-field); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease;
}
.chip input:checked + span { background: var(--ink); color: var(--page); box-shadow: none; }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; }
.form-note { margin: 0; color: var(--faint); font-size: 13px; line-height: 1.4; flex: 1 1 14em; }
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form-status { margin: 0; color: #C2553F; font-size: 15px; }
.form-status:empty { display: none; }
.contact-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 17px; }
.contact-form .button[disabled] { opacity: 0.6; cursor: default; }
.form-done { padding: 8px 0 4px; }
.form-done h3 { font-size: 26px; margin: 0 0 8px; }
.form-done p { margin: 0; color: var(--muted); }

.faq h2 { margin-left: 4px; }
.faq-list { border-radius: 32px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow); padding: 4px 0; }
.faq-item + .faq-item { border-top: 1px solid var(--hairline); margin: 0 22px; }
.faq-item:first-child { margin: 0 22px; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 0; font-weight: 600; font-size: 17px; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.faq-item summary i { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--app-field); transition: transform 250ms var(--ease-out); }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 9px; top: 13px; width: 10px; height: 2px; border-radius: 1px; background: var(--muted); }
.faq-item summary i::after { transform: rotate(90deg); transition: transform 250ms var(--ease-out); }
.faq-item[open] summary i::after { transform: rotate(0deg); }
.faq-answer { padding: 0 44px 20px 0; }
.faq-answer p { margin: 0; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .faq { margin-top: 24px; }
}
@media (max-width: 520px) {
  .field-pair { grid-template-columns: 1fr; }
  .faq-item, .faq-item:first-child { margin: 0 18px; }
  .faq-answer { padding-right: 0; }
  .form-foot .button { width: 100%; justify-content: center; }
}

/* ——— Shared book page (einband.app/b/…): the app's book card, measure for measure ———
   BookDetailCard: radius 46, padding 20 / 24, title 28 medium, author 17, details 16 apart.
   DetailInformationPanel: radius 32, padding 18 22 19, heading 17 medium, 9 below it.
   --card and --card-field-dark come from /b/…/tone.css: the colour the app computed. */
.book-card {
  --card-ink: #FFFFFF;
  --field: #F2EFE7; --field-ink: #0F0F0F;
  max-width: 600px; margin: clamp(12px, 3vw, 40px) auto 0; padding: 44px 20px 24px;
  border-radius: 46px; background: var(--card, rgb(57 57 57)); color: var(--card-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .book-card { --field: var(--card-field-dark, rgb(32 32 32)); --field-ink: #F2EFE7; }
}
:root[data-theme="dark"] .book-card { --field: var(--card-field-dark, rgb(32 32 32)); --field-ink: #F2EFE7; }
.book-card-head { display: grid; justify-items: center; text-align: center; gap: 8px; }
.share-cover { position: relative; height: 288px; display: grid; place-items: center; margin-bottom: 4px; }
/* The hardcover from the app's card, seen from the front (the web cannot turn it, so no page block shows):
   the spine darkened with its hinge (Falz), a soft light across the board, rounded fore-edge corners. */
.book3d { position: relative; display: block; height: 232px; }
.book3d > img, .book3d > .share-cover-blank {
  position: relative; display: block; height: 100%; width: auto; border-radius: 1.5px 4px 4px 1.5px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 24px 40px -16px rgb(0 0 0 / 0.6);
}
.book3d::after { /* spine shading, hinge line and its highlight, light falling across the board */
  content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 1.5px 4px 4px 1.5px; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.30) 0, rgb(0 0 0 / 0.08) 2.2%, rgb(255 255 255 / 0.20) 4.2%, rgb(0 0 0 / 0.16) 5.4%, rgb(0 0 0 / 0.04) 7.5%, transparent 11%),
    linear-gradient(105deg, rgb(255 255 255 / 0.10), transparent 45%, rgb(0 0 0 / 0.08));
}
.shared-by { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -20px 0 0; font-size: 15px; font-weight: 450; opacity: 0.85; }
.shared-by img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.35); }
.share-cover-blank { aspect-ratio: 2 / 3; background: rgb(255 255 255 / 0.10); display: grid; place-items: center; padding: 18px; font-weight: 600; text-wrap: balance; }
.book-card h1 { font-size: 28px; font-weight: 600; line-height: 1.18; letter-spacing: 0; margin: 0; text-wrap: balance; }
.book-card-subtitle { margin: 0; font-size: 20px; font-weight: 400; line-height: 1.25; opacity: 0.7; text-wrap: balance; }
.book-card-authors { margin: 0; font-size: 17px; font-weight: 450; opacity: 0.9; }
.book-card > .book-field:first-of-type { margin-top: 20px; }
.book-field + .book-field { margin-top: 16px; }
.book-field { background: var(--field); color: var(--field-ink); border-radius: 32px; padding: 18px 22px 19px; }
.book-field h2 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0 0 9px; letter-spacing: 0; }
.about-text p { margin: 0; font-size: 17px; line-height: 1.35; }
.about-text p + p { margin-top: 0.7em; }
.about-text.is-long { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 10; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.about-toggle { position: absolute; opacity: 0; pointer-events: none; }
.about-toggle:checked ~ .about-text { display: block; -webkit-line-clamp: unset; -webkit-mask-image: none; mask-image: none; }
.about-toggle:checked ~ .about-more { display: none; }
.about-more { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; cursor: pointer; opacity: 0.75; }
.about-toggle:focus-visible ~ .about-more { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.book-field .book-field-note { margin: 10px 0 0; font-size: 13px; opacity: 0.55; }
.book-field-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.book-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; font-weight: 450; line-height: 1.3; }
.book-facts li { display: flex; align-items: flex-start; gap: 9px; }
.book-facts svg { width: 21px; height: 18px; flex: none; margin-top: 0.5px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.65; }
.book-isbn { display: grid; justify-items: center; gap: 8px; padding-top: 16px; }
.book-isbn-label { margin: 0; font-weight: 600; font-size: 15px; letter-spacing: 0.08em; }
.book-isbn-paper { width: 100%; max-width: 360px; padding: 10px 0; border-radius: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .book-isbn-paper { background: #F2EFE7; } }
:root[data-theme="dark"] .book-isbn-paper { background: #F2EFE7; }
.ean { display: block; width: 100%; height: auto; fill: #0F0F0F; }
.ean-digits { font-family: "ABC Normal", sans-serif; font-weight: 450; font-size: 7.5px; text-anchor: middle; }
.share-empty { text-align: center; margin-top: clamp(24px, 4vw, 48px); }
.share-empty h1 { font-size: clamp(30px, 4.5vw, 52px); line-height: 1.05; margin: 0; text-wrap: balance; }
.share-empty p { color: var(--muted); max-width: 30em; margin: 16px auto 0; }
.share-cta { margin-top: clamp(40px, 6vw, 72px); }
.share-cta h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; margin: 0; }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
@media (max-width: 640px) {
  /* The card sits 16 from the screen edges, like in the app. */
  main.wrap:has(> .book-card) { padding-inline: 16px; }
  .book-card { margin-top: 4px; }
  .share-cta .store { flex-direction: column; }
}


