/* Robert S. Maiden — homepage concept by Astra Productions
   The same rose, in the same hand, passed from Her to Them to Me. */

@font-face { font-family: "Arizonia"; src: url("assets/fonts/arizonia-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/literata-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Literata"; src: url("assets/fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --storm: #121A20;
  --storm-2: #1A262F;
  --mist: #A9B5BC;
  --bone: #F1EBE1;
  --rose: #A3131D;
  --rose-deep: #85101A;
  --rose-lite: #E0575E;
  --sepia: #CDBEA6;
  --ink: #1F1A15;
  --ink-soft: #4A3F33;
  --night: #07080A;
  --paper: #EFE7DA;
  --amber: #E89A3C;
  --amber-ink: #8A4A0E;

  --script: "Arizonia", "Brush Script MT", cursive;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4.5vw, 64px);
  --ease: cubic-bezier(.65, 0, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--storm);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
cite { font-style: italic; }
:focus-visible { outline: 2px solid var(--rose-lite); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 30;
  background: var(--bone); color: var(--ink); padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: .5rem; }

.concept-banner {
  margin: 0; padding: .45rem var(--gutter);
  background: var(--night); color: #B9C3C9;
  font-size: .8125rem; text-align: center; letter-spacing: .01em;
}

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 2rem; padding: 1rem var(--gutter);
  background: var(--storm);
}
.logotype {
  font-family: var(--caps); font-weight: 600; font-size: 1.15rem; letter-spacing: .04em;
  text-decoration: none; margin: 0;
}
a.logotype { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.8rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--mist); font-size: .98rem;
}
.site-nav a:hover { color: var(--bone); }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; min-height: 50px;
  padding: .75rem 1.6rem; border-radius: 2px;
  background: var(--rose); color: var(--bone);
  font-weight: 600; font-size: 1rem; text-decoration: none; letter-spacing: .01em;
  box-shadow: 0 10px 30px -12px rgba(163, 19, 29, .8);
  transition: background-color .25s;
}
.button:hover { background: var(--rose-deep); }

/* ---------- The saga: one sticky stage, three parts ---------- */
.saga {
  --bg: var(--storm); --fg: var(--bone); --fg-soft: var(--mist); --accent: var(--rose-lite);
  position: relative;
  background: var(--bg); color: var(--fg);
  transition: background-color 1s var(--ease), color 1s var(--ease);
}
.saga[data-step="them"] { --bg: var(--sepia); --fg: var(--ink); --fg-soft: var(--ink-soft); --accent: var(--rose-deep); }
.saga[data-step="me"]   { --bg: var(--night); }

.stage { display: none; }

.step { padding: 4rem var(--gutter); }
.step__body { max-width: 34rem; }
.step p { color: var(--fg-soft); transition: color 1s var(--ease); }
.step h2 {
  margin: 0 0 1rem; font-weight: 500; color: var(--fg);
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; letter-spacing: -.01em;
}

.title {
  margin: 0 0 1.4rem; font-family: var(--script); font-weight: 400;
  font-size: clamp(3.6rem, 7.4vw, 7rem); line-height: .98;
  color: var(--bone);
}
.title span { display: block; }
.title span:nth-child(2) { padding-left: .55em; }
.title span:nth-child(3) { padding-left: 1.1em; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; margin: 0 0 2rem; max-width: 31rem; }
.step--intro .lede { color: var(--bone); }

.part {
  display: flex; align-items: baseline; gap: .8rem;
  margin: 0 0 1.1rem; font-size: .98rem; font-style: italic;
}
.numeral {
  font-family: var(--caps); font-style: normal; font-weight: 600; font-size: 1.7rem; line-height: 1;
  color: var(--accent); transition: color 1s var(--ease);
}
.question {
  margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(169, 181, 188, .3);
  font-size: 1.3rem; line-height: 1.45; font-style: italic;
}
.step .question { color: var(--fg); }

.excerpt {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.3rem;
  border-left: 2px solid var(--accent); transition: border-color 1s var(--ease);
}
.excerpt p { margin: 0; font-style: italic; font-size: 1.12rem; line-height: 1.55; }
.step .excerpt p { color: var(--fg); }
.excerpt .excerpt__gap { margin-top: .9rem; }
.excerpt footer { margin-top: .7rem; font-size: .9rem; color: var(--fg-soft); }

.script { font-family: var(--script); font-weight: 400; font-size: 1.9em; line-height: 1; letter-spacing: 0; }
.step--me h2 { margin-bottom: 1.4rem; }

.inline-cover { width: min(100%, 300px); margin-bottom: 2rem; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }

/* Enhanced experience (JavaScript on) */
.js .inline-cover { display: none; }
.js .stage { display: flex; }

.stage__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0);
  transition: box-shadow 1.2s var(--ease);
}
.saga[data-step="her"] .stage__frame,
.saga[data-step="them"] .stage__frame { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75); }

.stage__art {
  position: absolute; inset: -1.5%;
  transform-origin: 47.2% 14.7%;
  transition: transform 1.5s var(--ease);
  will-change: transform;
}
.saga[data-step="intro"] .stage__art,
.saga[data-step="me"] .stage__art { transform: translate(2.8%, 16%) scale(2.1); }

