/* Juliet Ardlow — shared styles.
   Layout: night-harbour page. Full-bleed hero with the pier art and drifting lanterns,
   then the book, the journey, the pair, the series, the author and the reading list.
   Fonts are self-hosted (no requests to Google), single dark theme like the covers. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("fonts/eb-garamond-latin-500-italic.woff2") format("woff2"); }

:root {
  --night: #090d13;
  --night-2: #0f151d;
  --panel: #121a24;
  --cream: #efe6d2;
  --gold: #d6b67e;
  --gold-soft: rgba(214, 182, 126, .28);
  --muted: #9aa3ab;
  --red: #b8262b;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", Garamond, Georgia, serif;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--night); color: var(--cream);
  font-family: var(--body); font-size: 1.16rem; line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
.rule { width: 72px; height: 2px; background: var(--red); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--cream); color: var(--night); padding: 8px 12px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; transition: background 300ms, box-shadow 300ms; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 18px; transition: padding 250ms; }
.top.scrolled { background: rgba(9, 13, 19, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--gold-soft); }
.top.scrolled .wrap { padding-block: 10px; }
.brand { font-family: var(--display); font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; font-size: 1rem; color: var(--cream); text-decoration: none; }
.top nav { display: flex; gap: 6px 26px; flex-wrap: wrap; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 1.02rem; }
.top nav a:hover { color: var(--cream); }
.top nav a.cta { color: var(--night); background: var(--gold); padding: 6px 14px; font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.top nav a.cta:hover { background: var(--cream); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 10px 24px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: var(--night); background: var(--gold); border: 1px solid var(--gold); cursor: pointer;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.btn:hover { background: var(--cream); border-color: var(--cream); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--gold-soft); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 700ms ease; }
.btn:hover::after { transform: translateX(120%); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 900px); display: grid; align-items: center; margin-top: -84px; padding-top: 84px; overflow: hidden; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(56%, 820px); margin: 0; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%); mask-image: linear-gradient(to right, transparent 0%, #000 38%); }
.hero-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to top, var(--night), transparent); }
#lanterns { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; width: 100%; padding-block: clamp(48px, 9vw, 120px); }
.hero-text { max-width: 36rem; display: grid; gap: 24px; justify-items: start; }
.name { position: relative; display: inline-block; }
.name h1 { font-size: clamp(3.3rem, 9vw, 7rem); letter-spacing: 0.05em; text-transform: uppercase; line-height: .92; position: relative; z-index: 1; }
.name h1 span { display: block; }
.enso { position: absolute; z-index: 0; width: clamp(180px, 26vw, 330px); right: clamp(-150px, -9vw, -60px); top: 50%; transform: translateY(-52%); opacity: .9; }
.enso path { fill: none; stroke: var(--red); stroke-width: 9; stroke-linecap: round; }
.hero .quote { font-style: italic; color: var(--gold); font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.35; }
.hero .quote span { display: block; }
.hero .lede { color: var(--muted); max-width: 30rem; }

/* Sections */
section { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.head { display: grid; gap: 14px; max-width: 42rem; margin-bottom: clamp(32px, 5vw, 56px); }
.head h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.head p { color: var(--muted); }
.divider { height: 1px; background: linear-gradient(to right, transparent, var(--gold-soft), transparent); }

/* Book */
.book-banner { position: relative; border: 1px solid var(--gold-soft); box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.book-banner a { display: block; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(32px, 5vw, 56px); align-items: start; }
.blurb { display: grid; gap: 16px; min-width: 0; }
.blurb .hook { font-family: var(--display); font-weight: 600; font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.25; color: var(--cream); }
.blurb .hook span { display: block; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--gold-soft); min-width: 0; }
.facts > div:not(.btns) { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--gold-soft); font-size: 1.02rem; }
.facts dt, .facts .k { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.facts .btns { margin-top: 22px; display: grid; gap: 10px; }
.facts .btns .btn { flex: 1 1 100%; }

/* Journey */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.journey::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--gold-soft); }
.journey li { position: relative; padding-right: 22px; display: grid; gap: 10px; align-content: start; }
.journey .dot { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold); background: var(--night); display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 1.1rem; position: relative; }
.journey li:last-child .dot { border-color: var(--red); color: var(--cream); background: var(--red); }
.journey h3 { font-size: 1.55rem; margin-top: 6px; }
.journey p { color: var(--muted); font-size: 1.02rem; }

