@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Noto+Serif+SC:wght@300;400;500;600&display=swap');

:root {
  --paper: #f3eee5;
  --paper-rgb: 243, 238, 229;
  --ink: #231f1b;
  --muted: #756c61;
  --accent: #9b271f;
  --accent-2: #c6a06b;
  --line: rgba(35, 31, 27, .2);
  --hero-image: url('assets/sun-kiss.jpg');
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
}

html[data-theme='jade'] {
  --paper: #dfe2d5;
  --paper-rgb: 223, 226, 213;
  --ink: #17352d;
  --muted: #4f665d;
  --accent: #a12c22;
  --accent-2: #557266;
  --line: rgba(23, 53, 45, .22);
  --hero-image: url('assets/close-fans.jpg');
}

html[data-theme='flash'] {
  --paper: #f4d4d1;
  --paper-rgb: 244, 212, 209;
  --ink: #241a24;
  --muted: #745a68;
  --accent: #e12b62;
  --accent-2: #5234d2;
  --line: rgba(36, 26, 36, .2);
  --hero-image: url('assets/confetti.jpg');
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-weight: 300;
  overflow-x: hidden;
  transition: color .55s ease, background .55s ease;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.section { position: relative; padding: 9rem max(6vw, 24px); }
.section-no { font-family: var(--display); font-size: .75rem; letter-spacing: .22em; color: var(--muted); }
.script { margin: 0; color: var(--accent); font-family: var(--display); font-size: clamp(1.35rem, 3vw, 2.1rem); font-style: italic; }
.grain { position: fixed; inset: 0; z-index: 50; opacity: .055; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }

.theme-bar { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 16px; color: #fff; background: rgba(20,18,16,.46); border: 1px solid rgba(255,255,255,.25); border-radius: 99px; backdrop-filter: blur(16px); transform: translateX(-50%); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.theme-label { font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.theme-options { display: flex; gap: 7px; }
.theme-dot { width: 22px; height: 22px; padding: 3px; border: 1px solid transparent; border-radius: 50%; background: none; cursor: pointer; }
.theme-dot i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.theme-dot:nth-child(1) i { background: #eadfcd; }
.theme-dot:nth-child(2) i { background: #789083; }
.theme-dot:nth-child(3) i { background: #f56183; }
.theme-dot.is-active { border-color: #fff; }

.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 7rem max(5vw, 24px) 6rem; color: #fff; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background: var(--hero-image) center 42%/cover no-repeat; transform: scale(1.015); transition: background-image .45s ease, opacity .3s ease; animation: breathe 14s ease-in-out infinite alternate; }
html[data-theme='jade'] .hero-photo { background-position: center 44%; }
html[data-theme='flash'] .hero-photo { background-position: center 50%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.28) 0%, transparent 35%, rgba(10,8,7,.67) 100%); }
.hero-top { position: absolute; top: 28px; left: max(5vw, 24px); right: max(5vw, 24px); display: flex; justify-content: space-between; margin-top: 60px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.58); font-family: var(--display); font-size: .72rem; letter-spacing: .18em; }
.hero-copy { position: relative; z-index: 1; padding-right: 28vw; }
.hero-copy .eyebrow { margin: 0 0 14px; font-size: .8rem; letter-spacing: .35em; }
.hero h1 { display: flex; align-items: baseline; gap: .25em; margin: 0; font-size: clamp(3.5rem, 10vw, 9rem); font-weight: 400; line-height: .95; letter-spacing: -.05em; text-shadow: 0 3px 30px rgba(0,0,0,.28); }
.hero h1 b { font-family: var(--display); font-size: .58em; font-style: italic; font-weight: 400; }
.hero-line { margin: 24px 0 0 5px; font-size: .92rem; letter-spacing: .15em; }
.hero-date { position: absolute; right: max(5vw, 24px); bottom: 7rem; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--display); }
.hero-date strong { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 400; line-height: 1; }
.hero-date span { font-size: .65rem; letter-spacing: .26em; }
.scroll-cue { position: absolute; right: max(5vw, 24px); bottom: 2.2rem; z-index: 1; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: .62rem; letter-spacing: .18em; }
.scroll-cue i { display: block; width: 38px; height: 1px; background: #fff; animation: pulse 1.8s ease infinite; transform-origin: left; }

.intro { max-width: 1400px; margin: auto; }
.intro-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(340px, 1.25fr); gap: clamp(3rem, 9vw, 10rem); align-items: center; margin-top: 5rem; }
.intro-copy h2, .countdown h2, .gallery-heading h2, .closing h2 { margin: 1.3rem 0 2rem; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 400; line-height: 1.28; letter-spacing: -.055em; }
.intro-copy > p:not(.script) { max-width: 32em; color: var(--muted); font-size: .98rem; line-height: 2.15; }
.signature { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-family: var(--display); letter-spacing: .18em; }
.signature i, .closing-names i { margin: 0 .8em; color: var(--accent); font-style: normal; }
.feature-photo { position: relative; margin: 0; }
.feature-photo::before { content: ''; position: absolute; inset: -16px 18px 24px -18px; z-index: -1; border: 1px solid var(--accent-2); }
.feature-photo img { height: min(74vh, 780px); object-fit: cover; object-position: center; }
.feature-photo figcaption { margin-top: 12px; text-align: right; font-family: var(--display); font-size: .68rem; letter-spacing: .24em; color: var(--muted); }

.details { min-height: 920px; display: grid; place-items: center; isolation: isolate; overflow: hidden; }
.details-backdrop { position: absolute; inset: 0; z-index: -2; background: url('assets/dream.jpg') center/cover no-repeat; }
.details::after { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(18,15,12,.42); backdrop-filter: blur(2px); }
.details-card { width: min(92vw, 590px); padding: clamp(2.1rem, 6vw, 5.5rem); text-align: center; background: rgba(var(--paper-rgb), .93); box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.details-card h2 { margin: .7rem 0 2rem; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 400; }
.date-lockup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.3rem; margin-bottom: 2.4rem; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.date-lockup span { font-size: .72rem; letter-spacing: .16em; }
.date-lockup strong { color: var(--accent); font-family: var(--display); font-size: 5.4rem; font-weight: 400; line-height: .8; }
.detail-row { display: grid; grid-template-columns: 80px 1fr; padding: 15px 0; text-align: left; border-bottom: 1px solid var(--line); }
.detail-row > span { font-family: var(--display); font-size: 1.35rem; }
.detail-row b { display: block; font-size: .95rem; font-weight: 500; letter-spacing: .08em; }
.detail-row small { display: block; margin-top: 4px; color: var(--muted); }
.venue { margin: 2.5rem 0 1.8rem; }
.venue small { color: var(--accent); font-family: var(--display); letter-spacing: .25em; }
.venue h3 { margin: 10px 0 6px; font-size: 1.7rem; font-weight: 500; }
.venue p { margin: 0; color: var(--muted); font-size: .85rem; letter-spacing: .18em; }
.action-row { display: flex; justify-content: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-width: 150px; padding: 13px 18px; border: 1px solid var(--ink); border-radius: 99px; color: var(--paper); background: var(--ink); cursor: pointer; transition: .25s ease; }
.pill:hover { transform: translateY(-2px); }
.pill-quiet { color: var(--ink); background: transparent; }

.countdown { text-align: center; }
.countdown .script { margin-top: 5rem; }
.countdown h2 { margin-top: .7rem; }
.count-grid { width: min(100%, 880px); margin: 4rem auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.count-grid div { padding: 2.8rem 1rem; border-right: 1px solid var(--line); }
.count-grid div:last-child { border-right: 0; }
.count-grid strong { display: block; font-family: var(--display); font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 400; }
.count-grid span { color: var(--muted); font-family: var(--display); font-size: .63rem; letter-spacing: .18em; }

.gallery { max-width: 1500px; margin: auto; }
.gallery-heading { margin-bottom: 5rem; }
.gallery-heading h2 { margin-bottom: 1rem; }
.gallery-heading p { color: var(--muted); font-family: var(--display); letter-spacing: .22em; }
.photo-wall { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 75px; gap: clamp(8px, 1.4vw, 20px); }
.photo { margin: 0; overflow: hidden; }
.photo img { height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.photo:hover img { transform: scale(1.035); }
.p1 { grid-column: 1 / 6; grid-row: 1 / 9; }
.p2 { grid-column: 6 / 10; grid-row: 2 / 7; }
.p3 { grid-column: 10 / 13; grid-row: 1 / 6; }
.p4 { grid-column: 6 / 10; grid-row: 7 / 14; }
.p5 { grid-column: 10 / 13; grid-row: 6 / 12; }
.p6 { grid-column: 1 / 6; grid-row: 9 / 15; }
.p7 { grid-column: 10 / 13; grid-row: 12 / 17; }
.p8 { grid-column: 1 / 10; grid-row: 15 / 22; }
html[data-theme='jade'] .photo img { filter: saturate(.8) contrast(.96); }
html[data-theme='flash'] .photo img { filter: saturate(1.08) contrast(1.04); }

.quote { min-height: 90svh; display: grid; place-items: center; padding: 0; color: #fff; overflow: hidden; }
.quote > img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.quote-shade { position: absolute; inset: 0; background: rgba(8,7,6,.4); }
.quote-copy { position: relative; z-index: 1; padding: 2rem; text-align: center; }
.quote-copy span { font-family: var(--display); font-size: .68rem; letter-spacing: .35em; }
.quote-copy p { font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1.55; letter-spacing: -.05em; }

.closing { min-height: 90svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.closing-mark { color: var(--accent); font-size: 5rem; line-height: 1; }
.closing h2 { margin-bottom: 1.5rem; }
.closing-note { color: var(--muted); letter-spacing: .13em; }
.closing-date { margin-top: 4rem; padding: 1rem 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; letter-spacing: .15em; }
.closing-names { margin-top: 2rem; font-family: var(--display); font-size: 1.2rem; letter-spacing: .1em; }

.toast { position: fixed; left: 50%; bottom: 30px; z-index: 80; padding: 11px 18px; color: #fff; background: rgba(20,18,16,.86); border-radius: 99px; font-size: .8rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .3s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
@keyframes breathe { to { transform: scale(1.06); } }
@keyframes pulse { 50% { transform: scaleX(.35); opacity: .55; } }

@media (max-width: 760px) {
  .section { padding: 6.5rem 22px; }
  .hero { min-height: 100svh; padding: 7rem 22px 6.5rem; }
  .hero-photo { background-position: 59% center; }
  html[data-theme='jade'] .hero-photo { background-position: 51% center; }
  html[data-theme='flash'] .hero-photo { background-position: 50% center; }
  .hero-top { left: 22px; right: 22px; }
  .hero-copy { width: 100%; padding: 0; }
  .hero h1 { display: block; font-size: clamp(3.25rem, 15vw, 5.5rem); }
  .hero h1 b { display: inline-block; margin: 0 .18em; }
  .hero-line { max-width: 18em; font-size: .78rem; line-height: 1.8; }
  .hero-date { right: 22px; bottom: 6rem; }
  .hero-date strong { font-size: 2.4rem; }
  .scroll-cue { right: auto; left: 22px; }
  .intro-grid { grid-template-columns: 1fr; gap: 4rem; margin-top: 3.5rem; }
  .intro-copy h2, .countdown h2, .gallery-heading h2, .closing h2 { font-size: 2.5rem; }
  .feature-photo::before { inset: -10px 12px 18px -10px; }
  .feature-photo img { height: 63vh; }
  .details { min-height: 850px; padding-left: 16px; padding-right: 16px; }
  .details-card { width: 100%; padding: 2.7rem 1.4rem; }
  .date-lockup { gap: .6rem; }
  .date-lockup strong { font-size: 4.4rem; }
  .action-row { flex-direction: column; }
  .count-grid { grid-template-columns: repeat(2, 1fr); }
  .count-grid div:nth-child(2) { border-right: 0; }
  .count-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery { padding-left: 18px; padding-right: 18px; }
  .gallery-heading { margin-bottom: 2.4rem; padding: 0 4px; }
  .gallery-heading .section-no { margin-bottom: 1.6rem; }
  .gallery-heading h2 { margin: 0 0 .9rem; font-size: 2.35rem; line-height: 1.22; }
  .gallery-heading p { margin: 0; font-size: .66rem; line-height: 1.7; }
  .photo-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 10px; }
  .photo { grid-column: auto; grid-row: auto; min-height: 0; }
  .photo img { height: 100%; object-position: center; }
  .p1 { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
  .p2 { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .p4, .p7 { aspect-ratio: 3 / 4; }
  .p3, .p5, .p6, .p8 { display: none; }
  .p1 img { object-position: center 35%; }
  .p2 img { object-position: center 48%; }
  .p4 img { object-position: center; }
  .p7 img { object-position: center 44%; }
  .quote { min-height: 75svh; }
  .quote > img { object-position: 65% center; }
  .quote-copy p { font-size: 2.15rem; }
  .closing { min-height: 85svh; }
  .closing-date { font-size: .7rem; padding-inline: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}
