/* ESTEFAN Studio Invites: shared structure. Themes set the variables
   and add their own character in theme.css. */

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #2b2530;
  --muted: #6b6270;
  --accent: #7a5ea8;
  --accent-ink: #ffffff;
  --line: rgba(43, 37, 48, 0.14);
  --font-display: Georgia, serif;
  --font-body: system-ui, sans-serif;
  --font-script: var(--font-display);
  --radius: 18px;
  --measure: 34rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body:not(.is-open) { overflow: hidden; height: 100svh; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Cover / opening screen */
.inv-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.inv-cover__open {
  position: absolute;
  left: 50%;
  bottom: max(9vh, 48px);
  transform: translateX(-50%);
  z-index: 3;
  font: inherit;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.inv-cover__open:focus-visible, .inv-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.is-open .inv-cover { pointer-events: none; }
body.is-gone .inv-cover { display: none; }

/* Sections */
.inv-main { position: relative; z-index: 1; }
.inv-section {
  padding: clamp(64px, 12vw, 120px) 24px;
  text-align: center;
}
.inv-section > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.inv-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.1;
  margin: 0 auto 28px;
}
.inv-text { color: var(--muted); margin: 0 auto 24px; }
.inv-eyebrow {
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 auto 20px;
  color: var(--muted);
}
.inv-names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(52px, 15vw, 104px);
  line-height: 1;
  margin: 0 auto 24px;
}
.inv-date { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 0 auto 28px; }
.inv-intro { color: var(--muted); margin: 0 auto; }

/* Countdown */
.inv-countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 26rem;
}
.inv-countdown__grid div {
  padding: 16px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.inv-countdown__grid span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.inv-countdown__grid small { color: var(--muted); font-size: 12px; letter-spacing: .08em; }

/* Event cards */
.inv-events__list { display: grid; gap: 16px; }
.inv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
}
.inv-card__label { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 0 0 4px; }
.inv-card__time { letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin: 0 0 16px; color: var(--accent); }
.inv-card__venue { margin: 0; font-weight: 500; }
.inv-card__address { margin: 0 0 20px; color: var(--muted); }
.inv-calendar { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.inv-calendar__label { width: 100%; margin: 0; color: var(--muted); font-size: 14px; }

/* Buttons */
.inv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s;
}
.inv-btn:hover { transform: translateY(-1px); }
.inv-btn--ghost { background: transparent; color: var(--accent); }
.inv-btn--small { padding: 9px 16px; font-size: 11px; }
.inv-btn[disabled] { opacity: .6; cursor: progress; }

/* Dress code swatches */
.inv-swatches { list-style: none; padding: 0; display: flex; gap: 10px; justify-content: center; }
.inv-swatches li { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 1px solid var(--line); }

/* Gifts */
.inv-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.inv-copy__label { grid-column: 1; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.inv-copy__value { grid-column: 1; font-family: inherit; font-size: 17px; word-break: break-all; }
.inv-copy .inv-btn { grid-column: 2; grid-row: 1 / span 2; }

/* Gallery */
.inv-gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 44rem; }
.inv-gallery__grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }

/* RSVP form */
.inv-form { text-align: left; display: grid; gap: 18px; }
.inv-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.inv-field > span, .inv-field legend { font-size: 13px; letter-spacing: .06em; color: var(--muted); padding: 0; }
.inv-field input, .inv-field select, .inv-field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  width: 100%;
}
.inv-field input:focus, .inv-field select:focus, .inv-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.inv-choice { display: grid; gap: 8px; }
.inv-choice label {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.inv-form:not(.xm-form):not(.hv-form):not(.gl-form):not(.gn-form):not(.wd-form) .inv-choice input {
  appearance: none; -webkit-appearance: none; flex: none; box-sizing: border-box; margin: 0; padding: 0;
  width: 20px !important; height: 20px !important; border-radius: 50% !important; border: 1.5px solid currentColor; background: transparent !important; opacity: .7; cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.inv-form:not(.xm-form):not(.hv-form):not(.gl-form):not(.gn-form):not(.wd-form) .inv-choice input:checked { opacity: 1; border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 42%, transparent 47%) !important; }
.inv-form:not(.xm-form):not(.hv-form):not(.gl-form):not(.gn-form):not(.wd-form) .inv-choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv-form:not(.xm-form):not(.hv-form):not(.gl-form):not(.gn-form):not(.wd-form) .inv-choice label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.inv-form.is-no .inv-if-yes { display: none; }
.inv-if-yes { display: grid; gap: 18px; }
.inv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inv-form__status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--accent); }
.inv-form .inv-btn { justify-self: center; }
.inv-reveal {
  margin-top: 8px;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.inv-reveal__title { font-family: var(--font-display); font-size: 26px; margin: 0 0 8px; }
.inv-reveal__code { font-size: 28px; letter-spacing: .12em; margin: 8px 0; color: var(--accent); }

/* Closing + credit */
.inv-closing__text { font-family: var(--font-display); font-size: 24px; line-height: 1.35; }
.inv-closing__names { font-family: var(--font-script); font-size: 40px; margin-top: 16px; }
.inv-credit { text-align: center; padding: 24px 16px 40px; font-size: 12px; letter-spacing: .08em; }
.inv-credit a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }

/* Reveal sections as they scroll in */
.js .inv-section > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .inv-section.is-visible > * { opacity: 1; transform: none; }

@media (min-width: 720px) {
  .inv-events__list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 44rem; }
  .inv-gallery__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .inv-section > * { opacity: 1; transform: none; }
}

/* Fade in on scroll for the custom layouts (added by base.js) */
.rv { opacity: 0; translate: 0 22px; transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), translate 1.1s cubic-bezier(.2,.7,.2,1); }
.rv.rv-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; translate: none; transition: none; } }

/* "Scroll down" hint on video covers */
.inv-scroll { position: absolute; left: 50%; bottom: 3.5%; z-index: 4; transform: translate(-50%, 8px); display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff; text-decoration: none; font: 500 13px/1 "Cormorant SC", Georgia, serif; letter-spacing: .22em; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 0 14px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .9s ease, transform .9s ease; }
.inv-scroll i { width: 12px; height: 12px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); animation: inv-bob 1.8s ease-in-out infinite; }
.inv-scroll.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.inv-scroll.is-on.is-away { opacity: 0; pointer-events: none; }
@keyframes inv-bob { 50% { translate: 0 5px; } }
@media (prefers-reduced-motion: reduce) { .inv-scroll i { animation: none; } }
.inv-scroll { padding: 9px 16px 8px; border-radius: 999px; background: rgba(30, 24, 20, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: none; }
.inv-scroll i { filter: none; width: 9px; height: 9px; margin-top: -2px; }
