/* ==========================================================================
   Doria & Naji — invitation
   Hand-written CSS. Palette and typography come from the original template
   (#525822 olive on #F9F4EE paper, Typekit antiquarian-scribe + bahnschrift).
   ========================================================================== */

:root {
  --ink: #525822;
  --ink-soft: rgba(82, 88, 34, .7);
  --ink-faint: rgba(82, 88, 34, .5);
  --ink-ghost: rgba(82, 88, 34, .4);
  --line: rgba(82, 88, 34, .2);
  --line-soft: rgba(82, 88, 34, .1);
  --paper: #F9F4EE;
  --ivory: #F6F4EE;
  --card: rgba(255, 255, 255, .6);
  --font-body: "bahnschrift-semicondensed", sans-serif;
  --font-display: "antiquarian-scribe", cursive;
}

*, ::before, ::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.page { background: var(--paper); }

/* ---------------------------------------------------------------- type ---- */
.body { margin: 0; font-size: 1rem; line-height: 1.625; }

.eyebrow {
  margin: 0 0 1rem;
  font-size: .875rem;
  line-height: 1.25rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow--tight { font-size: .75rem; line-height: 1rem; letter-spacing: .2em; margin: 0; }
.eyebrow--soft { color: var(--ink-soft); margin: .75rem 0 1rem; }

.title-script, .title-display { font-family: var(--font-display); font-weight: 400; margin: 0; }
.title-script { font-size: 2.25rem; line-height: 2.5rem; margin-bottom: .5rem; }
.title-script--md { font-size: 1.875rem; line-height: 2.25rem; margin-bottom: 1.5rem; }
.title-script--sm { font-size: 1.5rem; line-height: 2rem; }
.title-display { letter-spacing: .025em; }
.title-display--lg { font-size: 2.25rem; line-height: 2.5rem; }
@media (min-width: 768px) {
  .title-script { font-size: 3rem; line-height: 1; }
  .title-script--md { font-size: 2.25rem; line-height: 2.5rem; }
  .title-script--sm { font-size: 1.875rem; line-height: 2.25rem; }
  .title-display--lg { font-size: 3rem; line-height: 1; }
}

/* ------------------------------------------------------------- reveal ---- */
/* Only armed when JS runs, so the page is fully readable without it. */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y, 20px)) scale(var(--reveal-scale, 1));
  transition:
    opacity var(--reveal-dur, .6s) ease-out var(--reveal-delay, 0s),
    transform var(--reveal-dur, .6s) ease-out var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-y="10"] { --reveal-y: 10px; }
.reveal[data-y="30"] { --reveal-y: 30px; }
.reveal[data-scale="95"] { --reveal-scale: .95; }
.reveal[data-dur="500"] { --reveal-dur: .5s; }
.reveal[data-dur="600"] { --reveal-dur: .6s; }
.reveal[data-dur="800"] { --reveal-dur: .8s; }
.reveal[data-delay="100"] { --reveal-delay: .1s; }
.reveal[data-delay="200"] { --reveal-delay: .2s; }
.reveal[data-delay="300"] { --reveal-delay: .3s; }
.reveal[data-delay="400"] { --reveal-delay: .4s; }
.reveal[data-delay="500"] { --reveal-delay: .5s; }
.reveal[data-delay="600"] { --reveal-delay: .6s; }
.reveal[data-delay="700"] { --reveal-delay: .7s; }
.reveal[data-delay="800"] { --reveal-delay: .8s; }

