/* Layout idea: a night-voyage poster. Cinematic hero with a live starfield and the author's portrait,
   then the books as physical objects, the author's own words, the log (blog), and a call to join the crew. */
:root {
  --ink: #0a0b0f;
  --surface: #12141b;
  --text: #ece6da;
  --muted: #9a9488;
  --ember: #d4813b;
  --cold: #6f8fae;
  --line: rgba(236, 230, 218, 0.12);
  --font-display: "Bodoni Moda", "Didot", Georgia, serif;
  --font-body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* film grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.02; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 em, h1 em { font-style: italic; color: var(--ember); }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
section { padding: 104px 0; position: relative; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ember); margin: 0 0 18px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(to bottom, rgba(10, 11, 15, 0.95), rgba(10, 11, 15, 0.82));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.brand span { color: var(--ember); }
nav#menu { display: flex; align-items: center; gap: 30px; }
nav#menu a { text-decoration: none; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 6px 0; position: relative; }
nav#menu a:hover, nav#menu a[aria-current="page"] { color: var(--text); }
nav#menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--ember); transition: right 0.3s ease; }
nav#menu a:hover::after, nav#menu a[aria-current="page"]::after { right: 0; }
nav#menu a.nav-cta { color: var(--ink); background: var(--ember); padding: 9px 16px; border-radius: 2px; }
nav#menu a.nav-cta::after { display: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 2px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 9px 14px; cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  padding: 16px 26px; border-radius: 2px; border: 1px solid var(--ember);
  background: var(--ember); color: #160d05; transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: #e6964f; border-color: #e6964f; transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(212, 129, 59, 0.6); }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(236, 230, 218, 0.3); }
.btn.ghost:hover { border-color: var(--ember); color: var(--ember); box-shadow: none; }
.btn.small { padding: 10px 16px; font-size: 0.7rem; }

/* ---------- hero ---------- */
.hero { padding: 0; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 85% 20%, rgba(111, 143, 174, 0.22), transparent 70%),
    radial-gradient(50% 60% at 10% 100%, rgba(212, 129, 59, 0.2), transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: end; padding-top: 72px; }
.hero-copy { padding-bottom: 64px; position: relative; z-index: 2; }
.hero .coords { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(3.6rem, 13vw, 9.5rem); line-height: 0.86; letter-spacing: -0.035em; margin-bottom: 30px;
}
.hero h1 .first { display: block; font-style: italic; font-weight: 400; color: var(--muted); font-size: 0.42em; letter-spacing: 0; margin-bottom: 0.15em; }

.hero .lede { font-size: 1.15rem; color: #cfc8ba; max-width: 46ch; margin-bottom: 34px; }
.hero .lede em { font-family: var(--font-display); font-size: 1.15em; color: var(--text); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-portrait { position: relative; align-self: end; justify-self: center; width: min(100%, 460px); }
.hero-portrait img {
  width: 100%; filter: grayscale(0.35) contrast(1.08) brightness(0.92) sepia(0.12);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.hero-portrait::before {
  content: ""; position: absolute; inset: 8% -6% auto -6%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(212, 129, 59, 0.35);
  box-shadow: 0 0 0 26px rgba(236, 230, 218, 0.025), 0 0 0 27px rgba(236, 230, 218, 0.08);
}
.reveal { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: .12s; } .reveal.d2 { animation-delay: .24s; } .reveal.d3 { animation-delay: .36s; } .reveal.d4 { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- genre band ---------- */
.band { padding: 0; border-bottom: 1px solid var(--line); }
.band .wrap { display: grid; grid-template-columns: 1fr; }
.band .cell { padding: 26px 0; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 16px; }
.band .cell:first-child { border-top: 0; }
.band .n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ember); letter-spacing: 0.14em; }
.band .g { font-family: var(--font-display); font-size: 1.7rem; font-style: italic; }
.band .d { color: var(--muted); font-size: 0.92rem; margin-left: auto; text-align: right; }

/* ---------- books ---------- */
.feature { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.feature + .feature { margin-top: 112px; padding-top: 104px; border-top: 1px solid var(--line); }
.stage { display: flex; justify-content: center; perspective: 1400px; padding: 20px 0; position: relative; }
.stage::after { content: ""; position: absolute; bottom: 0; left: 15%; right: 15%; height: 30px; background: radial-gradient(closest-side, rgba(0,0,0,0.8), transparent); filter: blur(6px); }
.book3d svg { width: 100%; height: 100%; display: block; }

.book-copy h3 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin: 6px 0 10px; letter-spacing: -0.025em; }
.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(212, 129, 59, 0.18); }
.status.soon { color: var(--cold); }
.status.soon::before { box-shadow: 0 0 0 4px rgba(111, 143, 174, 0.2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(111, 143, 174, 0); } }
.genre { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--muted); margin-bottom: 22px; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 26px 0 30px; max-width: 520px; }
.specs div { padding: 14px 0; }
.specs dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-size: 0.98rem; }
.placeholder { border-left: 2px dashed rgba(212, 129, 59, 0.5); padding-left: 14px; color: var(--muted); font-style: italic; }
.book-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- about ---------- */
.about-sec { background: linear-gradient(180deg, transparent, rgba(111,143,174,0.05) 40%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; margin-top: 48px; }
.portrait { position: relative; max-width: 400px; }
.portrait img { width: 100%; border-radius: 2px; filter: grayscale(0.2) contrast(1.05); }
.portrait::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid rgba(212, 129, 59, 0.45); z-index: -1; }
.portrait figcaption { margin-top: 26px; }
.about-copy p { color: #d6cfc2; }
blockquote.big {
  margin: 0 0 36px; font-family: var(--font-display); font-style: italic; font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.15; letter-spacing: -0.01em; color: var(--text); max-width: 20ch;
}
blockquote.big::before { content: "\201C"; display: block; font-size: 2.6em; line-height: 0.6; color: var(--ember); margin-bottom: 4px; }
blockquote.big cite { display: block; margin-top: 16px; font-family: var(--font-mono); font-style: normal; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 30px 0; }
.facts div { background: var(--ink); padding: 18px 18px 16px; }
.facts dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 0.95rem; line-height: 1.45; }

