/* Layout: dusk falling into night. A sunset opens every page and fades into a starfield,
   then everything sits in one book-width column, with line-art symbols as the way around. */
:root {
  --ink: #0f0c12;
  --night: #19141e;
  --dusk: #2a2030;
  --bone: #ede6dc;
  --mist: #ab9fb0;
  --accent: #d4ad62;
  --ember: #ee9a9a;
  --line: rgb(237 230 220 / 0.14);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Spectral", "Iowan Old Style", Georgia, serif;
  --label: "Cinzel", "Trajan Pro", Georgia, serif;

  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.3vw, 2.3rem);
  --step-3: clamp(2.3rem, 1.7rem + 2.8vw, 3.8rem);
  --step-4: clamp(2.9rem, 2rem + 4.4vw, 5.4rem);
  --measure: 65ch;
  --wide: 68rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body, .home, .post {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
em { font-style: italic; }
strong { font-weight: 600; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.icon-lg { width: 2.6rem; height: 2.6rem; color: var(--accent); }
.icon-xl { width: 5rem; height: 5rem; }
.starfield { position: fixed; top: 0; left: 0; width: 100%; height: 100lvh; z-index: -1; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bone); color: var(--ink); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: var(--gutter-l); }

.eyebrow {
  display: flex; align-items: center; gap: 0.5em;
  font-family: var(--label); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mist);
}
.eyebrow a { color: inherit; text-decoration: none; display: inline-flex; gap: 0.5em; align-items: center; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--bone); }
.small { font-size: 0.85rem; color: var(--mist); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: rgb(15 12 18 / 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.header-inner {
  max-width: var(--wide); margin: 0 auto; padding-block: 0.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--bone); }
.brand img { width: 56px; height: 56px; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: 0.01em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.25rem, 1.5vw, 1.25rem); }
.site-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.35rem 0.4rem; text-decoration: none; color: var(--mist);
  font-family: var(--label); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.2s ease;
}
.site-nav .icon { width: 1.5rem; height: 1.5rem; transition: transform 0.3s ease, color 0.2s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--bone); }
.site-nav a:hover .icon, .site-nav a[aria-current="page"] .icon { color: var(--accent); transform: translateY(-2px); }
@media (max-width: 40rem) {
  .header-inner { justify-content: center; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; }
  .site-header { position: relative; top: 0; background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-nav a { font-size: 0.7rem; letter-spacing: 0.06em; min-height: 44px; padding-inline: 0.25rem; }
  html { scroll-padding-top: 1rem; }
}

.mock-banner {
  margin: 0; text-align: center; font-size: 0.85rem; color: var(--ink); background: var(--accent);
  padding-block: 0.4rem; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; object-position: 60% 40%; z-index: -2; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 84%); mask-image: linear-gradient(180deg, #000 45%, transparent 84%); will-change: transform, opacity; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(15 12 18 / 0.88) 0%, rgb(15 12 18 / 0.7) 35%, rgb(15 12 18 / 0.2) 70%, rgb(15 12 18 / 0) 100%),
    linear-gradient(180deg, rgb(15 12 18 / 0.25) 0%, rgb(15 12 18 / 0) 45%, rgb(15 12 18 / 0.5) 80%, rgb(15 12 18 / 0) 100%);
}
@media (max-width: 40rem) {
  .hero::after { background: linear-gradient(180deg, rgb(15 12 18 / 0.55) 0%, rgb(15 12 18 / 0.7) 60%, rgb(15 12 18 / 0) 100%); }
}
.hero-inner {
  max-width: var(--wide); margin: 0 auto;
  padding-block: clamp(2rem, 9vw, 7rem) clamp(2.5rem, 10vw, 8rem);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
}
.hero-logo { width: clamp(104px, 14vw, 160px); filter: drop-shadow(0 6px 30px rgb(0 0 0 / 0.6)); }
@media (max-width: 40rem) { .hero-logo { display: none; } }
.hero .eyebrow { color: var(--bone); }
.hero h1 { font-size: var(--step-4); text-shadow: 0 2px 24px rgb(15 12 18 / 0.8); }
.hero-tagline { font-family: var(--display); font-weight: 500; font-style: italic; font-size: var(--step-1); max-width: 32ch; line-height: 1.4; text-shadow: 0 1px 12px rgb(15 12 18 / 0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise 0.9s ease both; }
  .hero-inner > :nth-child(2) { animation-delay: 0.1s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.2s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.3s; }
  .hero-inner > :nth-child(5) { animation-delay: 0.4s; }
  @keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
}

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--label); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.85em 1.4em; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.button-ghost { background: rgb(15 12 18 / 0.65); color: var(--bone); border-color: rgb(237 230 220 / 0.5); }
.button-ghost:hover { background: var(--bone); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; font-family: var(--label); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.text-link .icon { transition: transform 0.2s ease; }
.text-link:hover .icon { transform: translateX(3px); }

/* Sections */
.band { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.band-inner { max-width: var(--wide); margin: 0 auto; padding-block: clamp(2.5rem, 6vw, 4.5rem); display: flex; flex-direction: column; gap: 1.25rem; }
.band-inner > p, .band-inner .prose, .feature-text p, .split p, .about-teaser p { max-width: var(--measure); }
.page-head { position: relative; isolation: isolate; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(15 12 18 / 0.8) 0%, rgb(15 12 18 / 0.45) 50%, rgb(15 12 18 / 0.1) 100%),
    url("/assets/img/sunset-1200.jpg") 60% 45% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
@media (min-width: 75rem) { .page-head::before { background-image: linear-gradient(90deg, rgb(15 12 18 / 0.8) 0%, rgb(15 12 18 / 0.45) 50%, rgb(15 12 18 / 0.1) 100%), url("/assets/img/sunset-2400.jpg"); } }
.page-head h1, .page-head .lede { text-shadow: 0 1px 14px rgb(15 12 18 / 0.9); }
.page-head .band-inner { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3rem, 7vw, 5rem); }
.section-head { display: flex; flex-direction: column; gap: 0.6rem; }

.divider { display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: 24rem; margin: 0 auto; color: var(--accent); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.divider span:last-child { background: linear-gradient(90deg, var(--line), transparent); }
.divider svg { width: 1.1rem; height: 1.1rem; fill: currentColor; opacity: 0.8; }

.feature { flex-direction: row; align-items: center; gap: clamp(1.5rem, 5vw, 4rem); }
.feature-cover { flex: none; width: clamp(8rem, 16vw, 11rem); text-decoration: none; transition: transform 0.25s ease; }
.feature-cover .book-cover { padding: 0.9rem 0.5rem 1rem; }
.feature-cover .book-cover-author { font-size: 0.5rem; letter-spacing: 0.2em; }
.feature-cover .book-cover-title { font-size: 1.5rem; }
.feature-cover .book-cover::after { box-shadow: inset 0 0 0 5px rgb(15 12 18 / 0.35), inset 0 0 0 6px rgb(212 173 98 / 0.45); }
.feature-cover:hover { transform: translateY(-3px) rotate(-1deg); }
.feature-text { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.feature h2 { font-size: var(--step-3); }
@media (max-width: 40rem) { .feature { flex-direction: column; align-items: flex-start; } .feature-cover { width: 8rem; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split > div { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 48rem) { .split { grid-template-columns: minmax(0, 1fr); } }

.about-teaser, .about-page { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.about-page { align-items: start; }
.about-teaser > div { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 48rem) { .about-teaser, .about-page { grid-template-columns: minmax(0, 1fr); } .portrait { max-width: 22rem; } }
.portrait { margin: 0; }
.portrait img {
  border-radius: 999px 999px 6px 6px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  filter: saturate(0.85) contrast(1.03);
  box-shadow: 0 0 0 1px var(--line), 0 0 0 10px var(--ink), 0 0 0 11px rgb(212 173 98 / 0.3);
}

.prose { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin-top: 0.75rem; }

/* Blog */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.post-card a {
  display: flex; flex-direction: column; gap: 0.6rem; height: 100%;
  padding: 1.5rem; border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--bone); background: var(--night);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-card p:last-child { color: var(--mist); font-size: 0.98rem; }
.post-list-full { grid-template-columns: minmax(0, 1fr); max-width: var(--measure); }
.post-list-full h2 { font-size: var(--step-1); }
.post-meta { font-family: var(--label); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.article { max-width: 46rem; }
.article h1 { font-size: var(--step-3); }
.post-image { border-radius: 4px; margin-block: 0.5rem; }

/* Books */
.book { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
@media (max-width: 48rem) { .book { grid-template-columns: minmax(0, 1fr); } }
.book-figure { margin: 0; max-width: 20rem; width: 100%; display: flex; flex-direction: column; gap: 0.6rem; }
.book-figure figcaption { font-size: 0.8rem; color: var(--mist); }
.book-cover {
  position: relative; isolation: isolate; aspect-ratio: 2 / 3; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 2rem 1rem 2.25rem; border-radius: 3px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.55), 0 0 0 1px var(--line);
}
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.book-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(15 12 18 / 0.5) 0%, transparent 22%, transparent 62%, rgb(15 12 18 / 0.85) 100%);
  box-shadow: inset 0 0 0 10px rgb(15 12 18 / 0.35), inset 0 0 0 11px rgb(212 173 98 / 0.45);
}
.book-cover-author { font-family: var(--label); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--bone); }
.book-cover-title { font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(2.2rem, 2rem + 1vw, 2.8rem); line-height: 1; color: var(--accent); text-shadow: 0 2px 18px rgb(0 0 0 / 0.8); }
.facts { margin: 0.5rem 0; display: grid; gap: 0.6rem; }
.facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.facts dt { font-family: var(--label); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); padding-top: 0.2rem; }
.facts dd { margin: 0; }

/* Contact */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.cards-single { grid-template-columns: minmax(0, 42rem); }
.card { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 4px; background: var(--night); min-width: 0; }
.card .button { margin-top: auto; }
.ticks { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ticks li::marker { color: var(--accent); }
.ticks strong { color: var(--accent); }
.card-email { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 1rem; border-top: 1px solid var(--line); width: 100%; }
.card-email > p:first-child { font-size: 0.9rem; color: var(--mist); }
.card-email .email-address { font-size: var(--step-0); }
@media (max-width: 30rem) { .button { letter-spacing: 0.08em; padding-inline: 1.1em; } }
.email-line { padding-block: 0 clamp(2.5rem, 6vw, 4.5rem); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.email-line > p:first-child { font-family: var(--label); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mist); }
.email-address { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: var(--step-1); user-select: all; overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; gap: 0.4em; font: inherit; font-family: var(--label); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone); background: transparent; border: 1px solid rgb(237 230 220 / 0.35); border-radius: 999px; padding: 0.45em 0.9em; min-height: 44px; cursor: pointer; user-select: none; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.social-list a { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--bone); padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.social-list .icon { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.social-list .handle { margin-left: auto; color: var(--mist); font-size: 0.95rem; }

/* Newsletter */
.newsletter { background: radial-gradient(ellipse at 50% 0%, rgb(42 32 48 / 0.85), rgb(15 12 18 / 0) 70%); border-top: 1px solid var(--line); }
.newsletter-intro { max-width: 46ch; color: var(--mist); }
.newsletter-intro em { display: block; font-family: var(--display); font-size: var(--step-1); font-weight: 500; color: var(--bone); margin-bottom: 0.35rem; }
.newsletter-inner { align-items: center; text-align: center; padding-block: clamp(3rem, 8vw, 5.5rem); }
.newsletter-inner .newsletter-pitch { max-width: 44ch; }
.signup { width: 100%; max-width: 34rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.75rem; text-align: left; margin-top: 0.5rem; }
.signup .button { grid-column: 1 / -1; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field label { font-family: var(--label); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.optional { text-transform: none; letter-spacing: 0; font-family: var(--body); }
.field input { font: inherit; font-weight: 400; color: var(--bone); background: var(--night); border: 1px solid rgb(237 230 220 / 0.45); border-radius: 4px; padding: 0.7rem 0.85rem; width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(212 173 98 / 0.25); }
.field input[aria-invalid="true"] { border-color: var(--ember); }
.consent { grid-column: 1 / -1; font-size: 0.85rem; line-height: 1.55; color: var(--mist); }
.form-status:empty { display: none; }
.form-status { grid-column: 1 / -1; font-size: 0.95rem; color: var(--bone); padding: 0.75rem 1rem; border: 1px solid var(--accent); border-radius: 4px; }
.form-status.error { border-color: var(--ember); }
@media (max-width: 30rem) { .signup { grid-template-columns: minmax(0, 1fr); } }

.placeholder-note {
  font-size: 0.92rem; line-height: 1.5; color: var(--ink); background: var(--ember);
  padding: 0.6rem 0.85rem; border-radius: 4px; max-width: var(--measure);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding-block: 3rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-logo { width: 72px; height: 72px; }
.footer-name { font-family: var(--display); font-weight: 600; font-size: var(--step-1); }
.credit { font-size: 0.75rem; color: var(--mist); opacity: 0.8; }
.credit a { color: inherit; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.social a { color: var(--mist); display: flex; padding: 0.6rem; }
.social a:hover { color: var(--accent); }
.social .icon { width: 1.6rem; height: 1.6rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.75rem; font-family: var(--label); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-links a { color: var(--mist); text-decoration: none; display: inline-block; padding: 0.7rem 0.35rem; }
.footer-links a:hover { color: var(--bone); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.prose .button, .split .button { align-self: flex-start; }