/* -------------------------------------------------------------- cover ---- */
.cover {
  position: relative;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
}
.cover__door { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__hint {
  position: absolute; inset: 0; z-index: 10; margin: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 2.5rem;
  opacity: 0; transition: opacity .6s ease-out;
}
.cover__hint.is-visible { opacity: 1; }
.cover__hint-text {
  font-size: .875rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 500; color: var(--paper);
  /* the door (and the clip) are olive: cream plus a soft olive shadow keeps the
     hint readable wherever it sits on them */
  text-shadow: 0 1px 2px rgba(43, 47, 17, .5), 0 0 14px rgba(43, 47, 17, .45);
}
.cover__hint.is-visible .cover__hint-text { animation: hint-pulse 2.5s ease-in-out infinite; }
@keyframes hint-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.cover__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.cover.is-playing .cover__video { display: block; }
.cover.is-playing .cover__door,
.cover.is-playing .cover__hint { display: none; }

/* Door and clip are portrait (1076x1928). On a landscape screen object-cover
   scales them to the width and crops away most of the frame — a zoomed band
   around the monogram. Show them whole instead, like the poster below. */
@media (orientation: landscape) {
  .cover__door,
  .cover__video { object-fit: contain; }
}

.cover__reveal {
  position: absolute; inset: 0; z-index: 5;
  background: #ECECEC;
  opacity: 0; transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}
.cover.is-revealed .cover__reveal { opacity: 1; }
.cover__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (orientation: landscape) { .cover__poster { object-fit: contain; } }

.cover__scroll { position: absolute; inset: 0; z-index: 10; opacity: 0; transition: opacity 2s ease-in-out; pointer-events: none; }
.cover.is-revealed .cover__scroll { opacity: 1; }
.cover__scroll-inner {
  position: absolute; bottom: 2rem; left: 0; right: 0;
  display: flex; justify-content: center;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .6s ease-out 2.5s, transform .6s ease-out 2.5s;
}
.cover.is-revealed .cover__scroll-inner { opacity: 1; transform: none; }
.cover__scroll-bounce {
  display: flex; flex-direction: column; align-items: center;
  animation: scroll-bounce 1.5s ease-in-out infinite;
}
.cover__scroll-label {
  margin: 0 0 .5rem; font-family: var(--font-display);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}
.cover__scroll-arrow { display: block; }
@keyframes scroll-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------------------------------------------------------- countdown ---- */
.section { display: flex; flex-direction: column; align-items: center; }
.countdown { justify-content: center; padding: 2rem; }
.countdown .title-script { text-align: center; margin-bottom: 3rem; }   /* mb-2 + wrapper mb-10 */
.countdown__row { display: flex; gap: 1rem; }
@media (min-width: 768px) { .countdown__row { gap: 2rem; } }
.stamp { display: flex; flex-direction: column; align-items: center; }
.stamp__frame {
  position: relative; width: 5rem; height: 6rem; margin-bottom: .5rem;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 768px) { .stamp__frame { width: 6rem; height: 7rem; } }
.stamp__frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; user-select: none; pointer-events: none;
}
.stamp__value { position: relative; font-size: 1.875rem; line-height: 1; color: var(--paper); }
@media (min-width: 768px) { .stamp__value { font-size: 2.25rem; } }
.stamp__label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
@media (min-width: 768px) { .stamp__label { font-size: .75rem; line-height: 1rem; } }
.countdown__note { margin: 2.5rem 0 0; font-size: .875rem; line-height: 1.25rem; letter-spacing: .025em; }

/* -------------------------------------------------------------- venue ---- */
.venue { justify-content: flex-start; padding: 1.5rem 2rem 2rem; text-align: center; }
.venue__name { margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 400; font-size: 1.875rem; line-height: 2.25rem; letter-spacing: .025em; }
@media (min-width: 768px) { .venue__name { font-size: 3rem; line-height: 1; } }
.venue__address { margin: 0 0 1rem; }
.venue__address .body { margin-top: .5rem; font-size: .875rem; }
.venue__date { margin: 0 0 1.5rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; letter-spacing: .025em; }
@media (min-width: 768px) { .venue__date { font-size: 1.875rem; line-height: 2.25rem; } }
.venue__art { display: flex; justify-content: center; margin-bottom: 2rem; }
.venue__art img { width: 16rem; height: auto; }
@media (min-width: 768px) { .venue__art img { width: 24rem; } }
.venue__links { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; text-align: left; }
@media (min-width: 640px) { .venue__links { flex-direction: row; } }
.link-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border: 2px solid var(--ink);
  font-size: .875rem; line-height: 1.25rem; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; transition: background-color .3s, color .3s;
}
.link-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------- timeline ---- */
/* "Order of the day": a centred stack of time / title / note with hairlines
   growing between the entries (the day-night template's section, re-set in
   this site's palette and faces). */