/* ---------- social ---------- */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.social a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); transition: color .2s, border-color .2s; }
.social a:hover { border-color: var(--ember); color: var(--ember); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- blog cards ---------- */
.post-card {
  display: grid; gap: 4px; text-decoration: none; padding: 36px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--surface), #0e1016); border: 1px solid var(--line); border-radius: 2px; transition: border-color .3s, transform .3s;
}
.post-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ember); transform: scaleY(0); transform-origin: top; transition: transform .4s ease; }
.post-card:hover { border-color: rgba(212, 129, 59, 0.4); transform: translateY(-2px); }
.post-card:hover::before { transform: scaleY(1); }
.post-card h2, .post-card h3 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: 6px 0 12px; }
.post-card p { color: var(--muted); margin-bottom: 18px; }
.post-card .more { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); }
.meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.log-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 40px; }
.log-head a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); text-decoration: none; }

/* ---------- newsletter ---------- */
.crew { text-align: left; border-top: 1px solid var(--line); overflow: hidden; }
.crew::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 100% 50%, rgba(212,129,59,0.14), transparent 70%); pointer-events: none; }
.crew .wrap { position: relative; display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.crew h2 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
form.signup { display: flex; flex-wrap: wrap; gap: 0; max-width: 540px; border: 1px solid rgba(236,230,218,0.25); border-radius: 2px; }
form.signup input { flex: 1 1 220px; border: 0; background: transparent; }
form.signup .btn { border-radius: 0; flex: 0 0 auto; }
label.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
input[type="email"], input[type="text"], textarea {
  width: 100%; padding: 16px 18px; font: inherit; color: var(--text);
  background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 2px;
}
input:focus, textarea:focus { outline: none; border-color: var(--ember); }
input::placeholder, textarea::placeholder { color: #6f6a62; }
.note { font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; }
#signup-msg { color: var(--ember); min-height: 1.4em; margin: 10px 0 0; font-size: 0.9rem; }
.perks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.perks li { display: flex; gap: 12px; color: #d6cfc2; }
.perks li::before { content: "\2726"; color: var(--ember); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
.contact-form { display: grid; gap: 12px; }
.contact-lines { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 24px; }
.contact-lines div { background: var(--ink); padding: 16px 18px; }
.contact-lines dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); }
.contact-lines dd { margin: 4px 0 0; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 72px 0 48px; color: var(--muted); font-size: 0.88rem; overflow: hidden; }
footer .sign { font-family: var(--font-display); font-size: clamp(3rem, 14vw, 10rem); line-height: 0.85; letter-spacing: -0.04em; color: rgba(236, 230, 218, 0.06); margin-bottom: 40px; white-space: nowrap; }
footer .row { display: flex; flex-direction: column; gap: 20px; }

/* ---------- blog pages ---------- */
.page-head { padding: 88px 0 40px; }
.page-head h1 { font-size: clamp(3rem, 9vw, 6rem); letter-spacing: -0.03em; }
.page-head p { color: var(--muted); margin-top: 16px; font-size: 1.1rem; }
.post-list { display: grid; gap: 20px; margin: 20px 0 104px; }
.post { padding: 72px 0 24px; }
.post h1 { font-size: clamp(3rem, 9vw, 6rem); margin: 18px 0 20px; letter-spacing: -0.03em; }
.post .meta { margin-bottom: 52px; padding-bottom: 28px; border-bottom: 1px solid var(--line); max-width: 700px; }
.post-body { max-width: 700px; }
.post-body p { font-size: 1.14rem; line-height: 1.8; margin-bottom: 1.4em; max-width: none; color: #ddd6c9; }
.post-body > p:first-child::first-letter { font-family: var(--font-display); float: left; font-size: 4.6em; line-height: 0.8; padding: 0.08em 0.1em 0 0; color: var(--ember); }
.post-body .pull { font-family: var(--font-display); font-style: italic; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.25; color: var(--text); border-left: 2px solid var(--ember); padding-left: 24px; margin: 1.8em 0; }
.back { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ember); }
.post-end { max-width: 700px; margin: 40px 0 104px; padding-top: 32px; border-top: 1px solid var(--line); }
.share { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 859px) {
  .nav-toggle { display: inline-block; }
  nav#menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 11, 15, 0.98); border-bottom: 1px solid var(--line); padding: 8px 22px 22px;
  }
  nav#menu.open { display: flex; }
  nav#menu a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
  nav#menu a::after { display: none; }
  nav#menu a.nav-cta { margin-top: 16px; text-align: center; border-bottom: 0; }
  .hero-portrait { width: min(78%, 360px); margin-top: -10px; }
}
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.25fr 1fr; gap: 40px; padding-top: 96px; }
  .hero-copy { padding-bottom: 104px; }
  .hero-portrait { justify-self: end; }
  .band .wrap { grid-template-columns: repeat(3, 1fr); }
  .band .cell { border-top: 0; border-left: 1px solid var(--line); padding: 30px 28px; flex-direction: column; gap: 6px; }
  .band .cell:first-child { border-left: 0; padding-left: 0; }
  .band .d { margin-left: 0; text-align: left; }
  .feature { grid-template-columns: 1fr 1.15fr; gap: 80px; }
  .feature.flip .stage { order: 2; }
  .about { grid-template-columns: 400px 1fr; gap: 88px; }
  .crew .wrap { grid-template-columns: 1.1fr 1fr; gap: 72px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 72px; }
  footer .row { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .status.soon::before { animation: none; }
  .book3d, .post-card, .btn { transition: none; }
}

