/* ============================================================
   Sydney & Cole — Vila Bled, 8 September 2027
   Design option 1A: Classic · Centered · Lakeside
   ============================================================ */

:root {
  /* surfaces */
  --paper:        #FBF9F4;
  --paper-warm:   #F4F0E8;
  --panel:        #EFE9DC;
  --forest:       #3F4634;
  --line:         #E4D8C3;

  /* ink */
  --ink:          #3A382E;
  --ink-soft:     #4A483C;
  --body:         #5A5849;
  --muted:        #9A9070;
  --muted-warm:   #8A8674;
  --sub:          #6E6B5E;

  /* accents */
  --olive:        #6B7150;
  --olive-dark:   #4A5038;
  --tan:          #C9B393;

  /* on dark */
  --on-dark:      #EFE9DC;
  --on-dark-hi:   #F4F0E8;
  --on-dark-soft: #B9BE9C;
  --on-dark-body: #CDD1B4;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* horizontal page inset — one knob for every section */
  --pad: clamp(22px, 7vw, 120px);
  --maxw: 1160px;
}

*, *::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(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--olive); text-decoration: none; }
a:hover { color: var(--olive-dark); }

.page { max-width: var(--maxw); margin: 0 auto; background: var(--paper); overflow: clip; }

@media (min-width: 1220px) {
  body { background: #E9E3D6; }
  .page { box-shadow: 0 40px 90px -50px rgba(60, 58, 44, .6); }
}

/* ---------- shared type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow--sm { font-size: 11px; letter-spacing: .28em; }
.eyebrow--wide { letter-spacing: .42em; color: rgba(251, 249, 244, .9); font-size: clamp(11px, 1.6vw, 14px); }
.eyebrow--on-dark { color: var(--on-dark-soft); }

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  color: var(--ink);
  margin: 14px 0 0;
}
.section__title--sm { font-size: clamp(34px, 5.4vw, 52px); margin-bottom: 20px; }
.section__title--on-dark { color: var(--on-dark-hi); font-size: clamp(42px, 6.6vw, 60px); }

.section { padding: clamp(64px, 9vw, 110px) var(--pad) 40px; }
.section__head { text-align: center; margin-bottom: clamp(38px, 5vw, 64px); }

.prose {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 21px);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 12px 0 0;
  text-wrap: pretty;
}
.prose--lg { font-size: clamp(19px, 2.3vw, 22px); max-width: 440px; margin-top: 0; }

.minihead {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0;
}

.note {
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin-top: 26px;
}

.rule { display: block; width: 56px; height: 1px; background: rgba(251, 249, 244, .6); margin: clamp(16px, 3vw, 26px) auto; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(520px, 88vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d8cbaf;
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40, 42, 32, .32), rgba(40, 42, 32, .52));
}
.hero__inner {
  position: relative;
  text-align: center;
  color: var(--paper);
  padding: 60px 24px;
}
.hero__names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 96px);
  line-height: 1;
  letter-spacing: .01em;
  margin: 0;
}
.hero__amp {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 52px);
  margin: clamp(10px, 2vw, 18px) 0;
  opacity: .92;
}
.hero__meta {
  font-family: var(--sans);
  font-size: clamp(12px, 1.9vw, 16px);
  letter-spacing: .3em;
  text-transform: uppercase;
  margin: 0;
}

/* ---------- intro ---------- */

.intro { text-align: center; padding: clamp(58px, 8vw, 96px) var(--pad) 40px; }
.intro__lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 3.4vw, 33px);
  line-height: 1.5;
  color: var(--ink);
  margin: 26px auto 0;
  max-width: 640px;
  text-wrap: pretty;
}

/* ---------- detail strip ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin: clamp(38px, 5vw, 60px) var(--pad) 0;
}
.strip__cell { background: var(--paper); padding: clamp(28px, 4vw, 40px) 20px; text-align: center; }
.strip__lead { font-family: var(--serif); font-size: clamp(22px, 2.8vw, 27px); color: var(--ink); margin: 12px 0 0; }
.strip__sub  { font-family: var(--sans); font-size: 14px; color: var(--sub); margin: 4px 0 0; }

@media (max-width: 720px) {
  .strip { grid-template-columns: 1fr; }
}

/* ---------- schedule ---------- */

.day {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.day__name { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 34px); color: var(--olive); margin: 0; }
.day__date {
  font-family: var(--sans); font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); margin: 2px 0 0;
}
.day__items { padding-top: 6px; }
.item { display: flex; gap: 22px; padding: 10px 0; }
.item__time  { font-family: var(--sans); font-size: 14px; letter-spacing: .06em; color: var(--muted-warm); min-width: 104px; flex: none; }
.item__title { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 23px); color: var(--ink); }
.schedule__end { border-top: 1px solid var(--line); }

