:root {
  --bg: #0a0c0f;
  --bg-soft: #11151a;
  --ink: #f3ede4;
  --ink-soft: #b8b0a4;
  --ink-faint: #6f6a61;
  --gold: #c9a76a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  /* Rich dawn-ocean gradient — stands alone, or sits under the hero photo */
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(201, 167, 106, 0.22), transparent 55%),
    linear-gradient(180deg, #1a2026 0%, #11151a 45%, #0a0c0f 100%);
  background-size: cover;
  background-position: center;
}

/* When the generated hero image exists, drop it in via this class on <body> or .hero */
.hero[data-image] {
  background-image:
    linear-gradient(180deg, rgba(10,12,15,0.35) 0%, rgba(10,12,15,0.55) 55%, var(--bg) 100%),
    var(--hero-image);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 50% 45%, transparent 30%, rgba(10, 12, 15, 0.6) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  padding: 2rem 1.5rem;
  max-width: 40rem;
  animation: rise 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__mark {
  display: block;
  margin: 0 auto 1.8rem;
  width: clamp(58px, 9vw, 80px);
  height: auto;
}

.hero__kicker {
  font-size: clamp(0.7rem, 2vw, 0.82rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.6rem;
  text-shadow: 0 1px 14px rgba(10, 12, 15, 0.85), 0 0 2px rgba(10, 12, 15, 0.6);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero__sub {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
}

.hero__cta {
  margin-top: 2.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(var(--ink-faint), transparent);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--gold);
  animation: cue 2.4s ease-in-out infinite;
}

/* ---------- QUOTES ---------- */
.quotes {
  background: var(--bg);
  padding: 5rem 0;
}
.quotes__viewport {
  height: 60vh;
  max-height: 620px;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 11%, #000 89%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 11%, #000 89%, transparent);
}
.quotes__track {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  animation: drift 64s linear infinite;
  padding: 2rem 0;
}
.quotes__viewport:hover .quotes__track { animation-play-state: paused; }

.quote {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.quote span {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  line-height: 1.3;
  color: var(--ink);
}
.quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
/* Gentle ring divider between quotes — an echo of the ensō mark,
   so author-less quotes don't bleed into one another. */
.quote::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 3.2rem auto 0;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: 0.72;
}

/* ---------- STORY ---------- */
.story {
  background: var(--bg);
  padding: 7rem 1.5rem;
}
.story__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.story__portrait {
  margin: 0;
}
.story__portrait img {
  display: block;
  width: 100%;
  height: auto;
  /* Feather the edges so the figure floats out of the dark rather than sitting in a box */
  -webkit-mask-image: radial-gradient(115% 115% at 55% 45%, #000 58%, transparent 100%);
  mask-image: radial-gradient(115% 115% at 55% 45%, #000 58%, transparent 100%);
}
.story__kicker {
  font-size: clamp(0.7rem, 2vw, 0.82rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.story__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.7rem;
}
.story__body p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.85;
  margin-bottom: 1.1rem;
  max-width: 34rem;
}
.story__sign {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink) !important;
  margin-top: 1.8rem;
}

@media (max-width: 720px) {
  .story { padding: 5rem 1.5rem; }
  .story__inner {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    text-align: center;
  }
  .story__portrait {
    max-width: 20rem;
    margin: 0 auto;
  }
  .story__body p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- DEDICATION ---------- */
.dedication {
  background: var(--bg);
  padding: 1rem 1.5rem 6.5rem;
  text-align: center;
}
.dedication__rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: 0 auto 2.4rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.dedication__body {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 30rem;
  margin: 0 auto 1.1rem;
}
.dedication__sign {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}

/* ---------- SIGN-OFF ---------- */
.signoff {
  padding: 7rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.signoff p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.7;
}
.signoff__last {
  color: var(--ink) !important;
  margin-top: 0.6rem;
  font-style: italic;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-soft);
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer__mark {
  display: block;
  width: 44px;
  height: auto;
  margin: 0 auto 1.6rem;
  opacity: 0.85;
}
.footer__care {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.footer__lines {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.9;
  max-width: 34rem;
  margin: 0 auto;
}
.footer__lines strong { color: var(--ink); font-weight: 500; }
.footer__au { color: var(--ink-faint); }
.footer__meta {
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.footer__meta a { color: var(--gold); text-decoration: none; }
.footer__meta a:hover { text-decoration: underline; }

/* ---------- MOTION ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(320%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__inner { animation: none; }
  .quotes__track { animation: none; }
  .quotes__viewport {
    height: auto;
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .scroll-cue { display: none; }
}
