/* Trent & Loly — wedding site
   Palette + type scale mirror the Zola "Mirador / light gray" theme. */

:root {
  --bg: #e6e6e6;
  --card: #dcdcdc;
  --heading: #746673;
  --body: #716370;
  --accent: #746673;
  --accent-hover: #5f525e;
  --on-accent: #ffffff;
  --line: rgba(116, 102, 115, 0.25);

  --font-display: "Gilda Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Fluid type: scales smoothly between phone (~375px) and desktop (~1440px). */
  --fs-site-title: clamp(2.1rem, 1.6rem + 2.2vw, 3.125rem);   /* 34 → 50px */
  --fs-hero-name: clamp(2.6rem, 1.4rem + 5.2vw, 5.3rem);      /* 42 → 85px */
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.125rem);             /* 32 → 50px */
  --fs-h3: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);             /* 26 → 40px */
  --fs-body: 1rem;
  --fs-small: 0.8125rem;

  --gutter: clamp(16px, 4vw, 40px);
  --content: 760px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* belt-and-braces: nothing can force sideways scroll */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--heading);
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---------- Header / nav ---------- */

.site-header {
  text-align: center;
  padding: clamp(18px, 3vw, 28px) var(--gutter) 0;
}

.site-title {
  font-size: var(--fs-site-title);
  text-decoration: none;
  color: var(--body);
  font-family: var(--font-display);
  display: inline-block;
}

.site-nav ul {
  list-style: none;
  margin: clamp(8px, 1.2vw, 14px) 0 0;
  padding: 0 0 clamp(10px, 1.4vw, 14px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px clamp(14px, 2.4vw, 26px);
  font-size: 0.875rem;
}

.site-nav a {
  text-decoration: none;
  display: inline-block;
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--heading); }

/* ---------- Photo marquee (home) ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(340px, 58vw, 940px);
  background: #cfcfcf;
}

.marquee__track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: marquee 30s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.marquee__track img {
  height: 100%;
  width: auto;
  max-width: none;
  flex: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

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

.intro {
  text-align: center;
  padding: clamp(60px, 9vw, 120px) var(--gutter) clamp(40px, 6vw, 80px);
}

.intro__art {
  width: min(851px, 92vw);
  margin: 0 auto clamp(28px, 4vw, 60px);
}
.intro__art img { width: 100%; height: auto; }

.intro__name { font-size: var(--fs-hero-name); }

.intro__and {
  font-size: var(--fs-small);
  margin: clamp(10px, 2vw, 24px) 0;
}

.intro__date {
  font-size: var(--fs-h2);
  margin-top: clamp(56px, 9vw, 120px);
}

.intro__place {
  font-size: var(--fs-small);
  margin: 12px 0 0;
}

.countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: var(--fs-small);
  margin: 22px 0 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;              /* comfortable tap target on phones */
  min-width: 164px;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font: 600 0.875rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
}
.btn--ghost:hover { background: rgba(116, 102, 115, 0.08); color: var(--accent-hover); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.intro .btn { margin-top: clamp(36px, 5vw, 56px); }

/* ---------- Inner pages ---------- */

.page {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 110px) var(--gutter) clamp(48px, 7vw, 90px);
  text-align: center;
}

.page p { margin: 0.6em 0; }

.prewrap { white-space: pre-line; }

.day + .day { margin-top: clamp(56px, 8vw, 90px); }
.day__title { font-size: var(--fs-h2); margin-bottom: clamp(18px, 3vw, 28px); }

.entry + .entry { margin-top: clamp(48px, 7vw, 72px); }

.entry__icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  color: var(--heading);
}

.entry__kind { font-size: var(--fs-small); margin-bottom: 4px; }

.entry__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--heading);
  margin-bottom: 4px;
}

.entry__title--display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h3);
}

.entry__meta { font-size: var(--fs-small); }
.entry__meta a { text-underline-offset: 3px; font-weight: 600; }

.entry__note { font-size: 0.875rem; }

.callout {
  font-size: var(--fs-small);
  font-style: italic;
}

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

.card {
  background: var(--card);
  border-radius: 14px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 6vw, 80px);
  max-width: 728px;
  margin: 0 auto;
  text-align: center;
}

.field {
  display: block;
  text-align: left;
  margin: 0 auto;
  max-width: 360px;
}

.field + .field { margin-top: 16px; }

.field__label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--heading);
}

.input,
textarea.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9c4c8;
  border-radius: 3px;
  background: #fff;
  color: #3d353c;
  /* 16px minimum stops iOS Safari from zooming the page on focus */
  font: 16px/1.4 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
}
textarea.input { min-height: 88px; resize: vertical; }

.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.hint { font-size: 0.6875rem; margin-top: 6px; opacity: 0.85; }

.error {
  color: #9b3a4a;
  font-size: 0.875rem;
  min-height: 1.4em;
  margin: 12px 0 0;
}

.guest {
  text-align: left;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.guest:first-of-type { border-top: 0; padding-top: 6px; }

.guest__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--heading);
  margin: 0 0 10px;
}

.guest__plusone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.event-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 0;
}
.event-choice + .event-choice { border-top: 1px dashed var(--line); }

.event-choice__label { font-size: 0.9375rem; }
.event-choice__label small { display: block; font-size: 0.75rem; opacity: 0.85; }
.event-choice__label { flex: 1 1 0; min-width: 200px; }
.event-choice__details { margin-top: 4px; font-style: italic; max-width: 46ch; }

.seg {
  display: inline-flex;
  border: 1px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
  flex: none;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  min-width: 92px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg label + input + label { border-left: 1px solid var(--accent); }
.seg input:checked + label { background: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + label { outline: 2px solid var(--heading); outline-offset: -4px; }

.questions {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 4px;
}
.questions .field { max-width: none; }

.step[hidden] { display: none !important; }

.summary {
  text-align: left;
  display: inline-block;
  margin: 16px auto 0;
  font-size: 0.9375rem;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.choices {
  display: grid;
  gap: 10px;
  max-width: 360px;
  margin: 18px auto 0;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 40px var(--gutter) 48px;
  font-size: 0.75rem;
}
.site-footer .script {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--heading);
  display: block;
  margin-bottom: 4px;
}

/* ---------- Scroll reveal (only when JS is on) ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Phones ---------- */

@media (max-width: 480px) {
  .guest__plusone { grid-template-columns: 1fr; }
  .event-choice { flex-direction: column; align-items: stretch; }
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .btn-row .btn { flex: 1 1 140px; min-width: 0; }
}

/* ---------- Respect "reduce motion" ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .marquee__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