@media (max-width: 780px) {
  .day { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .day__items { padding-top: 0; }
  .item { gap: 16px; }
  .item__time { min-width: 96px; }
}

/* ---------- image break ---------- */

/* Band and photo are both 3:2, so the whole frame shows at every width and
   there's no crop to tune — the band is 773px tall where the page stops
   widening (1160px). `cover` is belt-and-braces against rounding.

   This only holds while the photo is 3:2. A portrait photo here shows a
   slice of itself instead: at this width a 2:3 photo would lose more than
   half its height, so if you swap one in, change the aspect-ratio to match
   it rather than leaving the band wide. */
.break { aspect-ratio: 3 / 2; margin: clamp(38px, 5vw, 60px) 0; position: relative; overflow: hidden; }
.break__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* ---------- travel ---------- */

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 52px); }
@media (max-width: 780px) { .cols { grid-template-columns: 1fr; } }

/* ---------- dress code ---------- */

.dress { padding: clamp(58px, 8vw, 96px) var(--pad); margin-top: clamp(38px, 5vw, 60px); background: var(--panel); }
.dress__inner { max-width: 620px; margin: 0 auto; text-align: center; }
.dress__inner .prose--lg { max-width: none; }

@media (max-width: 820px) {
  .prose--lg { max-width: none; }
}

/* ---------- FAQ ---------- */

.faq details { border-top: 1px solid var(--line); padding: 6px 0; }
.faq__end { border-top: 1px solid var(--line); }

/* Sub-heading between two .faq stacks (e.g. the travel questions). */
.faq__group { margin: clamp(44px, 6vw, 64px) 4px 20px; }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 4px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.7vw, 26px);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--olive); }

/* The +/− marker is drawn in CSS so it can animate on open. */
.faq__icon { position: relative; width: 16px; height: 16px; flex: none; }
.faq__icon::before,
.faq__icon::after {
  content: ""; position: absolute; background: var(--muted);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.faq__icon::before { top: 7.5px; left: 0; width: 16px; height: 1px; }
.faq__icon::after  { left: 7.5px; top: 0; width: 1px; height: 16px; }
.faq details[open] .faq__icon::after { transform: rotate(90deg); opacity: 0; }

.faq details p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(15px, 1.8vw, 16px);
  line-height: 1.7;
  color: var(--body);
  margin: 0 4px 22px;
  max-width: 640px;
}

/* ---------- RSVP ---------- */

.rsvp {
  padding: clamp(64px, 9vw, 110px) var(--pad) clamp(72px, 10vw, 120px);
  background: var(--forest);
  color: var(--on-dark);
  margin-top: clamp(38px, 5vw, 60px);
}
.rsvp .section__head { margin-bottom: clamp(32px, 4vw, 48px); }

