/* ============================================================
   Chester · one last long day
   The whole page is a single pass of daylight: the body carries
   one tall gradient from morning cream down to midnight indigo,
   and the scenes float over it.
   ============================================================ */

:root {
  --morning:  #fdf7e9;
  --cream:    #fbeed3;
  --gold:     #f3c98e;
  --amber:    #e8a87c;
  --rose:     #c97f7a;
  --plum:     #7e5480;
  --indigo:   #3f3669;
  --midnight: #16152f;

  --ink:        #4a3424;   /* warm dark brown for daylight text */
  --ink-soft:   #7a5c42;
  --paper:      #fffdf6;   /* photo frame stock */
  --night-ink:  #f1e9d8;   /* cream text for the night scene */
  --night-soft: #b9aed1;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Newsreader", "Georgia", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--morning);
  background-image: linear-gradient(
    180deg,
    var(--morning)  0%,
    var(--cream)    16%,
    var(--gold)     34%,
    var(--amber)    50%,
    var(--rose)     64%,
    var(--plum)     76%,
    var(--indigo)   86%,
    var(--midnight) 96%
  );
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film grain over everything, very quiet */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scenes ---------- */

.scene {
  position: relative;
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 6vw, 4rem);
  max-width: 100%;
}

.scene-marker {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.scene-marker span::before { content: "·  "; letter-spacing: 0.3em; }
.scene-marker span::after  { content: "  ·"; letter-spacing: 0.3em; }

.scene-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- morning: hero ---------- */

.scene--hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(4.5rem, 17vw, 13rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

.hero-sub {
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--ink-soft);
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: 0;
  right: 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.scroll-arrow {
  display: block;
  margin-top: 0.35rem;
  animation: drift-down 2.6s ease-in-out infinite;
}

@keyframes drift-down {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* dust motes in the sunbeam */
.motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.motes span {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 244, 214, 0.9);
  box-shadow: 0 0 8px 3px rgba(255, 236, 190, 0.45);
  animation: mote 13s linear infinite;
  opacity: 0;
}

.motes span:nth-child(1) { left: 12%; top: 28%; animation-delay: 0s;   animation-duration: 14s; }
.motes span:nth-child(2) { left: 26%; top: 60%; animation-delay: 2s;   animation-duration: 17s; width: 3px; height: 3px; }
.motes span:nth-child(3) { left: 38%; top: 18%; animation-delay: 5s;   animation-duration: 12s; }
.motes span:nth-child(4) { left: 52%; top: 72%; animation-delay: 1s;   animation-duration: 19s; width: 4px; height: 4px; }
.motes span:nth-child(5) { left: 64%; top: 34%; animation-delay: 7s;   animation-duration: 15s; width: 3px; height: 3px; }
.motes span:nth-child(6) { left: 75%; top: 56%; animation-delay: 4s;   animation-duration: 16s; }
.motes span:nth-child(7) { left: 86%; top: 24%; animation-delay: 9s;   animation-duration: 13s; width: 4px; height: 4px; }
.motes span:nth-child(8) { left: 45%; top: 44%; animation-delay: 11s;  animation-duration: 18s; width: 3px; height: 3px; }

@keyframes mote {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.6; }
  100% { transform: translate3d(28px, -64px, 0); opacity: 0; }
}

/* ---------- late morning: prose ---------- */

.prose {
  max-width: 36rem;
  margin: 0 auto;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.75;
}

.prose p + p { margin-top: 1.5em; }

.prose p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 3.2em;
  line-height: 0.8;
  float: left;
  padding-right: 0.12em;
  padding-top: 0.08em;
  color: var(--ink);
}

/* ---------- afternoon: little things ---------- */

.things {
  list-style: none;
  max-width: 34rem;
  margin: 0 auto;
  font-size: clamp(1.1rem, 2.3vw, 1.3rem);
  line-height: 1.6;
}

.things li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 1.4rem;
}

.things li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4d6, #eebd6f);
  box-shadow: 0 0 10px 2px rgba(238, 189, 111, 0.5);
}

/* alternate items lean a touch, like a hand-kept list */
.things li:nth-child(even) { transform: translateX(1.25rem); }

/* ---------- golden hour: album ---------- */

.scene--album .scene-marker,
.scene--album .scene-title { color: #5b3a2e; }

.album-note {
  text-align: center;
  font-style: italic;
  color: #6d4636;
  margin: -1.5rem auto 3rem;
  max-width: 30rem;
}

.album {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.frame {
  background: var(--paper);
  padding: 0.9rem 0.9rem 1.1rem;
  border-radius: 3px;
  box-shadow:
    0 1px 2px rgba(58, 32, 18, 0.18),
    0 12px 28px rgba(58, 32, 18, 0.22);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  justify-self: center;
  width: min(100%, 320px);
}

.frame:hover { transform: rotate(0deg) translateY(-4px); }

.frame__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: #e9d6b4;
}

.frame__caption {
  font-style: italic;
  font-size: 0.95rem;
  color: #6d4d33;
  text-align: center;
  padding-top: 0.7rem;
}

/* placeholder frames, until the real photos land */
.frame--placeholder .frame__img {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 240, 205, 0.9), transparent 55%),
    linear-gradient(165deg, #f3ddb4, #e3bd88);
}

.frame--placeholder .frame__sun {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff7df, #f0bd72);
  box-shadow: 0 0 24px 8px rgba(240, 189, 114, 0.55);
}

/* ---------- night ---------- */

.scene--night {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--night-ink);
  overflow: hidden;
  padding-bottom: 0;
}

.stars { position: absolute; inset: 0; pointer-events: none; }

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--d, 3s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  from { opacity: 0.15; }
  to   { opacity: 0.95; }
}

.shooting-star {
  position: absolute;
  top: 18%;
  left: -10%;
  width: 130px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9));
  transform: rotate(8deg);
  opacity: 0;
  animation: shoot 16s linear infinite;
  animation-delay: 6s;
  pointer-events: none;
}

@keyframes shoot {
  0%    { transform: translate3d(0, 0, 0) rotate(8deg); opacity: 0; }
  1.5%  { opacity: 0.9; }
  5%    { transform: translate3d(60vw, 9vw, 0) rotate(8deg); opacity: 0; }
  100%  { transform: translate3d(60vw, 9vw, 0) rotate(8deg); opacity: 0; }
}

.moon {
  position: absolute;
  top: clamp(3rem, 9vh, 6rem);
  right: clamp(2rem, 10vw, 8rem);
  width: clamp(56px, 9vw, 92px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fbf4dd, #d9cba4);
  box-shadow: 0 0 60px 18px rgba(244, 236, 216, 0.28);
}

.night-words { position: relative; max-width: 34rem; }

.goodnight {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 1.5rem;
}

.night-sub {
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  line-height: 1.7;
  color: var(--night-soft);
}

.windowsill {
  position: relative;
  margin-top: clamp(3rem, 7vh, 5rem);
  color: #0b0a1d;          /* the silhouette */
  width: min(320px, 70vw);
}

.cat { display: block; width: 100%; height: auto; }

.colophon {
  position: relative;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(241, 233, 216, 0.5);
  padding: 1.5rem 0 2rem;
}

/* ---------- reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .motes span,
  .scroll-arrow,
  .star,
  .shooting-star {
    animation: none;
  }

  .star { opacity: 0.7; }
  .shooting-star { display: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 480px) {
  .things li:nth-child(even) { transform: none; }
}