.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art--them {
  transform: translate(-1.246%, .816%);   /* measured: puts the rose exactly over All for Her's rose */
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.saga[data-step="them"] .art--them,
.saga[data-step="me"] .art--them { opacity: 1; }

.vig { position: absolute; inset: -2px; pointer-events: none; opacity: 0; transition: opacity 1.3s var(--ease); }
.vig--storm {
  background:
    radial-gradient(ellipse 60% 40% at 50% 31%, rgba(18, 26, 32, 0) 40%, rgba(18, 26, 32, .6) 66%, var(--storm) 88%),
    linear-gradient(to bottom, var(--storm) 0%, rgba(18, 26, 32, 0) 9%, rgba(18, 26, 32, 0) 62%, var(--storm) 82%),
    linear-gradient(to right, var(--storm) 0%, rgba(18, 26, 32, 0) 10%, rgba(18, 26, 32, 0) 90%, var(--storm) 100%);
}
.vig--night {
  background:
    radial-gradient(ellipse 52% 36% at 50% 31%, rgba(7, 8, 10, .3) 25%, rgba(7, 8, 10, .82) 58%, var(--night) 82%),
    linear-gradient(to bottom, var(--night) 0%, rgba(7, 8, 10, 0) 10%);
}
.saga[data-step="intro"] .vig--storm { opacity: 1; }
.saga[data-step="me"] .vig--night { opacity: 1; }

@media (min-width: 900px) {
  .js .saga { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .js .stage {
    grid-column: 2; grid-row: 1; align-self: start;
    position: sticky; top: 0; height: 100vh; height: 100svh;
    align-items: center; justify-content: center; padding: 4vh var(--gutter) 4vh 0;
  }
  .js .stage__frame { height: min(84svh, 800px); }
  .js .steps { grid-column: 1; grid-row: 1; }
  .js .step {
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 10vh clamp(2rem, 5vw, 5rem) 10vh var(--gutter);
  }
  .js .step--intro { min-height: calc(100svh - 120px); padding-top: 4vh; }
}

@media (max-width: 899px) {
  .js .saga { display: block; }
  .js .stage {
    position: sticky; top: 0; z-index: 3;
    height: 46vh; height: 46svh; padding: 2svh 0;
    justify-content: center; align-items: center;
    background: var(--bg); transition: background-color 1s var(--ease);
  }
  .js .stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -28px; height: 28px;
    background: linear-gradient(var(--bg), color-mix(in srgb, var(--bg) 0%, transparent));
    transition: background 1s var(--ease);
  }
  .js .stage__frame { height: 100%; }
  .saga[data-step="intro"] .stage__art,
  .saga[data-step="me"] .stage__art { transform: translate(2.8%, 22%) scale(2.6); }
  .vig--night {
    background:
      radial-gradient(ellipse 62% 38% at 50% 37%, rgba(7, 8, 10, .3) 30%, rgba(7, 8, 10, .82) 62%, var(--night) 86%),
      linear-gradient(to bottom, var(--night) 0%, rgba(7, 8, 10, 0) 10%, rgba(7, 8, 10, 0) 66%, var(--night) 86%);
  }
  .saga[data-step="her"] .stage__frame,
  .saga[data-step="them"] .stage__frame { box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .7); }
  .vig--storm {
    background:
      radial-gradient(ellipse 66% 40% at 50% 37%, rgba(18, 26, 32, 0) 46%, rgba(18, 26, 32, .6) 70%, var(--storm) 90%),
      linear-gradient(to bottom, var(--storm) 0%, rgba(18, 26, 32, 0) 10%, rgba(18, 26, 32, 0) 66%, var(--storm) 86%),
      linear-gradient(to right, var(--storm) 0%, rgba(18, 26, 32, 0) 6%, rgba(18, 26, 32, 0) 94%, var(--storm) 100%);
  }
  .js .step { min-height: 62svh; padding: 2.4rem var(--gutter) 3.2rem; }
  .js .step--intro { min-height: 0; padding-top: 1.2rem; padding-bottom: 4rem; }
  .js .step--me { min-height: 56svh; }
  .title { font-size: clamp(2.7rem, 12.6vw, 4rem); margin-bottom: .9rem; }
  .step--intro .lede { font-size: 1.05rem; }
  .step h2 { font-size: clamp(1.75rem, 7.6vw, 2.2rem); }
  .lede { margin-bottom: 1.6rem; }
}

/* ---------- Readers ---------- */
.readers {
  background: var(--night); color: var(--bone);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}
.readers__quote { margin: 0 auto; max-width: 52rem; }
.readers__quote blockquote { margin: 0; }
.readers__quote blockquote p {
  margin: 0; font-style: italic; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.3; letter-spacing: -.005em;
}
.readers__quote figcaption { margin-top: 1.2rem; color: var(--mist); font-size: .98rem; }
.readers__note { max-width: 52rem; margin: 2.2rem auto 0; color: var(--mist); }

