/* Corsairs Compass — site styles. Mobile first. Palette: parchment, wood, brass, turquoise sea. */
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Alegreya-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/Alegreya-italic-400.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Alegreya-normal-700.woff2') format('woff2'); }
@font-face { font-family: 'Pirata One'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/PirataOne-normal-400.woff2') format('woff2'); }

:root {
  --parchment: #f4e7c8;
  --parchment-2: #ead6a8;
  --ink: #2b1d12;
  --ink-soft: #4f3a26;
  --wood: #4a2e1a;
  --wood-2: #6b4326;
  --brass: #d2a24c;
  --brass-2: #f1cf7a;
  --brass-dark: #8a5f1e;
  --sea: #1aa7a6;
  --sea-deep: #0b3d5c;
  --night: #121c33;
  --foam: #e9fbf7;
  --red: #a8322a;
  --radius: 14px;
  --gutter: 16px;
  --display: 'Pirata One', 'Georgia', serif;
  --body: 'Alegreya', 'Georgia', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sea-deep); color: var(--ink); font: 18px/1.55 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0 0 .4em; letter-spacing: .01em; }
h2 { font-size: clamp(2.3rem, 7vw, 4rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brass-2); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brass-2); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; position: relative; z-index: 2; }
.center { text-align: center; }
.eyebrow { font-family: var(--display); font-size: 1.25rem; color: var(--red); margin: 0 0 .2em; letter-spacing: .04em; }
.eyebrow.light { color: var(--brass-2); }
.lead { font-size: 1.2rem; max-width: 46ch; }
.note { font-size: .95rem; opacity: .85; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 8px var(--gutter); padding-top: max(8px, env(safe-area-inset-top));
  color: var(--parchment); background: linear-gradient(rgba(11, 30, 46, .82), rgba(11, 30, 46, .55)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-size: 1.35rem; white-space: nowrap; }
.nav { display: none; gap: 18px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; font-size: .98rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a:focus-visible { border-color: var(--brass-2); }
.lang { margin-left: auto; display: flex; border: 1px solid rgba(241, 207, 122, .6); border-radius: 999px; overflow: hidden; }
.lang a { text-decoration: none; font-weight: 700; font-size: .9rem; padding: 6px 12px; min-width: 44px; text-align: center; }
.lang a[aria-current="true"] { background: var(--brass-2); color: var(--ink); }
/* phone menu: a <details> toggle, works without JS */
.menu { order: 3; }
.menu summary { list-style: none; cursor: pointer; font-size: 1.4rem; line-height: 1; padding: 8px 10px; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: rgba(241, 207, 122, .2); }
.menu[open] + .nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; padding: 6px var(--gutter) 14px; background: rgba(11, 30, 46, .96); }
.menu[open] + .nav a { padding: 12px 4px; border-bottom: 1px solid rgba(241, 207, 122, .2); }
.topbar .lang { order: 2; }
@media (min-width: 980px) { .menu { display: none; } .nav, .menu[open] + .nav { display: flex; flex-direction: row; position: static; padding: 0; background: none; gap: 18px; } .menu[open] + .nav a { padding: 6px 2px; border-bottom: 2px solid transparent; } .lang { margin-left: 8px; } .topbar .lang { order: 0; } }

/* ---------- Parallax base ---------- */
[data-parallax] { position: relative; overflow: hidden; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.js [data-speed] { will-change: transform; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: start center; color: var(--parchment); isolation: isolate; background: #f2c27a; }
.scene { position: absolute; inset: 0; z-index: -1; }
.sky { inset: -20% 0 0; background: linear-gradient(180deg, #3ab6c9 0%, #78d3d6 34%, #f6dca0 58%, #f4b26a 68%); }
.sun { inset: auto; left: 50%; top: 40%; width: 70vmin; height: 70vmin; margin-left: -35vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 210, .95) 0 18%, rgba(255, 220, 140, .45) 40%, rgba(255, 210, 120, 0) 70%); }
.clouds-back { top: 6%; bottom: auto; left: -10%; right: -10%; opacity: .9; }
.clouds-back img { width: 100%; }
.clouds-front { top: auto; bottom: 30%; left: -30%; right: -30%; opacity: .55; }
.clouds-front img { width: 100%; filter: blur(1px); }
.drift { animation: drift 80s linear infinite alternate; }
.drift.slow { animation-duration: 140s; }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.isle-far { top: auto; bottom: 39%; left: -8%; width: 62%; height: auto; }
.isle-far img { transform: scaleX(-1); filter: saturate(.5) brightness(1.15) contrast(.75) hue-rotate(-12deg) blur(.6px); opacity: .7; }
.sea { top: 58%; background:
  radial-gradient(ellipse 60% 6% at 50% 2%, rgba(255, 240, 200, .75), transparent 70%),
  repeating-linear-gradient(180deg, rgba(255, 255, 255, .0) 0 18px, rgba(255, 255, 255, .10) 18px 20px),
  linear-gradient(180deg, #5fd0c8 0%, #1fa9ae 30%, #0f7f93 70%, #0b5a76 100%); }
.isle-near { top: auto; bottom: 30%; left: auto; right: -14%; width: 74%; }
.ship { top: auto; bottom: 14%; left: 2%; width: 78%; max-width: 640px; }
.bob { animation: bob 5.5s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
.waves-front { top: auto; bottom: -2px; height: 22%; }
.waves-front svg { width: 100%; height: 100%; display: block; }

.hero-copy { position: relative; text-align: center; padding: calc(70px + env(safe-area-inset-top)) var(--gutter) 0; max-width: 900px; }
.emblem { width: clamp(84px, 18vw, 140px); margin: 0 auto -6px; filter: drop-shadow(0 6px 10px rgba(60, 30, 0, .45)); }
.kicker { font-weight: 700; text-shadow: 0 1px 3px rgba(40, 20, 0, .9), 0 0 10px rgba(40, 20, 0, .5); letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; margin: 0 0 .2em; color: #fff7e0; }
.logo { font-family: var(--display); font-size: clamp(3.4rem, 15vw, 8.5rem); margin: 0; line-height: .95;
  color: var(--brass-2); background: linear-gradient(180deg, #fff1b8 0%, #f1cf7a 45%, #c58a2c 75%, #8a5f1e 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 #3b220f) drop-shadow(0 8px 14px rgba(40, 20, 0, .55)); }
.logo.small { font-size: 2.2rem; }
.tagline { font-size: clamp(1.15rem, 3.6vw, 1.6rem); font-style: italic; margin: .5em auto 1em; max-width: 30ch; color: #fffaf0; text-shadow: 0 2px 6px rgba(30, 15, 0, .85), 0 0 18px rgba(30, 15, 0, .45); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.play-badge { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: #111; color: #fff; border: 2px solid #8b8b8b; border-radius: 12px; padding: 8px 18px 8px 14px; line-height: 1.05; font-family: system-ui, sans-serif; font-weight: 600; font-size: 1.2rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.play-badge small { display: block; font-size: .68rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
.play-badge svg { width: 26px; height: 26px; color: var(--brass-2); }
.play-badge.big { font-size: 1.5rem; padding: 12px 26px 12px 18px; margin: 8px 0 6px; }
.scroll-hint { color: #fffaf0; font-weight: 700; text-decoration: none; padding: 10px 6px; text-shadow: 0 1px 4px rgba(30, 15, 0, .9); }
.scroll-hint::after { content: ' ↓'; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; color: var(--ink); background: linear-gradient(180deg, var(--brass-2), var(--brass)); border: 2px solid var(--brass-dark); border-radius: 999px; padding: 10px 22px; box-shadow: 0 3px 0 var(--brass-dark); }
.btn:hover { filter: brightness(1.06); }

@media (min-width: 760px) {
  .ship { width: 29%; left: 2%; bottom: 7%; }
  .isle-near { width: 46%; right: -4%; bottom: 33%; }
  .isle-far { width: 22%; left: 24%; bottom: 43%; }
  .clouds-back { left: -5%; right: -5%; top: 4%; }
  .hero-copy { padding-top: 96px; }
}

/* ---------- Sections ---------- */
.sec { padding: 72px 0 80px; position: relative; }
.parchment { background: radial-gradient(ellipse at 20% 0%, #fbf1d8, transparent 60%), radial-gradient(ellipse at 90% 100%, #e5cc94, transparent 55%), var(--parchment); }
.parchment::before, .wood::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sea-sec { color: var(--foam); background: linear-gradient(180deg, #0f6f86, var(--sea-deep)); }
.sea-sec .lead, .wood .lead, .night .lead { color: #e8f4f0; }
.wood { color: var(--parchment); background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .0) 0 120px, rgba(0, 0, 0, .18) 120px 123px), linear-gradient(180deg, var(--wood-2), var(--wood)); }
.night { color: var(--foam); background: linear-gradient(180deg, var(--sea-deep), var(--night)); }

.two { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1.1fr; gap: 56px; } }
.frame { margin: 0; border: 6px solid var(--wood-2); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 2px var(--brass), 0 18px 36px rgba(60, 30, 0, .35); background: var(--wood); }
.tilt { transform: rotate(1.2deg); }
.float { position: absolute; pointer-events: none; z-index: 1; }
.cloud-a { top: -40px; right: -20%; width: 90%; opacity: .45; }

.ago { display: grid; gap: 20px; margin-top: 56px; align-items: center; background: rgba(255, 250, 235, .6); border: 2px solid var(--brass); border-radius: var(--radius); padding: 20px; }
.ago-float { width: 170px; justify-self: center; margin-top: -70px; filter: drop-shadow(0 12px 14px rgba(60, 30, 0, .35)); }
.ago-float img { animation: bob 4.5s ease-in-out infinite; }
@media (min-width: 700px) { .ago { grid-template-columns: 220px 1fr; padding: 28px 36px; } .ago-float { width: 220px; margin: -90px 0 -40px; } }
blockquote { margin: .6em 0 0; padding-left: 14px; border-left: 4px solid var(--brass); font-style: italic; color: var(--ink-soft); }
.night blockquote, .sea-sec blockquote { color: #f3e6c8; }

.factions { list-style: none; padding: 0; margin-top: 36px; display: grid; gap: 12px; }
@media (min-width: 700px) { .factions { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .factions { grid-template-columns: repeat(4, 1fr); } }
.factions li { background: var(--parchment-2); border-radius: 10px; padding: 14px 16px; border-top: 4px solid var(--wood-2); }
.factions b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.factions span { font-size: .98rem; }

/* band with a big painting and a ship crossing */
.band { height: 70vh; min-height: 360px; max-height: 720px; background: #6fc8d0; }
.band-bg { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; object-fit: cover; }
.band-ship { position: absolute; bottom: 4%; left: -40%; width: 46%; max-width: 420px; filter: drop-shadow(0 10px 12px rgba(0, 30, 40, .35)); }

.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.card { background: linear-gradient(180deg, #fbf1d8, var(--parchment-2)); color: var(--ink); border-radius: var(--radius); padding: 22px 22px 14px; border: 3px solid var(--brass); box-shadow: 0 12px 24px rgba(0, 20, 30, .35); position: relative; }
.num { position: absolute; top: -18px; left: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.4rem; background: var(--red); color: #fff; border: 3px solid var(--brass-2); }
.card h3 { margin-top: 8px; }
.pillars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 800px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillars li { padding: 12px 14px; border: 1px solid rgba(233, 251, 247, .35); border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 1rem; }
.pillars b { display: block; color: var(--brass-2); font-family: var(--display); font-weight: 400; font-size: 1.3rem; }

/* fleet: horizontal scroller on phones, grid on desktop */
.ships { list-style: none; margin: 28px 0 10px; padding: 6px var(--gutter) 18px; display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; position: relative; z-index: 2; }
@media (min-width: 1100px) { .ships { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); width: min(1240px, 100% - 32px); margin-inline: auto; padding-inline: 0; overflow: visible; } }
.ship-card { scroll-snap-align: center; background: linear-gradient(180deg, #fbf1d8, var(--parchment-2)); color: var(--ink); border-radius: var(--radius); overflow: hidden; border: 3px solid var(--brass); box-shadow: 0 10px 20px rgba(0, 0, 0, .35); display: flex; flex-direction: column; }
.ship-card img { aspect-ratio: 1; object-fit: cover; }
.ship-card h3 { margin: 12px 16px 4px; }
.ship-card p { margin: 0 16px 10px; font-size: 1rem; }
.ship-card dl { margin: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--wood); color: var(--parchment); text-align: center; padding: 8px 4px; font-size: .82rem; }
.ship-card dt { grid-row: 1; opacity: .85; }
.ship-card dd { grid-row: 2; margin: 0; font-family: var(--display); font-size: 1.35rem; color: var(--brass-2); }
.wood .note { color: #f3e6c8; }

/* port */
.window { height: 46vh; min-height: 260px; max-height: 520px; margin: -72px 0 48px; position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.window img { position: absolute; left: 0; top: -25%; width: 100%; height: 150%; object-fit: cover; }
.grid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile { background: rgba(255, 250, 235, .75); border-radius: var(--radius); overflow: hidden; border: 2px solid var(--brass); }
.tile img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.tile h3 { font-size: 1.3rem; margin: 10px 12px 2px; }
.tile p { margin: 0 12px 12px; font-size: .95rem; }
.tile.dark { background: rgba(255, 255, 255, .06); border-color: rgba(210, 162, 76, .7); color: var(--foam); }
.tile.wide { grid-column: span 2; }
.tile.wide img { aspect-ratio: 16 / 8; }
@media (min-width: 800px) { .enemies .tile.wide { grid-column: span 1; } .enemies .tile.wide img { aspect-ratio: 1; } .enemies { grid-template-columns: repeat(5, 1fr); } }

/* kraken */
.kraken { min-height: 110vh; display: grid; align-items: end; color: #fff; background: #2a1840; padding: 0 0 80px; }
.kraken-bg { position: absolute; inset: 0; }
.kraken-bg img { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; }
.kraken-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--night) 0%, rgba(18, 28, 51, 0) 22%, rgba(18, 28, 51, 0) 50%, rgba(18, 12, 30, .9) 85%, #160e24 100%); }
.tentacle { position: absolute; bottom: -14%; width: 42vw; max-width: 360px; z-index: 1; filter: drop-shadow(0 0 20px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; }
.t1 { left: -6%; }
.t2 { right: -8%; width: 38vw; max-width: 320px; bottom: -20%; }
.t2 img { transform: scaleX(-1); }
.kraken-copy { z-index: 3; max-width: 640px; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.kraken-copy h2 { font-size: clamp(3rem, 12vw, 6rem); color: #d6b4ff; }
.kraken-copy p { font-size: 1.2rem; }

/* characters */
.chars { grid-template-columns: 1fr; }
@media (min-width: 560px) { .chars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .chars { grid-template-columns: repeat(4, 1fr); } }
.char { background: rgba(255, 250, 235, .75); border: 2px solid var(--brass); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.char img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; }
.char h3 { font-size: 1.35rem; margin-bottom: 0; }
.role { font-weight: 700; color: var(--red); font-size: .95rem; margin: 2px 0 0; }
.char blockquote { font-size: .98rem; }

/* screenshots placeholder */
.shots { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
@media (min-width: 800px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.phone { position: relative; border: 10px solid #151515; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.phone img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; opacity: .9; }
.phone span { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .8rem; padding: 3px 8px; border-radius: 6px; }

.download { text-align: center; }
.download .lead { margin-inline: auto; }

.footer { background: #0a1a26; color: #d8e6e4; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: .95rem; }
.footer .logo { -webkit-text-fill-color: var(--brass-2); background: none; filter: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }
.foot-links a { color: var(--brass-2); padding: 6px 0; }

/* reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* No JS: parallax layers stay put, everything visible. Reduced motion: no animation at all. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drift, .bob, .ago-float img { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js [data-speed] { will-change: auto; }
}

/* ---------- Shared bits for inner pages ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn.alt { background: transparent; border-color: var(--wood-2); box-shadow: none; }
.preview-banner { background: #fff3c4; color: var(--ink); border: 2px dashed var(--red); padding: 12px var(--gutter); text-align: center; font-size: 1.02rem; margin: 0; }
.preview-banner.inline { border-radius: 10px; text-align: left; margin: 0 0 1em; }
.narrow { max-width: 720px; }
.plain-page { min-height: 80vh; padding-top: 110px; }
.badge { display: inline-block; font: 700 .72rem/1 var(--body); padding: 3px 7px; border-radius: 6px; color: #fff; vertical-align: middle; letter-spacing: .03em; }
.badge-MVP { background: #2f7d3b; } .badge-V1 { background: #a8620c; } .badge-V2 { background: #7a3fa0; }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: rgba(255, 250, 235, .7); }
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(74, 46, 26, .25); text-align: left; vertical-align: top; }
thead th { background: var(--wood); color: var(--parchment); font-weight: 700; }

/* ---------- Pearl shop (visual only) ---------- */
.shop-hero { min-height: 62vh; display: grid; align-items: end; color: var(--parchment); background: var(--wood); padding: 110px 0 40px; }
.shop-bg { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; opacity: .55; }
.shop-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 4, .3), rgba(20, 10, 4, .85)); }
.shop-head { z-index: 2; }
.shop-head h1 { font-size: clamp(3rem, 12vw, 6rem); color: var(--brass-2); }
.packs { list-style: none; padding: 0; margin: 28px 0 12px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pack { position: relative; text-align: center; background: linear-gradient(180deg, #fffaf0, var(--parchment-2)); border: 3px solid var(--brass); border-radius: var(--radius); padding: 22px 14px 16px; box-shadow: 0 8px 18px rgba(60, 30, 0, .2); display: flex; flex-direction: column; }
.pack.best { border-color: var(--red); box-shadow: 0 0 0 3px rgba(168, 50, 42, .25), 0 10px 22px rgba(60, 30, 0, .3); }
.pack .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pearls { color: #b9c7d6; text-shadow: 0 0 6px #fff, 0 1px 0 #6d7d8f; font-size: 1.6rem; letter-spacing: -2px; }
.pack h3 { font-size: 1.6rem; margin: 6px 0 2px; }
.bonus { color: #2f7d3b; font-weight: 700; font-size: .9rem; min-height: 1.4em; margin-bottom: 6px; }
.price { font-family: var(--display); font-size: 1.9rem; color: var(--wood); margin: auto 0 10px; }
button[disabled] { font: 700 .95rem var(--body); padding: 10px 12px; border-radius: 999px; border: 2px dashed #8a7a66; background: #e9e1d0; color: #4f4333; cursor: not-allowed; min-height: 44px; }
.offers { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 860px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer { display: grid; grid-template-columns: 110px 1fr; gap: 16px; background: linear-gradient(180deg, #fbf1d8, var(--parchment-2)); color: var(--ink); border: 3px solid var(--brass); border-radius: var(--radius); padding: 16px; }
.offer img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.offer ul { margin: 0 0 8px; padding-left: 1.1em; }
.offer .price { margin: 4px 0 8px; font-size: 1.6rem; }
.offer .note { color: var(--ink-soft); }
.once { font-weight: 700; color: var(--red); margin: 0 0 6px; font-size: .95rem; }
.fair li b { font-size: 1.2rem; }
@media (min-width: 800px) { .fair { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Manual: one immersive page ---------- */
.man-hero { min-height: 92vh; min-height: 92svh; display: grid; align-items: end; color: var(--parchment); background: #2b1a10; padding: 110px 0 56px; }
.man-hero-img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; object-position: 50% 30%; }
.man-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 4, .1) 30%, rgba(20, 10, 4, .88)); }
.man-hero-copy { z-index: 2; }
.man-hero h1 { font-size: clamp(3rem, 11vw, 6.5rem); color: var(--brass-2); text-shadow: 0 3px 0 #3b220f, 0 8px 18px rgba(0, 0, 0, .6); }
.man-hero .lead { color: #fff6df; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.pdf-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.man-end .pdf-row { justify-content: center; }
.btn.pdf { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.15; padding: 10px 22px; border-radius: 14px; }
.btn.pdf small { font-weight: 400; font-size: .8rem; opacity: .85; }
.legend { font-size: .9rem; color: #f3e6c8; }
.toc-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.toc-grid a { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; text-decoration: none; background: rgba(255, 250, 235, .85); border: 2px solid var(--brass); border-radius: 12px; overflow: hidden; height: 100%; }
.toc-grid a:hover { border-color: var(--red); }
.toc-grid img { grid-row: 1 / 3; width: 96px; height: 100%; min-height: 96px; object-fit: cover; }
.toc-grid .n { display: none; }
.toc-grid .t { font-family: var(--display); font-size: 1.3rem; padding: 8px 8px 0 0; }
.toc-grid .s { font-size: .88rem; color: var(--ink-soft); padding: 0 8px 8px 0; }
.chapter { position: relative; scroll-margin-top: 56px; }
.ch-hero { min-height: 72vh; display: grid; align-items: end; color: #fff; background: var(--sea-deep); padding: 80px 0 72px; }
.ch-hero-img { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; }
.ch-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(20, 12, 6, .8) 92%); }
.ch-hero-copy { z-index: 2; text-shadow: 0 2px 8px rgba(0, 0, 0, .85); }
.ch-hero h2 { font-size: clamp(2.6rem, 9vw, 5rem); color: var(--brass-2); margin: 0; }
.ch-num { font-family: var(--display); font-size: 1.3rem; margin: 0; color: #fff3d0; }
.ch-teaser { font-style: italic; font-size: 1.15rem; max-width: 48ch; margin: .3em 0 0; }
.ch-body { position: relative; padding: 0 0 64px; background: #e8d6ae; }
/* faded illustration under the text: a sticky full-viewport image inside the chapter body (no JS needed) */
.ch-bg { position: absolute; inset: 0; overflow: clip; }
.ch-bg img { position: sticky; top: 0; width: 100%; height: 100vh; object-fit: cover; opacity: .3; filter: sepia(.45) saturate(.8); }
.ch-panel { position: relative; z-index: 1; width: min(860px, 100% - 2 * var(--gutter)); margin: -48px auto 0; padding: 28px 20px 18px; background: rgba(250, 241, 216, .95); border: 2px solid var(--brass); border-radius: 6px; box-shadow: 0 18px 40px rgba(60, 30, 0, .35); }
@media (min-width: 760px) { .ch-panel { padding: 44px 56px 28px; } }
.ch-panel h2 { font-size: 2.1rem; color: var(--wood); margin-top: 1.2em; clear: both; }
.ch-panel h3 { font-size: 1.6rem; color: var(--red); margin-top: 1.1em; clear: both; }
.ch-panel blockquote { background: rgba(210, 162, 76, .14); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.ch-panel ul, .ch-panel ol { padding-left: 1.3em; }
.figure { margin: 1.2em 0; }
.figure img { border-radius: 8px; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(60, 30, 0, .3); width: 100%; }
.figure figcaption { font-style: italic; font-size: .92rem; color: var(--ink-soft); text-align: center; margin-top: 6px; }
.figure.small { width: 40%; float: right; margin: .3em 0 .8em 1.2em; }
.ch-top { clear: both; text-align: right; font-size: .9rem; margin: 1.5em 0 0; }
.toc-float { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; }
.toc-float summary { list-style: none; cursor: pointer; background: var(--wood); color: var(--parchment); border: 2px solid var(--brass); border-radius: 999px; padding: 10px 16px; font-weight: 700; box-shadow: 0 8px 18px rgba(0, 0, 0, .4); min-height: 44px; }
.toc-float summary::-webkit-details-marker { display: none; }
.toc-float ol { position: absolute; right: 0; bottom: 54px; width: min(320px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; margin: 0; padding: 10px; list-style: none; background: var(--parchment); border: 2px solid var(--brass); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.toc-float a { display: block; padding: 8px 10px; text-decoration: none; border-radius: 6px; }
.toc-float a:hover, .toc-float a:focus-visible { background: var(--parchment-2); }
.toc-float .n { display: inline-block; min-width: 1.6em; font-family: var(--display); color: var(--red); }
@media (prefers-reduced-motion: reduce) { .ch-bg img { position: static; height: 100%; } }
