/* Swati & Shivam: guest website.
   The invite's watercolours on their own paper; each function's band takes
   the colour of the sky at its hour, so the page darkens toward the pheras. */

:root {
  --paper: #FDFAF2;
  --ink: #2B211B;
  --ink-soft: #6B5A4E;
  --crimson: #8E1730;
  --marigold: #D9951E;
  --gold: #F1C36A;
  --night-ink: #F4EEE4;
  --night-soft: #C8C2D6;
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --text: 'Tiro Devanagari Hindi', Georgia, serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── hero ── */
.hero {
  text-align: center;
  padding: calc(28px + env(safe-area-inset-top)) var(--gutter) 0;
}
.ganesh {
  width: 76px; margin: 0 auto 4px; mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
          mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
}
.blessing { color: var(--crimson); font-size: 17px; letter-spacing: .02em; }
.elders { font-style: italic; color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.names {
  font-family: var(--display);
  color: var(--crimson);
  font-size: clamp(68px, 21vw, 150px);
  line-height: .9;
  letter-spacing: -.01em;
  margin: 26px 0 22px;
}
.names span { display: block; }
.names .amp { font-size: .5em; line-height: 1.15; }
.hero-date { font-family: var(--display); font-style: italic; font-size: 30px; line-height: 1.15; }
.hero-place { margin-top: 6px; color: var(--ink-soft); line-height: 1.45; }
.hero-place span { display: block; }
.hero-count { margin-top: 14px; font-size: 16px; color: var(--crimson); }
.hero-art { margin: 26px auto 0; max-width: 460px; }
.hero-video {
  width: 100%;
  aspect-ratio: 640 / 1120;
  object-fit: cover;
  background: #EEF0EE;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 82%, transparent 100%),
                      linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 82%, transparent 100%),
                      linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-composite: intersect;
}

/* ── bands ── */
.band { background: var(--bg, var(--paper)); }
.tone-dusk, .tone-night, .tone-midnight { color: var(--night-ink); }

.welcome { padding: 34px var(--gutter) 10px; text-align: center; }
.welcome-line {
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.25;
  max-width: 21em;
  margin: 0 auto;
}

.section-title { font-family: var(--display); font-size: 46px; line-height: 1.05; color: var(--crimson); }
.section-lede { margin-top: 10px; color: var(--ink-soft); }
.prog-head { padding: 64px var(--gutter) 6px; text-align: center; }
.prog-head .section-lede { max-width: 26em; margin-left: auto; margin-right: auto; }

.dayhead { padding: 64px var(--gutter) 6px; text-align: center; }
.day-title { font-family: var(--display); font-style: italic; font-size: 34px; line-height: 1.1; color: var(--ink-soft); }
.dayhead.tone-dusk .day-title, .dayhead.tone-night .day-title, .dayhead.tone-midnight .day-title { color: var(--night-soft); }

.ev { padding: 26px var(--gutter) 70px; }
/* where the sky turns (day to dusk, night to dawn) give it room before the art */
.dayhead[data-cross] { padding-top: 200px; }
.ev[data-cross] { padding-top: 190px; }
.ev-inner { max-width: 470px; margin: 0 auto; text-align: center; }
.plate { margin: 0; }
.plate img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%),
                      linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%),
                      linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-composite: intersect;
}
.ev-text { margin-top: 18px; }
.ev-time { font-family: var(--display); font-style: italic; font-size: 26px; line-height: 1.2; color: var(--ink-soft); }
.ev-name { font-family: var(--display); font-size: 54px; line-height: 1; color: var(--crimson); margin: 4px 0 12px; }
.ev-blurb { font-size: 20px; line-height: 1.5; font-style: italic; }
.ev-note { margin-top: 6px; font-size: 16px; color: var(--ink-soft); }
.ev-wear { margin: 20px 0 0; }
.ev-wear dt { font-size: 15px; color: var(--ink-soft); }
.ev-wear dd { margin: 2px 0 0; }
.ev-wear strong { font-weight: 400; color: var(--crimson); }

.tone-dusk .ev-name, .tone-night .ev-name, .tone-midnight .ev-name,
.tone-dusk .ev-wear strong, .tone-night .ev-wear strong, .tone-midnight .ev-wear strong { color: var(--gold); }
.tone-dusk .ev-time, .tone-night .ev-time, .tone-midnight .ev-time,
.tone-dusk .ev-wear dt, .tone-night .ev-wear dt, .tone-midnight .ev-wear dt,
.tone-dusk .ev-note, .tone-night .ev-note, .tone-midnight .ev-note { color: var(--night-soft); }

/* a function just unlocked: one soft glow so the eye finds it */
.ev.fresh .plate img { animation: arrive 1.6s ease-out 1; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ev.fresh .plate img { animation: none; } }