/* ---------- It's a Puzzle ---------- */
.puzzle {
  position: relative; overflow: hidden;
  background: var(--night); color: #EDEDED;
  padding: clamp(5rem, 11vw, 8rem) var(--gutter);
}
.puzzle__head { max-width: 40rem; margin: 0 auto clamp(3rem, 6vw, 4.5rem); text-align: center; }
.puzzle h2 {
  margin: 0; font-family: var(--text); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05;
}
.puzzle__meta { margin: .5rem 0 1.2rem; font-style: italic; color: #A8A8B0; }
.puzzle__head p:last-child { color: #C9C9CF; margin: 0; }

.constellation { position: relative; max-width: 1180px; margin: 0 auto; }
.puzzle__cover { margin: 0; }
.puzzle__cover img { box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); }

.moments { list-style: none; margin: 0; padding: 0; }
.moment {
  --glow: #fff;
  position: relative; isolation: isolate;
  padding: 1.4rem 1.4rem 1.5rem;
  background: rgba(14, 14, 18, .82);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 3px;
}
.moment::before {
  content: ""; position: absolute; z-index: -1; inset: -30% -20%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 34%, transparent), transparent);
  filter: blur(18px); pointer-events: none;
}
.moment__no { display: block; margin-bottom: .4rem; font-style: italic; font-size: .95rem; color: var(--glow); }
.moment p { margin: 0; color: #DCDCE0; font-size: 1.02rem; line-height: 1.6; }
.moment--red    { --glow: #E5484D; }
.moment--yellow { --glow: #F3C33B; }
.moment--green  { --glow: #3DBE7A; }
.moment--blue   { --glow: #5B93F2; }
.moment--white  { --glow: #EDEDED; }

@media (min-width: 1000px) {
  .moments {
    display: grid; gap: 2.2rem 0;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 360px) minmax(0, 1fr);
    grid-template-areas: "a . b" "c . d" ". e .";
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
  .moment--red { grid-area: a; } .moment--yellow { grid-area: b; }
  .moment--green { grid-area: c; } .moment--blue { grid-area: d; }
  .moment--white { grid-area: e; }
  .moment--red, .moment--green { margin-right: 0; }
  .puzzle__cover {
    position: absolute; z-index: 1; left: 50%; top: 0;
    width: clamp(260px, 26vw, 320px); transform: translateX(-50%);
  }
  .moment--white { margin-top: clamp(4rem, 8vw, 7rem); }
}
@media (max-width: 999px) {
  .puzzle__cover { width: min(64vw, 280px); margin: 0 auto 3rem; }
  .moments { display: grid; gap: 1.6rem; max-width: 34rem; margin: 0 auto; }
}

/* ---------- About ---------- */
.about {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #F4EEE4 0%, var(--paper) 45%, #E8DCC6 100%); color: var(--ink);
  padding: clamp(5rem, 11vw, 8.5rem) var(--gutter);
}
.about__inner {
  position: relative; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
.about h2 {
  margin: 0; padding-top: 1.4rem; border-top: 3px solid var(--rose); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08;
}
.about__body p { margin: 0 0 1.1rem; color: var(--ink-soft); max-width: 35rem; }
.about__body p:first-child { color: var(--ink); font-size: 1.2rem; line-height: 1.6; }
.about__body p:last-child { margin-bottom: 0; }
@media (max-width: 899px) { .about__inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Books ---------- */
.books {
  position: relative; text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(163, 19, 29, .22), transparent 70%), var(--storm);
  padding: clamp(5rem, 11vw, 8rem) var(--gutter) clamp(5rem, 10vw, 7rem);
}
.books h2 {
  margin: 0 auto 1.2rem; max-width: 50rem; font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1;
}
.books__intro { max-width: 38rem; margin: 0 auto 3.2rem; color: var(--mist); }
.shelf {
  list-style: none; margin: 0 auto 3.4rem; padding: 0;
  display: flex; justify-content: center; gap: clamp(1rem, 3.5vw, 3rem);
}
.shelf li { width: clamp(92px, 24vw, 220px); }
.shelf img { width: 100%; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .85); }
.shelf p { margin: .9rem 0 0; font-size: .95rem; line-height: 1.35; }
.shelf p span { display: block; color: var(--mist); font-size: .88rem; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.6rem var(--gutter) 2.2rem; background: var(--night); color: var(--mist);
  border-top: 1px solid rgba(169, 181, 188, .15);
}
.site-footer .logotype { color: var(--bone); font-size: 1rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Small screens: menu ---------- */
@media (max-width: 899px) {
  .js .menu-toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
    background: transparent; color: var(--bone); border: 1px solid rgba(169, 181, 188, .4); border-radius: 2px;
    font: inherit; font-size: .95rem; cursor: pointer;
  }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav[data-open="true"] { display: block; }
  .js .site-nav ul { flex-direction: column; padding: .4rem 0 .6rem; }
  .js .site-nav a { width: 100%; font-size: 1.05rem; color: var(--bone); }
  .site-header { padding-block: .7rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .saga, .saga *, .saga *::before { transition-duration: .01ms !important; }
}
