/* Look for the PURPLE: book site
   Mood taken from the cover: deep indigo night, a luminous lilac lotus,
   muted gold type. Display: Cormorant Garamond. Text: Newsreader. */

@font-face { font-family: "Cormorant Garamond"; src: url(assets/fonts/cormorant-garamond.woff) format("woff"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(assets/fonts/cormorant-garamond-italic.woff) format("woff"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(assets/fonts/newsreader.woff) format("woff"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(assets/fonts/newsreader-italic.woff) format("woff"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --night-950: #05071a;
  --night-900: #0a0c22;
  --night-800: #10112c;
  --night-700: #191a3d;

  --violet-500: #7d56b4;
  --violet-400: #9b72cf;
  --violet-300: #bb9ae3;
  --violet-200: #d8c6f0;

  --gold-400: #d7ba95;
  --gold-300: #e4cfae;

  --text: #e9e3f0;
  --text-soft: #b9b0cd;
  --text-dim: #8f86a6;
  --heading: #f8f4fb;
  --line: rgba(215, 186, 149, 0.3);

  --display: "Cormorant Garamond", Cormorant, Georgia, "Times New Roman", serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; background: var(--night-900); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0; font-family: var(--body); font-size: 1.1875rem; line-height: 1.7;
  color: var(--text); background: var(--night-900);
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.15em; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; color: var(--heading); text-wrap: balance; }

:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 20; background: #fff; color: #111; padding: 0.6rem 1rem; border-radius: 2px; }
.skip:focus { left: 0.5rem; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.col { max-width: 37rem; margin-inline: auto; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.9rem 1.6rem; border: 1px solid transparent; border-radius: 2px;
  font: 600 1rem/1.2 var(--body); letter-spacing: 0.03em; text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn--gold { background: var(--gold-400); color: #1a1226; }
.btn--gold:hover { background: var(--gold-300); }
.btn--line { border-color: var(--gold-400); color: var(--gold-300); }
.btn--line:hover { background: rgba(215, 186, 149, 0.12); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; margin-top: 2.25rem; }
.actions--center { justify-content: center; }
.quiet { color: var(--gold-300); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.quiet:hover { text-decoration-color: var(--gold-400); }

/* Ornament: hairlines with a four-point star, borrowed from the cover and logo */
.orn { display: flex; align-items: center; gap: 1.1rem; color: var(--gold-400); max-width: 17rem; margin: 0 auto 2rem; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.orn::after { transform: scaleX(-1); }
.orn svg { width: 15px; height: 15px; flex: none; }

/* Top: header + hero over the cover's twilight */
.top {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(52% 70% at 66% -8%, rgba(174, 115, 130, 0.5) 0%, rgba(174, 115, 130, 0) 70%),
    radial-gradient(60% 60% at 8% 35%, rgba(74, 51, 102, 0.6) 0%, rgba(74, 51, 102, 0) 72%),
    radial-gradient(45% 45% at 92% 92%, rgba(179, 102, 173, 0.2) 0%, rgba(179, 102, 173, 0) 70%),
    var(--night-900);
}

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; position: relative; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.01em; text-decoration: none; color: var(--heading); }
.site-nav ul { display: flex; align-items: center; gap: 0.5rem 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 1.02rem; }
.site-nav a:not(.btn) { color: var(--text-soft); }
.site-nav a:not(.btn):hover { color: var(--heading); }
.site-nav .btn { padding: 0.6rem 1.2rem; font-size: 0.95rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--gold-300); border-radius: 2px; padding: 0.5rem 0.9rem; font: 600 0.95rem var(--body); cursor: pointer; }

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 10; background: var(--night-800); border: 1px solid var(--line); padding: 1.25rem 1.5rem 1.5rem; border-radius: 2px; }
  .js .site-nav[data-open] { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  html:not(.js) .site-header .wrap { flex-direction: column; align-items: flex-start; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; flex-direction: row; gap: 0.5rem 1.25rem; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6.5rem); }
.hero .wrap { display: grid; gap: 3.5rem 4rem; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

.lockup { line-height: 0.9; font-weight: 500; }
.lk-look { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(5.2rem, 11.5vw, 8.6rem); color: var(--heading); letter-spacing: -0.012em; }
.lk-for { display: block; font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(2.7rem, 5.8vw, 4.3rem); color: var(--heading); margin: 0.02em 0 0 1.1em; line-height: 1; }
.lk-purple {
  display: block; font-family: var(--display); font-weight: 500; letter-spacing: 0.015em;
  font-size: clamp(4.5rem, 10.6vw, 8.1rem); padding-bottom: 0.06em;
  color: var(--violet-300);
  background: linear-gradient(180deg, #d0b4f3 0%, #a67bd6 55%, #835bb8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.25; color: var(--text); margin: 2rem 0 1rem; max-width: 24ch; }
.byline { margin: 0 0 1.5rem; font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: 0.02em; color: var(--gold-400); }
.byline small { display: block; margin-top: 0.15rem; font-size: 0.95rem; letter-spacing: 0.18em; font-variant-caps: all-small-caps; color: var(--text-soft); font-weight: 500; }
.lede { max-width: 32rem; margin: 0; color: var(--text-soft); }

.cover-wrap { justify-self: center; animation: rise 1.1s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cover-img {
  display: block; width: min(340px, 72vw); height: auto; border-radius: 2px;
  box-shadow: 0 44px 80px -30px rgba(0, 0, 0, 0.85), 0 0 130px -10px rgba(155, 114, 207, 0.38);
}

/* Sections */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section--alt { background: var(--night-800); }
.h-xl { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -0.005em; }
.h-lg { font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.08; }

.lens h2 { max-width: 20ch; margin: 0 auto 2.25rem; }

.pivot {
  background:
    radial-gradient(60% 90% at 50% 105%, rgba(155, 114, 207, 0.3) 0%, rgba(155, 114, 207, 0) 70%),
    var(--night-900);
}
.pivot h2 { font-style: italic; font-weight: 400; font-size: clamp(2.4rem, 6.2vw, 4.6rem); line-height: 1.04; max-width: 21ch; margin: 0 auto 1.75rem; }
.pivot p { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-style: italic; color: var(--text-soft); margin: 0; }

.two-col { display: grid; gap: 2rem 5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.two-col .prose p:last-child { margin-bottom: 0; }

/* PURPLE spelled out, one letter per line: the memorable element */
.acrostic { list-style: none; margin: 3rem 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.acrostic li {
  font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 11.5vw, 7.6rem);
  line-height: 1; padding: 0.1em 0 0.14em; border-top: 1px solid var(--line); color: var(--heading);
}
.acrostic b {
  display: inline-block; font-weight: 500; padding-right: 0.01em;
  background: linear-gradient(180deg, #e2d3f6 0%, #a67bd6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(155, 114, 207, 0.55));
}
.purple-line { margin: 2.25rem 0 0; max-width: 40rem; color: var(--text); font-size: 1.25rem; }

.fear-real { display: grid; gap: 2.5rem 4rem; margin-top: 4.5rem; }
@media (min-width: 760px) { .fear-real { grid-template-columns: 1fr 1fr; } }
.fear-real h3 { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 500; line-height: 1; margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.fear-real p { margin: 0; font-style: italic; font-size: 1.3rem; }
.fear h3 { color: var(--text-dim); }
.fear p { color: var(--text-dim); }
.real h3 { color: var(--violet-200); text-shadow: 0 0 28px rgba(155, 114, 207, 0.6); }
.real p { color: var(--text); }
.fear-real-intro { margin-top: 4.5rem; max-width: 36rem; font-size: 1.25rem; }

/* Author */
.author { display: grid; gap: 3rem 5.5rem; align-items: center; }
@media (min-width: 900px) { .author { grid-template-columns: 340px minmax(0, 1fr); } }
.portrait { margin: 0; justify-self: center; }
.portrait img { display: block; width: min(340px, 72vw); height: auto; border-radius: 2px; outline: 1px solid var(--line); outline-offset: 10px; box-shadow: 0 36px 70px -32px rgba(0, 0, 0, 0.85); }
.author .prose p:last-child { margin-bottom: 0; }

/* Quote */
.quote { margin: 0; }
.quote p { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.22; color: var(--gold-300); max-width: 28ch; margin: 0 auto 1.75rem; text-wrap: balance; }
.quote footer { font-family: var(--display); font-weight: 500; font-size: 1.25rem; letter-spacing: 0.04em; color: var(--text-soft); }

/* Giving back */
.give-back { border: 1px solid var(--line); background: rgba(25, 26, 61, 0.55); padding: clamp(1.75rem, 5vw, 3.75rem); }
.fine { font-size: 0.98rem; color: var(--text-soft); max-width: 40rem; }
.fine:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--night-950); color: var(--text-soft); padding-block: 3.25rem; font-size: 1rem; }
.site-footer .wrap { display: grid; gap: 2rem 3rem; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 1.3fr 1fr; } }
.site-footer .brand { display: inline-block; margin-bottom: 0.5rem; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.site-footer a:hover { color: var(--heading); }
.site-footer small { display: block; margin-top: 1.25rem; font-size: 0.92rem; color: var(--text-dim); }
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400), transparent); opacity: 0.5; }

/* Header: fixed to the top, tucks away on scroll down, returns on scroll up (see main.js).
   Without JavaScript it simply scrolls with the page. */
html { scroll-padding-top: calc(var(--header-h, 5.4rem) + 0.5rem); }
.js .top { z-index: 60; padding-top: var(--header-h, 5.4rem); }
.js .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: transform 0.3s ease, background-color 0.25s ease, box-shadow 0.25s ease; }
.js .site-header.is-scrolled { background: rgba(10, 12, 34, 0.96); box-shadow: 0 1px 0 var(--line), 0 14px 30px -24px rgba(0, 0, 0, 0.8); }
@supports (backdrop-filter: blur(8px)) {
  .js .site-header.is-scrolled { background: rgba(10, 12, 34, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.js .site-header.is-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .js .site-header { transition: none; } }