/* Pair */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.person { padding: clamp(24px, 4vw, 40px); background: var(--panel); border: 1px solid var(--gold-soft); display: grid; gap: 12px; align-content: start; }
.person .role { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.person h3 { font-size: clamp(2rem, 3.6vw, 2.6rem); }
.person p { color: var(--muted); }
.person .mark { width: 40px; height: 40px; }
.person .mark circle, .person .mark path { fill: none; stroke: var(--red); stroke-width: 2.5; }
.person .mark .dotfill { fill: var(--red); stroke: none; }

/* Series */
.series { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 24px); }
.vol { border: 1px solid var(--gold-soft); padding: 22px; display: grid; gap: 8px; align-content: start; min-height: 170px; }
.vol .n { font-family: var(--display); font-weight: 600; font-size: .8rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.vol h3 { font-size: 1.6rem; }
.vol .s { color: var(--muted); font-size: 1rem; }
.vol.out { border-color: var(--gold); background: linear-gradient(160deg, rgba(214,182,126,.10), transparent 60%); }
.vol.next { border-style: dashed; }
.vol.next .badge { justify-self: start; background: var(--red); color: var(--cream); font-family: var(--display); font-weight: 600; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; padding: 3px 9px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.portrait { margin: 0; position: relative; max-width: 420px; }
.portrait::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid var(--gold-soft); }
.portrait img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 40%; filter: saturate(.92); }
.about .text { display: grid; gap: 16px; min-width: 0; }
.about h2 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.about p { color: var(--muted); max-width: 36rem; }
.about p.lead { color: var(--cream); font-size: 1.28rem; font-style: italic; }

/* Reading list */
.list-card {
  position: relative; overflow: hidden; padding: clamp(28px, 6vw, 72px); background: var(--panel); border: 1px solid var(--gold-soft);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center;
}
.list-card .bg-enso { position: absolute; width: 520px; right: -160px; bottom: -200px; opacity: .14; pointer-events: none; }
.list-card .bg-enso path { fill: none; stroke: var(--red); stroke-width: 10; stroke-linecap: round; }
.list-card h2 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.list-card .intro { display: grid; gap: 14px; position: relative; }
.list-card .intro p { color: var(--muted); }
.promise { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; color: var(--cream); font-size: 1.04rem; }
.promise li::before { content: "◦"; color: var(--red); margin-right: 10px; }
form.signup { position: relative; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.field input[type=email] {
  width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; font-size: 1.1rem; color: var(--cream);
  background: var(--night); border: 1px solid var(--gold-soft); border-radius: 0; outline: none; -webkit-appearance: none; appearance: none;
}
.field input[type=email]:focus { border-color: var(--gold); }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .98rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--red); cursor: pointer; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: .9rem; color: var(--muted); }
.status { min-height: 1.5em; font-size: 1.02rem; }
.status.ok { color: var(--gold); }
.status.err { color: #e48a8d; }
.done { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--gold); background: rgba(214,182,126,.06); }
.done b { font-family: var(--display); font-size: 1.7rem; font-weight: 600; }
.soon { display: grid; gap: 12px; padding: 22px; border: 1px dashed var(--gold-soft); }
.soon b { font-family: var(--display); font-size: 1.6rem; font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--gold-soft); }
footer .wrap { padding-block: 28px 40px; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; color: var(--muted); font-size: 1rem; }
footer nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--cream); }

/* Privacy page */
.doc { max-width: 46rem; padding-block: clamp(48px, 8vw, 96px); }
.doc h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.7rem; margin: 2em 0 .4em; color: var(--gold); }
.doc p, .doc li { color: #d8cfbc; }
.doc p + p { margin-top: .8em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }

/* Motion */
html.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 900ms cubic-bezier(.2,.7,.2,1), transform 900ms cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d, 0) * 110ms); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .ink { clip-path: inset(0 0 100% 0); transition: clip-path 1500ms cubic-bezier(.65,0,.25,1); }
html.js .ink.in { clip-path: inset(0 0 0 0); }
html.js .enso path.draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.2s cubic-bezier(.6,0,.2,1) .5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.book-banner img { transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.book-banner a:hover img { transform: scale(1.015); }

/* Responsive */
@media (max-width: 900px) {
  .book-grid, .about, .list-card { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .journey::before { display: none; }
  .series { grid-template-columns: 1fr; }
  .vol { min-height: 0; }
  .portrait { justify-self: center; width: min(320px, 80%); }
}
@media (max-width: 720px) {
  body { font-size: 1.1rem; }
  .top .wrap { justify-content: center; text-align: center; }
  .top nav { justify-content: center; gap: 4px 16px; }
  .top nav a.cta { display: none; }
  .hero { min-height: 0; margin-top: -120px; padding-top: 120px; }
  .hero-art { width: 100%; opacity: .42; }
  .hero-art img { -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%); mask-image: linear-gradient(to bottom, #000 40%, transparent 100%); }
  .enso { right: -40px; width: 200px; }
  .btns .btn { flex: 1 1 100%; }
  .pair { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .facts > div:not(.btns) { grid-template-columns: 6.5rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.js .ink { clip-path: none !important; transition: none !important; }
  html.js .enso path.draw { animation: none; stroke-dashoffset: 0; }
  .btn::after { display: none; }
  #lanterns { display: none; }
}