/* refinements after review */
.hero .wrap { align-items: center; }
.hero-portrait { width: min(100%, 420px); }
.hero-portrait img {
  filter: grayscale(0.9) sepia(0.25) brightness(0.72) contrast(1.15);
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 40%, #000 45%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 60% at 50% 40%, #000 45%, transparent 100%);
}
.hero-portrait::before { inset: 10% 2% auto 2%; }
.portrait { max-width: 340px; }
.portrait img { filter: grayscale(0.55) sepia(0.15) brightness(0.85) contrast(1.1); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.perks li { display: block; position: relative; padding-left: 24px; }
.perks li::before { position: absolute; left: 0; }
@media (min-width: 860px) { .about { grid-template-columns: 340px 1fr; } }

/* ---------- richer post content (headings, lists, images written in the CMS) ---------- */
.post-body h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 1.6em 0 0.6em; }
.post-body h3, .post-body h4 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 1.4em 0 0.5em; }
.post-body ul, .post-body ol { margin: 0 0 1.4em; padding-left: 1.3em; font-size: 1.14rem; line-height: 1.8; color: #ddd6c9; }
.post-body li { margin-bottom: 0.4em; }
.post-body a { color: var(--ember); text-underline-offset: 3px; }
.post-body img { width: 100%; height: auto; border-radius: 2px; margin: 1.6em 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* ---------- portrait fit fix ---------- */
.portrait img, .hero-portrait img { height: auto; }
.portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
@media (max-width: 859px) {
  .portrait { max-width: 260px; margin: 0 auto; }
  .hero-portrait { width: min(62%, 260px); }
}
.portrait { margin: 0; }
@media (max-width: 859px) {
  .portrait { margin: 0 auto; }
  .portrait::after { inset: 12px -12px -12px 12px; }
  .portrait figcaption .social { justify-content: center; }
}
.book3d img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- hero name on one row ---------- */
.hero h1 { line-height: 1; }
.hero h1 .name {
  display: block; white-space: nowrap; font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 13.5vw, 6.1rem); line-height: 1.02; padding-bottom: 0.06em;
  background: linear-gradient(100deg, #fff6e6 0%, #ece6da 38%, #e9a35f 72%, #d4813b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(212, 129, 59, 0.28));
}

/* ---------- true 3D books ---------- */
.book3d {
  --w: min(66vw, 320px); --h: calc(var(--w) * 1.5); --d: calc(var(--w) * 0.17);
  position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; z-index: 1;
  transform: rotateX(-5deg) rotateY(28deg); transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
  margin: 10px 0;
}
.book3d:hover { transform: rotateX(-4deg) rotateY(14deg) translateY(-8px); }
.book3d .face { position: absolute; backface-visibility: hidden; }
.book3d .front { top: 0; left: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--d) / 2)); overflow: hidden; border-radius: 1px 4px 4px 1px; background: #111; }
.book3d .front::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.5) 0, rgba(255,255,255,0.14) 2.4%, rgba(0,0,0,0.22) 4.2%, transparent 8%),
              linear-gradient(115deg, rgba(255,255,255,0.14) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.28)); }
