:root {
  --ink: #f3ece4;
  --gold: #e6c39a;
  --paper: #f4efe6;
  --paper-ink: #241c18;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html {
  overflow-x: clip;
  background: #100c0a;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.26rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.11;
  background-repeat: repeat;
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

#bar {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}

#bar i {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.mark {
  position: fixed;
  z-index: 4;
  top: calc(0.85rem + env(safe-area-inset-top));
  left: calc(1rem + env(safe-area-inset-left));
  color: var(--ink);
  font-family: Fraunces, "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  opacity: 0.82;
}

.hint {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: calc(1.1rem + env(safe-area-inset-bottom));
  width: 1px;
  height: 42px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--ink));
  transform-origin: top center;
  opacity: 0.45;
}

main { position: relative; z-index: 2; }

header, section {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    calc(4.4rem + env(safe-area-inset-top))
    clamp(1.15rem, 5vw, 2.5rem)
    calc(3.4rem + env(safe-area-inset-bottom));
}

section.tall {
  display: block;
  min-height: 168svh;
  padding: 0;
}

.pin {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    calc(4.4rem + env(safe-area-inset-top))
    clamp(1.15rem, 5vw, 2.5rem)
    calc(3.4rem + env(safe-area-inset-bottom));
}

.copy { width: min(100%, 38rem); }

.split { width: min(100%, 62rem); }

header, section:not(#thanks) .copy {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

h1, h2, p { margin: 0; }

h1 {
  font-family: Fraunces, "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 560;
  font-size: clamp(3.1rem, 1.3rem + 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
}

.name-mr {
  margin-top: 0.35rem;
  font-family: "Tiro Devanagari Hindi", "Nirmala UI", Mangal, serif;
  font-size: clamp(1.85rem, 1rem + 3vw, 3rem);
  line-height: 1.35;
  font-weight: 400;
}

.lede {
  margin-top: 1.5rem;
  max-width: 22rem;
  font-size: 1.12rem;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.72;
}

.kicker::before {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: currentColor;
}

.verse { display: block; }

.mr {
  margin-top: 1.15rem;
  font-family: "Tiro Devanagari Hindi", "Nirmala UI", Mangal, serif;
  font-size: 1.28rem;
  line-height: 1.85;
}

.letter { margin-top: 0.4rem; }

.letter .verse { margin-bottom: 0.15rem; }

.gap { height: 0.85rem; }

.when {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1.25rem;
}

.when-time {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.15;
}

.when-time span {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.clock {
  --hour: 0deg;
  --minute: 0deg;
  position: relative;
  width: 86px;
  height: 86px;
  flex: none;
  border: 1px solid rgba(230, 195, 154, 0.72);
  border-radius: 50%;
}

.clock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--gold);
  z-index: 1;
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  background: var(--gold);
  transform-origin: 50% 100%;
  border-radius: 1px;
}

.hand.hour {
  width: 2px;
  height: 24px;
  margin-left: -1px;
  transform: rotate(var(--hour));
}

.hand.minute {
  width: 1.5px;
  height: 32px;
  margin-left: -0.75px;
  transform: rotate(var(--minute));
}

.stills {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 0.7rem;
  align-items: end;
  margin-top: 1.6rem;
}

.still {
  margin: 0;
}

.still img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.still-side img { object-position: center 48%; aspect-ratio: 1 / 1; }
.still-away img { object-position: center 42%; aspect-ratio: 1 / 1; }
.still-walk img { object-position: center 64%; }
.still-together img { object-position: center 72%; }
.still-held img { object-position: center 46%; aspect-ratio: 4 / 5; }
.still-blanket img { object-position: center 38%; }

.still figcaption {
  margin-top: 0.45rem;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.8;
}

.home-stills { grid-template-columns: 1.25fr 0.75fr; }

#thanks {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
}

#thanks::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -90px;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--paper));
  pointer-events: none;
}

#thanks .name-mr {
  font-size: clamp(2.3rem, 1.1rem + 4.2vw, 4.1rem);
  line-height: 1.3;
  margin: 0 0 1.1rem;
}

.thanks-en {
  margin-top: 1.5rem;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 520;
  font-size: clamp(2rem, 1rem + 3vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.coda { margin-top: 1rem; }

.colophon {
  margin-top: 2rem;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.62;
}

::selection { background: rgba(230, 195, 154, 0.35); }

.js:not(.still) .verse {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.9s cubic-bezier(.16, 1, .3, 1),
    transform 0.9s cubic-bezier(.16, 1, .3, 1);
}

.js:not(.still) .on .verse {
  opacity: 1;
  transform: none;
}

.js:not(.still) .frame {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1.05s cubic-bezier(.16, 1, .3, 1),
    transform 1.15s cubic-bezier(.16, 1, .3, 1);
}

.js:not(.still) .on .frame { opacity: 1; transform: none; }
.js:not(.still) .on .frame:nth-child(2) { transition-delay: 0.12s; }

.js:not(.still) .clock .hand {
  transition: transform 1.7s cubic-bezier(.16, 1, .3, 1);
}

.js:not(.still) .clock .hand.hour,
.js:not(.still) .clock .hand.minute { transform: rotate(0deg); }

.js:not(.still) .on .clock .hand.hour { transform: rotate(var(--hour)); }
.js:not(.still) .on .clock .hand.minute { transform: rotate(var(--minute)); }

.js:not(.still) .on .clock::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(230, 195, 154, 0.45);
  border-radius: 50%;
  animation: ring 2.7s ease-out infinite;
}

.js:not(.still) .on .clock.noon::after { animation-duration: 3.2s; }

h1 {
  animation: arrive 1.6s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes ring {
  0% { transform: scale(0.86); opacity: 0.7; }
  100% { transform: scale(1.45); opacity: 0; }
}

@media (min-width: 880px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.5rem 1.8rem;
    align-items: center;
  }
  .split .stills { margin-top: 0; }
  .split .still img { max-height: 68vh; }
}

@media (max-width: 640px) {
  .stills, .home-stills { grid-template-columns: 1fr; }
  .still img { max-height: 62vh; }
  .still figcaption { font-size: 0.92rem; }
  .mr { font-size: 1.16rem; }
  .clock { width: 74px; height: 74px; }
  .hand.hour { height: 20px; }
  .hand.minute { height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  h1 { animation: none; }
  .hint { display: none; }
  .verse, .frame { opacity: 1 !important; transform: none !important; transition: none !important; }
  .clock::after { display: none !important; }
  .hand { transition: none !important; }
}
