/* Moa & Micheal — Chatou 19.09.2026 — hand-drawn black ink on paper
   Type system: script (Nothing You Could Do) for the romantic moments,
   strict letterspaced caps (Montserrat) for the facts. */

@font-face {
  font-family: 'NYCD';
  src: url('/fonts/nycd.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --paper: #f6f0e4;
  --paper-2: #fbf7ec;
  --ink: #2b2a27;          /* soft black ink */
  --ink-strong: #1e1d1b;
  --ink-soft: rgba(43, 42, 39, .55);
  --muted: #7d7a6d;
  --rust: #a35540;         /* warm accent */
  --script: 'NYCD', 'Bradley Hand', cursive;
  --caps: 'Montserrat', 'Helvetica Neue', sans-serif;
  --wobble-sm: 9px 4px 10px 5px / 5px 10px 4px 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--caps);
  color: var(--ink-strong);
  background-color: var(--paper);
  line-height: 1.7;
  font-size: 1rem;
  font-weight: 400;
  overflow-x: hidden;
}
/* very light paper grain */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
body.locked { overflow: hidden; }

/* strict caps utility — dates, addresses, facts */
.caps {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.9;
}

/* ---------- window entrance ---------- */
#entree {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .9s ease, transform 1s ease-in;
}
#entree::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E");
}
.window-scene {
  perspective: 1100px;
  animation: windowin 1s ease-out both;
}
@keyframes windowin {
  from { opacity: 0; transform: scale(.94) translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.window-wrap {
  position: relative;
  width: min(76vw, 400px);
  aspect-ratio: 560 / 760;
}
.window-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
/* opening in frame coords: x 96..464 (368w), y 344..676 (332h) of 560x760 */
.pane {
  position: absolute;
  top: 45.26%; height: 43.68%;
  width: 32.86%;
  transition: transform 1.3s cubic-bezier(.6, .05, .35, 1);
  transform-style: preserve-3d;
}
.pane svg { width: 100%; height: 100%; display: block; }
.pane-l { left: 17.14%; transform-origin: left center; }
.pane-r { right: 17.14%; transform-origin: right center; }
#entree.open .pane-l { transform: rotateY(-108deg); }
#entree.open .pane-r { transform: rotateY(108deg); }
#entree.through {
  opacity: 0;
  transform: scale(5.5);
  pointer-events: none;
}
.entree-hint {
  margin-top: 1.6rem;
  font-family: var(--script); font-size: 1.25rem; color: var(--ink-soft);
  animation: hintin 1s 1.2s ease both;
}
@keyframes hintin { from { opacity: 0; } to { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.2rem;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed rgba(43, 42, 39, .3);
}
.monogram {
  font-family: var(--script); font-weight: 400; font-size: 1.5rem;
  text-decoration: none; color: var(--ink-strong);
}
.monogram .amp { color: var(--rust); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--ink-strong);
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
}
.nav-links a:hover { color: var(--rust); }
.nav-rsvp {
  background: var(--ink); color: var(--paper-2) !important;
  padding: .35rem 1.05rem; border-radius: var(--wobble-sm);
}
.nav-rsvp:hover { background: var(--ink-strong); }
.lang { font-size: .85rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; }
.lang button {
  border: 0; background: none; cursor: pointer; font: inherit; color: var(--muted); padding: .2rem;
  letter-spacing: .08em;
}
.lang button.on { color: var(--ink-strong); font-weight: 600; text-decoration: underline wavy var(--rust) 1.5px; text-underline-offset: 4px; }

@media (max-width: 640px) {
  .nav-links a:not(.nav-rsvp) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 5rem 1.2rem 4rem;
}
#paint { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: 48rem; }
.kicker {
  font-family: var(--script); font-weight: 400; font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  color: var(--rust);
}
.names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(2.5rem, 7.5vw, 4.8rem);
  line-height: 1.15; margin-top: .5rem;
  color: var(--ink-strong);
}
.amp-big { color: var(--rust); }
.brush { width: min(340px, 70%); margin: .5rem auto 1.2rem; display: block; }
#brushpath { stroke-dasharray: 400; stroke-dashoffset: 400; }
body.entered #brushpath { animation: brush 1.3s .4s ease-out forwards; }
@keyframes brush { to { stroke-dashoffset: 0; } }
.date {
  font-family: var(--caps); font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: clamp(.95rem, 2.2vw, 1.2rem);
}
.place { color: var(--muted); letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; margin-top: .4rem; font-weight: 500; }
.hero .btn-main { margin-top: 1.9rem; }
.hero-hint { margin-top: 2.2rem; color: var(--ink-soft); font-family: var(--script); font-size: 1.15rem; }
@media (hover: none) { .hero-hint { display: none; } }

.scrollcue {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  color: var(--ink-soft); animation: bob 2s ease-in-out infinite; font-size: 1.2rem;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-family: var(--caps); font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em;
  padding: .8rem 2rem;
  border-radius: var(--wobble-sm);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-main {
  background: var(--ink); color: var(--paper-2);
  border: 0;
  box-shadow: 3px 4px 0 rgba(43, 42, 39, .22);
}
.btn-main:hover { background: var(--ink-strong); transform: translateY(-2px); box-shadow: 3px 6px 0 rgba(43, 42, 39, .28); }
.btn-ghost {
  background: transparent; color: var(--ink-strong);
  border: 2px solid var(--ink); padding: .5rem 1.15rem; font-size: .74rem;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper-2); }