.book3d .front img, .book3d .front svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.book3d .back { top: 0; left: 0; width: 100%; height: 100%; background: #0c0d10; transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); }
.book3d .spine { top: 0; left: calc(var(--d) / -2); width: var(--d); height: 100%; transform: rotateY(-90deg);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 9% 0; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.book3d .spine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.12), transparent 40%, rgba(0,0,0,0.35)); }
.book3d .spine span, .book3d .spine i { writing-mode: vertical-rl; font-style: normal; white-space: nowrap; }
.book3d .spine span { font-family: var(--font-display); font-weight: 700; font-size: calc(var(--d) * 0.36); letter-spacing: 0.14em; }
.book3d .spine i { font-family: var(--font-mono); font-size: calc(var(--d) * 0.2); letter-spacing: 0.28em; opacity: 0.8; }
.book3d .spine.lep { background: linear-gradient(180deg, #17181a, #0b0b0c); color: #b3281c; }
.book3d .spine.vov { background: linear-gradient(180deg, #14233a, #0a1220); color: #cbd6e6; }
.book3d .pages, .book3d .top, .book3d .bottom {
  background: repeating-linear-gradient(90deg, #ece4d2 0 1px, #cfc6b2 1px 2px);
}
.book3d .pages { top: 1.2%; left: calc(var(--w) - var(--d) / 2); width: var(--d); height: 97.6%; transform: rotateY(90deg);
  background: repeating-linear-gradient(0deg, #efe8d8 0 1px, #cdc3ad 1px 2px); box-shadow: inset 0 0 14px rgba(0,0,0,0.35); }
.book3d .top { top: calc(var(--d) / -2); left: 0; width: 98.8%; height: var(--d); transform: rotateX(90deg); box-shadow: inset 0 0 12px rgba(0,0,0,0.4); }
.book3d .bottom { top: calc(var(--h) - var(--d) / 2); left: 0; width: 98.8%; height: var(--d); transform: rotateX(-90deg); filter: brightness(0.6); }
@media (prefers-reduced-motion: reduce) { .book3d, .book3d:hover { transition: none; } }
.hero h1 .first { font-size: clamp(1.15rem, 3.6vw, 1.9rem); white-space: nowrap; margin-bottom: 0.35em; }
.portrait::after { display: none; }
.portrait .frame { position: relative; }
.portrait .frame::after { content: ""; position: absolute; inset: -14px; border: 1px solid rgba(212, 129, 59, 0.45); pointer-events: none; }
@media (max-width: 859px) { .portrait .frame::after { inset: -12px; } .portrait { max-width: 250px; } }
.page-head .tagline { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ember); margin: 18px 0 14px; }

/* ---------- hero portrait: crop and blend (bright outdoor photo) ---------- */
.hero-portrait img {
  aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 50%;
  filter: grayscale(0.55) contrast(1.1) brightness(0.72) sepia(0.15);
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 44%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 60% at 50% 44%, #000 40%, transparent 100%);
}
.portrait img { object-position: 50% 28%; }

/* ---------- Charting the course (book progress) ---------- */
#horizon { border-top: 1px solid var(--line); }
.sec-lede { color: var(--muted); margin: 14px 0 0; }
.voyages { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 44px; }
.voyage { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(18,20,27,0.9), rgba(10,11,15,0.6)); padding: 30px 28px 28px; }
.voyage .tag, .port .tag, .anchored .tag { color: var(--cold); margin: 0 0 12px; }
.voyage h3 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-bottom: 26px; }
.voyage h3.redacted { margin-bottom: 10px; }
.voyage .bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 26px; }
.voyage .bars i { display: block; height: 8px; background: rgba(236,230,218,0.85); border-radius: 1px; width: 70%; }
.voyage .bars i + i { width: 42%; }
.track { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.track::before { content: ""; position: absolute; top: 6px; left: 10%; right: 10%; height: 1px; background: var(--line); }
.track li { position: relative; text-align: center; padding-top: 22px; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.track li::before { content: ""; position: absolute; top: 0; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; border: 1px solid rgba(236,230,218,0.35); background: var(--ink); }
.track li.done { color: #cfc8ba; }
.track li.done::before { background: var(--ember); border-color: var(--ember); }
.track li.current { color: var(--ember); }
.track li.current::before { background: var(--ink); border-color: var(--ember); box-shadow: 0 0 0 4px rgba(212,129,59,0.22), 0 0 14px rgba(212,129,59,0.5); }
.voyage .now { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.voyage .now strong { color: var(--ember); font-weight: 500; }
.voyage p:last-child { margin-bottom: 0; color: #cfc8ba; }
@media (min-width: 860px) { .voyages { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .track li { font-size: 0.5rem; letter-spacing: 0.04em; } .voyage { padding: 24px 18px; } }

/* ---------- free story callout ---------- */
.gift { margin: 0 0 22px; padding: 16px 18px; border: 1px solid rgba(212,129,59,0.4); background: rgba(212,129,59,0.07); color: #e4dccd; }
.gift em { font-family: var(--font-display); font-size: 1.1em; color: var(--text); }
.gift .badge { display: inline-block; margin-right: 8px; padding: 2px 8px; background: var(--ember); color: var(--ink); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Events: Ports of Call ---------- */
.page-head .tagline + p { margin-top: 0; }
h2.sub { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 64px 0 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.ports { display: grid; gap: 18px; }
.port { display: grid; grid-template-columns: 72px 1fr; gap: 22px; border: 1px solid var(--line); padding: 24px 22px; background: rgba(18,20,27,0.7); }
.port .when { text-align: center; border-right: 1px solid var(--line); padding-right: 18px; }
.port .when span { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); }
.port .when strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; font-weight: 500; }
.port h3 { font-size: 1.5rem; margin-bottom: 6px; }
.port .where { color: var(--muted); margin: 0 0 10px; }
.port .more { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); text-decoration: none; }
.ports.past { opacity: 0.7; }
.anchored { border: 1px dashed rgba(236,230,218,0.25); padding: 40px 28px; text-align: center; }
.anchored h3 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.anchored p { color: #cfc8ba; max-width: 46ch; margin: 0 auto 24px; }
.anchored .tag { margin-bottom: 14px; }
.dock { display: grid; gap: 18px; }
.dock > div { border: 1px solid var(--line); padding: 28px 24px; background: rgba(18,20,27,0.7); }
.dock h3 { font-size: 1.5rem; margin-bottom: 10px; }
.dock p { color: #cfc8ba; margin-bottom: 20px; }
.dock em { font-family: var(--font-display); color: var(--text); }
.soon { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cold); }

.anchored .tag { display: block; text-align: center; }

/* ---------- merch section ---------- */
#merch { border-top: 1px solid var(--line); padding: clamp(56px, 9vw, 96px) 0; }
.merch-card { display: grid; gap: 28px; align-items: center; border: 1px solid var(--line); padding: clamp(28px, 5vw, 48px); background: linear-gradient(135deg, rgba(18,20,27,0.9), rgba(10,11,15,0.6)); }
.merch-card h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 10px 0 14px; }
.merch-card p:not(.eyebrow) { color: #cfc8ba; max-width: 52ch; margin: 0; }
.merch-action .soon { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cold); }
@media (min-width: 860px) { .merch-card { grid-template-columns: 1fr auto; } }