.timeline { justify-content: center; padding: 3rem 1.5rem; }
.timeline__header { text-align: center; margin-bottom: 1.5rem; }
.timeline__header .title-script { text-align: center; }   /* script heading, like the template */
.timeline__header .eyebrow { color: rgba(82, 88, 34, .6); }
.timeline__list { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 0; list-style: none; }
.timeline__item { display: flex; flex-direction: column; align-items: center; }
.timeline__body { max-width: 24rem; padding: .25rem 0; text-align: center; }
.timeline__time {
  margin: 0 0 .25rem;
  font-size: .875rem; line-height: 1.25rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(82, 88, 34, .6);
}
.timeline__title { margin: 0 0 .25rem; font-family: var(--font-body); font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.timeline__note { margin: 0; font-size: 1rem; line-height: 1.5rem; color: rgba(82, 88, 34, .8); }
@media (min-width: 768px) {
  .timeline__title { font-size: 1.5rem; line-height: 2rem; }
  .timeline__note { font-size: 1.125rem; line-height: 1.75rem; }
}
.timeline__line {
  display: block; width: 1px; height: 4rem;
  background: rgba(82, 88, 34, .3);
  transform-origin: top;
}
@media (min-width: 768px) { .timeline__line { height: 5rem; } }
/* the hairline grows rather than fades in (overrides the generic .reveal) */
.js .reveal.timeline__line { opacity: 1; transform: scaleY(0); transition: transform .5s ease-out var(--reveal-delay, 0s); }
.js .reveal.timeline__line.is-visible { transform: scaleY(1); }

/* ---------------------------------------------------------- transport ---- */
.transport { justify-content: center; padding: 1.5rem; overflow: visible; }
.transport__card { width: 100%; max-width: 28rem; padding: 1.25rem 1.5rem; border-radius: 1rem; text-align: center; }
.transport__card .eyebrow { margin-bottom: .75rem; font-size: .75rem; line-height: 1rem; letter-spacing: .2em; }
.transport .title-display--lg { margin-bottom: 1rem; }
.transport .body { margin-bottom: 1.5rem; }
@media (min-width: 768px) { .transport .body { margin-bottom: 2rem; } }
.transport__art-wrap { display: block; margin: 2rem auto .5rem; }
.transport__art {
  position: relative; z-index: 10; width: 14rem; height: auto; margin: 0 auto;
  transform-origin: bottom; pointer-events: none; user-select: none;
  will-change: transform;
}
@media (min-width: 768px) {
  .transport__art-wrap { margin-top: 1.5rem; }
  .transport__art { width: 18rem; }
}

/* --------------------------------------------------------------- rsvp ---- */
.rsvp { padding: 3rem 1.5rem; background: var(--paper); }
.rsvp__inner { width: 100%; max-width: 36rem; margin: 0 auto; }
.rsvp__header { text-align: center; margin-bottom: 2.5rem; }
.rsvp__header .title-script { text-align: center; }
.rsvp__mailbox { width: 10rem; height: 10rem; margin: 0 auto; object-fit: contain; }
.rsvp__body { position: relative; padding-top: 4rem; }   /* room for the bows on mobile */
@media (min-width: 768px) { .rsvp__body { padding-top: 0; } }
.rsvp__bow {
  position: absolute; top: 2.5rem; width: 5rem; z-index: 20;
  pointer-events: none; user-select: none;
}
.rsvp__bow--left { left: -.5rem; }
.rsvp__bow--right { right: -.5rem; }
@media (min-width: 768px) {
  .rsvp__bow { width: 6rem; }
  .rsvp__bow--left { left: -9rem; }
  .rsvp__bow--right { right: -9rem; }
}

/* --------------------------------------------------------------- form ---- */
.form {
  position: relative; z-index: 10;
  padding: 1.5rem; border-radius: 1rem;
  background: var(--card); border: 1px solid var(--line-soft);
}
@media (min-width: 768px) { .form { padding: 2rem; } }
.form > * + * { margin-top: 1.5rem; }
.form__trap { position: absolute; left: -9999px; opacity: 0; }
.form__events > * + * { margin-top: .75rem; }

.field { display: block; }
.label {
  display: block; margin-bottom: .5rem;
  font-size: .75rem; line-height: 1rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500;
}
.field > .label { margin-bottom: .5rem; }
.form__events .label { margin-bottom: .75rem; }

.input {
  width: 100%; height: 2.5rem; padding: .5rem .75rem;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line); border-radius: .75rem;
  color: var(--ink); font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--ink); }
.input::placeholder { color: var(--ink); opacity: .45; }
.input--area { height: 5rem; min-height: 5rem; resize: vertical; }
.input--invalid { border-color: #b91c1c; }
@media (min-width: 768px) { .input { font-size: .875rem; } }

.choices { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .choices { flex-direction: row; } }
.choice {
  flex: 1 1 0%; padding: .75rem 1rem;
  border: 1px solid var(--line); border-radius: .75rem;
  background: rgba(255, 255, 255, .8); color: var(--ink);
  font-size: .875rem; line-height: 1.25rem; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.choice:hover { box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); }
.choice[aria-pressed="true"] {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
}

.checks { display: flex; flex-direction: column; gap: .75rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .875rem; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 1rem; height: 1rem; margin: 0; flex: none;
  border: 1px solid var(--ink); border-radius: 2px;
  background: transparent; cursor: pointer;
  transition: background-color .15s;
}
.check input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9F4EE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .75rem no-repeat;
}
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.stepper { display: flex; align-items: center; gap: .5rem; }
.stepper__btn {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.stepper__btn:hover:not(:disabled) { background: rgba(82, 88, 34, .06); }
.stepper__btn:disabled { opacity: .35; cursor: not-allowed; }
.stepper__input {
  width: 4rem; height: 2.5rem; padding: .5rem .75rem; text-align: center;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line); border-radius: .75rem;
  color: var(--ink);
  appearance: textfield; -moz-appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: none; border-color: var(--ink); }

.submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; height: 3rem; padding: 0 1rem;
  border: 0; border-radius: .75rem;
  background: var(--ink); color: var(--paper);
  font-size: .875rem; letter-spacing: .025em; cursor: pointer;
  transition: opacity .15s;
}
.submit:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------ confirm ---- */
.confirmation { background: var(--ivory); }
.confirmation--no { padding: 5rem 1.5rem; }
@media (min-width: 768px) { .confirmation--no { padding: 8rem 3rem; } }
.confirmation__box { max-width: 32rem; margin: 0 auto; text-align: center; }
.confirmation__box .title-script { margin-bottom: 1.5rem; }
.confirmation__text { margin: 0; font-size: 1.125rem; line-height: 1.625; color: rgba(82, 88, 34, .8); }
.confirmation__signature { margin: 2rem 0 0; font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; color: rgba(82, 88, 34, .6); }
.confirmation--yes {
  justify-content: center; min-height: 100vh; min-height: 100svh;
  padding: 5rem 1.5rem; position: relative; overflow: hidden;
}
.confirmation__full { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.confirmation__full .title-script { margin-bottom: 2rem; }
.confirmation__message { max-width: 42rem; }
.confirmation__message .body { color: rgba(82, 88, 34, .9); font-size: 1.125rem; line-height: 1.625; }
.confirmation__message .body + .body { margin-top: 1.5rem; color: rgba(82, 88, 34, .8); font-size: 1rem; }
.confirmation--yes .confirmation__signature { margin-top: 2.5rem; font-size: 1.5rem; }
@media (min-width: 768px) { .confirmation--yes .confirmation__signature { font-size: 1.875rem; line-height: 2.25rem; } }
.confirmation__actions { margin-top: 3rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.confirmation__actions .link-outline { border-color: rgba(82, 88, 34, .3); }
.confirmation__actions .link-outline:hover { background: var(--ink); color: #fff; }
.confirmation__note { max-width: 28rem; margin: 0; font-size: .875rem; line-height: 1.625; color: rgba(82, 88, 34, .5); }

/* -------------------------------------------------------------- thanks ---- */
.thanks { justify-content: center; padding: 3rem 1.5rem; }
.thanks__inner { position: relative; width: 100%; max-width: 24rem; text-align: center; }
@media (min-width: 768px) { .thanks__inner { max-width: 28rem; } }
.thanks__monogram { width: 12rem; height: auto; margin: 0 auto 1.5rem; user-select: none; pointer-events: none; }
@media (min-width: 768px) { .thanks__monogram { width: 16rem; } }
.thanks .body { margin-bottom: 1.5rem; font-size: .875rem; line-height: 1.625; }
@media (min-width: 768px) { .thanks .body { font-size: 1rem; } }
.credit { margin: 2rem 0 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-ghost); }
.credit a { color: var(--ink-faint); text-underline-offset: 2px; transition: opacity .2s; }
.credit a:hover { opacity: .8; }

/* --------------------------------------------------------- sound button ---- */
.sound {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  cursor: pointer; transition: transform .3s, background-color .3s, color .3s;
}
.sound[hidden] { display: none; }
.sound:hover { transform: scale(1.1); }
.sound__on { display: none; }
.sound.is-playing { background: var(--ink); color: #fff; }
.sound.is-playing .sound__on { display: block; }
.sound.is-playing .sound__off { display: none; }

/* --------------------------------------------------------------- toast ---- */
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 100;
  display: flex; flex-direction: column; gap: .25rem;
  width: calc(100% - 2rem); max-width: 26rem;
  padding: 1rem; border: 1px solid rgba(82, 88, 34, .15); border-radius: .5rem;
  background: #fff; color: var(--ink);
  font-size: .8125rem; line-height: 1.4;
  box-shadow: 0 4px 12px rgb(0 0 0 / .1);
  animation: toast-in .4s ease;
}
.toast--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.toast__title { font-weight: 500; font-size: .8125rem; }
.toast__body { color: inherit; opacity: .85; }
@keyframes toast-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- misc ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cover__hint.is-visible .cover__hint-text,
  .cover__scroll-bounce { animation: none; }
}

@media print {
  .cover, .sound, .rsvp__bow { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