/* ---------- countdown : architectural plaques ---------- */
.countdown {
  display: flex; justify-content: center; gap: clamp(.7rem, 3vw, 1.8rem);
  padding: 1rem 1.2rem 0; flex-wrap: wrap;
}
.dab {
  position: relative;
  width: clamp(80px, 20vw, 112px); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-strong); text-align: center;
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: 7px 4px 8px 5px / 5px 8px 4px 7px;
  box-shadow: 2px 3px 0 rgba(43, 42, 39, .15);
}
.dab::after {
  content: ''; position: absolute; inset: 5px; pointer-events: none;
  border: 1.5px solid var(--ink-soft);
  border-radius: 5px 3px 6px 4px / 4px 6px 3px 5px;
}
.dab b { font-family: var(--caps); font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 600; line-height: 1; }
.dab span { font-family: var(--caps); font-size: .62rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }

/* ---------- sections ---------- */
.section { max-width: 62rem; margin: 0 auto; padding: 5.5rem 1.2rem 2rem; }
.section h2 {
  font-family: var(--script); font-weight: 400; text-align: center;
  font-size: clamp(2rem, 5.5vw, 3rem); margin-bottom: 2.4rem; line-height: 1.25;
  color: var(--ink-strong);
}
.section h2 span { position: relative; display: inline-block; padding: 0 .2em; }
.section h2 span::after {
  content: ''; position: absolute; left: 4%; right: 4%; bottom: -.1em; height: .28em;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M4 6.5 C 60 5.5 140 7 196 6' fill='none' stroke='%232b2a27' stroke-width='2.6' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.card {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-sm);
  padding: 1.9rem 1.7rem;
  box-shadow: 4px 5px 0 rgba(43, 42, 39, .13);
}
.card p { font-size: .95rem; }
.card-icon { font-size: 1.9rem; margin-bottom: .5rem; }
.card h3 { font-family: var(--script); font-size: 1.8rem; font-weight: 400; margin-bottom: .8rem; }
.card .strong.caps { font-weight: 600; font-size: .98rem; }
.card .muted { color: var(--muted); margin-top: .5rem; font-size: .88rem; }
.card .time-big {
  font-family: var(--caps); font-weight: 600; font-size: 1.7rem; letter-spacing: .12em;
  color: var(--rust); margin-top: .7rem; line-height: 1;
}
.card-actions { display: flex; gap: .8rem; margin-top: 1.3rem; flex-wrap: wrap; }

/* ---------- rsvp ---------- */
.section-rsvp { max-width: 44rem; padding-bottom: 4rem; }
.rsvp-intro { text-align: center; color: var(--muted); margin: -1.4rem 0 .4rem; font-size: .95rem; }
.rsvp-note {
  text-align: center; margin: 0 0 1.9rem;
  font-family: var(--script); font-size: 1.3rem; color: var(--rust);
}
.rsvp-form {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-sm);
  box-shadow: 4px 5px 0 rgba(43, 42, 39, .13);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  display: flex; flex-direction: column; gap: 1.3rem;
}
.rsvp-form label { display: flex; flex-direction: column; gap: .45rem; }
.rsvp-form label > span, .attending legend {
  font-family: var(--caps); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
}
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  font-family: var(--caps); font-size: 1rem; font-weight: 400; color: var(--ink-strong);
  border: 2px solid rgba(43, 42, 39, .5);
  border-radius: 8px 3px 9px 4px / 4px 9px 3px 8px;
  padding: .6rem .85rem; background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 2px 3px 0 rgba(43, 42, 39, .15);
}
.rsvp-form textarea { resize: vertical; }

.attending { border: 0; display: flex; gap: .8rem; flex-wrap: wrap; }
.attending legend { margin-bottom: .6rem; }
.pill {
  flex: 1 1 180px; cursor: pointer;
  border: 2px solid rgba(43, 42, 39, .5);
  border-radius: var(--wobble-sm);
  padding: .8rem 1rem;
  display: flex !important; flex-direction: row !important; align-items: center; gap: .6rem;
  transition: all .15s; background: var(--paper);
  font-size: .95rem; font-weight: 500;
}
.pill input { accent-color: currentColor; margin: 0; }
.pill:hover { border-color: var(--ink); }
.pill-yes:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.pill-no:has(input:checked) { background: var(--rust); border-color: var(--rust); color: var(--paper-2); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-submit { align-self: center; margin-top: .4rem; min-width: 60%; border: 0; }
.btn-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.form-msg { text-align: center; font-size: .88rem; min-height: 1.2em; color: var(--rust); }

.rsvp-done {
  text-align: center; background: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--wobble-sm);
  box-shadow: 4px 5px 0 rgba(43, 42, 39, .13);
  padding: 3rem 2rem;
}
.rsvp-done .done-art { font-size: 2.6rem; margin-bottom: .8rem; }
.rsvp-done h3 { font-family: var(--script); font-size: 1.9rem; font-weight: 400; margin-bottom: .5rem; }
.rsvp-done p { color: var(--muted); font-size: .95rem; }

/* hide dietary when "no" is selected */
form.said-no #row-dietary { display: none; }

/* ---------- footer ---------- */
.footer {
  text-align: center; padding: 3rem 1.2rem 2.4rem; margin-top: 2rem;
  border-top: 1.5px dashed rgba(43, 42, 39, .3);
}
.foot-names { font-family: var(--script); font-size: 1.5rem; font-weight: 400; }
.foot-names .amp { color: var(--rust); }
.foot-credit {
  color: var(--muted); margin-top: .6rem;
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
}

/* ---------- confetti canvas ---------- */
#confetti {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 100;
}

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; } .d3 { transition-delay: .36s; }
.d4 { transition-delay: .5s; } .d5 { transition-delay: .9s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body.entered #brushpath { animation: none; stroke-dashoffset: 0; }
  .scrollcue { animation: none; }
  #entree { display: none; }
}