/* ── travel ── */
.travel { padding: 210px var(--gutter) 64px; }
.wrap { max-width: 1040px; margin: 0 auto; }
.wrap.narrow { max-width: 640px; }
.travel .section-title, .travel .section-lede { text-align: center; }
.travel .section-lede { max-width: 28em; margin-left: auto; margin-right: auto; }
.ways { display: grid; gap: 26px; margin-top: 34px; }
.way h3 { font-family: var(--display); font-size: 28px; color: var(--crimson); line-height: 1.1; margin-bottom: 4px; }
.way p + p { margin-top: 6px; }
.maps { color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.plans {
  margin: 56px auto 0;
  max-width: 640px;
  padding-top: 40px;
  border-top: 1px solid rgba(142, 23, 48, .25);
  text-align: center;
}
.plans-hi { font-size: 24px; line-height: 1.6; color: var(--crimson); }
.plans-en { margin-top: 8px; color: var(--ink-soft); font-style: italic; }
.plan-form {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  text-align: left;
}
.field { display: flex; flex-direction: column; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.opt { font-style: italic; }
.field input, .field select {
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(43, 33, 27, .35);
  border-radius: 0;
  padding: 8px 2px;
  min-height: 46px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
}
.field input:focus, .field select:focus { outline: none; border-bottom: 2px solid var(--crimson); }
.btn {
  font: inherit;
  font-size: 18px;
  background: var(--crimson);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  min-height: 50px;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(43, 33, 27, .35); }
.plan-form .btn { grid-column: 1 / -1; justify-self: center; margin-top: 10px; padding-left: 34px; padding-right: 34px; }
.form-help { grid-column: 1 / -1; text-align: center; font-size: 15px; color: var(--ink-soft); }
.form-err { grid-column: 1 / -1; text-align: center; color: var(--crimson); font-size: 16px; }

/* ── story ── */
.story { padding: 40px var(--gutter) 90px; }
.story .section-title { text-align: center; }
.chapters { list-style: none; margin: 40px 0 0; padding: 0 0 0 26px; border-left: 1px solid rgba(217, 149, 30, .55); }
.ch { position: relative; padding-bottom: 34px; }
.ch::before {
  content: '';
  position: absolute;
  left: -31px; top: 9px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--marigold);
}
.ch-when { font-size: 15px; color: var(--ink-soft); }
.ch-title { font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--crimson); margin: 2px 0 6px; }
.ch-stat { margin-top: 6px; font-family: var(--display); font-style: italic; font-size: 21px; color: var(--marigold); }
.ch-last { padding-bottom: 0; }
.ch-last .ch-title { font-size: 38px; }

/* ── closing ── */
.closing { position: relative; color: #2D2340; overflow: hidden; }
.closing-art { width: 100%; height: auto; }
.closing-text {
  position: absolute;
  top: 9%; left: 0; right: 0;
  text-align: center;
  padding: 0 var(--gutter);
}
.closing-line { font-family: var(--display); font-size: clamp(46px, 13vw, 96px); line-height: 1; }
.closing-from { margin-top: 12px; font-style: italic; }
.closing-foot {
  position: absolute;
  left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--night-ink);
  padding: 0 var(--gutter);
}
.seal {
  font-family: var(--text);
  font-size: 15px;
  color: var(--gold);
  background: rgba(17, 21, 47, .25);
  border: 1px solid rgba(241, 195, 106, .55);
  border-radius: 50%;
  width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seal-amp { font-family: var(--display); font-size: 13px; opacity: .8; margin: 0 1px; }
.unlocked-note { margin-top: 10px; font-size: 14px; }
.linkish { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── code sheet ── */
.code-sheet {
  border: 0;
  border-radius: 18px;
  padding: 28px 24px 22px;
  width: min(92vw, 380px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(17, 21, 47, .35);
}
.code-sheet::backdrop { background: rgba(17, 21, 47, .55); }
.code-sheet h2 { font-family: var(--display); font-size: 34px; color: var(--crimson); }
.code-sheet p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }
#code-input {
  margin-top: 18px;
  width: 100%;
  font: inherit;
  font-size: 22px;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(43, 33, 27, .3);
  border-radius: 10px;
  padding: 10px;
}
.code-err { min-height: 1.5em; color: var(--crimson) !important; text-align: center; }
.code-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ── wider screens ── */
@media (min-width: 640px) {
  .ways { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .welcome-line { font-size: 32px; }
}

@media (min-width: 900px) {
  :root { --gutter: 48px; }
  .hero {
    display: grid;
    grid-template-columns: 1fr minmax(380px, 40vw);
    align-items: center;
    gap: 40px;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .hero-art { margin: 0; max-width: none; }
  .hero-video { max-height: 88vh; width: auto; margin: 0 auto; }
  .names { margin: 22px 0 24px; }
  .welcome { padding-top: 0; }

  .ev { padding: 40px var(--gutter) 90px; }
  .ev-inner {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
    text-align: left;
  }
  .ev.flip .plate { order: 2; }
  .plate img { max-height: 82vh; width: auto; margin: 0 auto; }
  .ev-text { margin-top: 0; max-width: 30em; }
  .ev-name { font-size: 72px; }
  .section-title { font-size: 60px; }
  .day-title { font-size: 42px; }

  .closing-art { height: 100vh; min-height: 720px; width: 100%; object-fit: cover; object-position: 50% 100%; }
}