.rsvp__form { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.rsvp__form[hidden] { display: none; }

.field { display: block; }
.field__label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.field__input {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(239, 233, 220, .35);
  border-radius: 0;
  color: var(--on-dark-hi);
  font-family: var(--sans);
  font-size: clamp(17px, 2vw, 19px);
  padding: 8px 0;
  outline: none;
  transition: border-color .3s;
}
.field__input:focus { border-bottom-color: var(--tan); }
.field__input::placeholder { color: rgba(239, 233, 220, .38); }

/* Native select needs the appearance reset plus a hand-drawn caret to match. */
.field__input--select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--on-dark-soft) 50%),
                    linear-gradient(135deg, var(--on-dark-soft) 50%, transparent 50%);
  background-position: right 6px center, right 1px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 22px;
  cursor: pointer;
}
.field__input--select option { color: #333; background: #fff; }

.field__input--area { resize: none; font-size: clamp(16px, 1.9vw, 18px); }

/* Sits directly under the field it belongs to; the negative margin pulls it
   inside the form's 22px flex gap so it reads as part of that field. */
.field__hint {
  margin: -12px 0 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  color: var(--on-dark-soft);
}
.field__hint a { color: var(--on-dark-hi); text-underline-offset: 3px; }

/* ---------- find your invitation ---------- */

.lookup[hidden], .rsvp__rest[hidden] { display: none; }
.lookup .field__hint { margin-top: 10px; }

/* Matches for what's been typed. Usually one. */
.lookup__results { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.lookup__hit {
  text-align: left;
  padding: 15px 18px;
  background: transparent;
  border: 1px solid rgba(239, 233, 220, .35);
  color: var(--on-dark-hi);
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 20px);
  cursor: pointer;
  transition: background .3s, border-color .3s;
}
.lookup__hit:hover { background: rgba(239, 233, 220, .08); border-color: var(--tan); }

/* The second half of the form, once an invitation is chosen. Its own flex
   column so the fields keep the same rhythm as the form itself. */
.rsvp__rest { display: flex; flex-direction: column; gap: 22px; }

.chosen { font-family: var(--sans); font-size: 15px; color: var(--on-dark-body); margin: 0; }
.chosen strong { color: var(--on-dark-hi); font-weight: 400; }

.linkbtn {
  background: none; border: none; padding: 0;
  font-family: var(--sans); font-size: 14px;
  color: var(--on-dark-soft);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover { color: var(--on-dark-hi); }

.who { border: none; padding: 0; margin: 0; min-width: 0; }
.who[hidden] { display: none; }
.who legend { padding: 0; }
.who__list { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 14px; }
.check {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 16px;
  color: var(--on-dark-hi);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--tan); cursor: pointer; }

/* Invalid styling only after a submit attempt, so the form isn't red on load. */
.rsvp__form.is-validated .field__input:invalid { border-bottom-color: #D98A72; }

.btn {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .3s, background .3s, color .3s;
}
.btn:disabled { opacity: .55; cursor: default; }

.btn--send {
  align-self: center;
  margin-top: 12px;
  background: var(--tan);
  border: none;
  color: var(--forest);
  padding: 16px 44px;
}
.btn--send:hover:not(:disabled) { background: #d8c4a7; }

.btn--ghost {
  margin-top: 24px;
  background: none;
  border: 1px solid rgba(239, 233, 220, .4);
  color: var(--on-dark);
  letter-spacing: .2em;
  padding: 12px 26px;
}
.btn--ghost:hover { background: rgba(239, 233, 220, .1); }

.rsvp__done { max-width: 520px; margin: 0 auto; text-align: center; padding: 40px 0; }
.rsvp__done[hidden] { display: none; }
.rsvp__thanks { font-family: var(--serif); font-style: italic; font-size: clamp(27px, 3.8vw, 34px); color: var(--on-dark-hi); margin: 0; }
.rsvp__thanksSub { font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--on-dark-body); margin-top: 16px; }

.rsvp__error {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: #F0BFAE;
  margin: 0;
  text-align: center;
}
.rsvp__error[hidden] { display: none; }
.rsvp__error a { color: #F0BFAE; text-decoration: underline; }

/* ---------- gallery ---------- */

.gallery {
  --gallery-gap: clamp(14px, 2vw, 26px);
  padding: clamp(64px, 9vw, 110px) 0 clamp(34px, 5vw, 56px);
  background: var(--paper);
}
.gallery[hidden] { display: none; }
.gallery .section__head { padding: 0 var(--pad); }

/* The band runs edge to edge and fades out at both sides so photos
   enter and leave rather than being chopped off by the viewport. */
.gallery__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.gallery__track {
  display: flex;
  align-items: flex-start;
  gap: var(--gallery-gap);
  width: max-content;
  /* Both custom properties are measured and set by gallery.js. */
  animation: gallery-drift var(--gallery-duration, 60s) linear infinite;
  will-change: transform;
}

/* Let people stop and read a caption. */
.gallery__viewport:hover .gallery__track,
.gallery__track:focus-within { animation-play-state: paused; }

@keyframes gallery-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(var(--gallery-distance, 0px) * -1), 0, 0); }
}

.gallery__item { flex: none; margin: 0; }

.gallery__img {
  height: clamp(230px, 34vw, 400px);
  width: auto;
  object-fit: cover;
  background: var(--panel);
}

/* width:0 + min-width:100% lets the caption fill the photo's width
   without its own text width dictating how wide the frame becomes. */
.gallery__caption {
  width: 0;
  min-width: 100%;
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.45;
  color: var(--sub);
  text-align: center;
  text-wrap: pretty;
}

/* ---------- footer ---------- */

.footer { text-align: center; padding: 56px 24px; background: var(--paper); }
.footer__mark { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--olive); margin: 0; }
.footer__meta {
  font-family: var(--sans); font-size: 12px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted); margin: 10px 0 0;
}

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

  /* The blanket rule above would spin the gallery loop at .01ms rather
     than stop it. Kill the drift outright and hand the band over as a
     strip people scroll themselves. */
  .gallery__track { animation: none !important; }
  .gallery__viewport { overflow-x: auto; scrollbar-width: thin; }
}
