/* ============================================================
   MAIN — structure & layout only.
   Every color, font, and texture comes from tokens.css.
   Don't put design-language decisions here.
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--scale-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: 1.12;
  margin: 0 0 0.6em;
}

em { font-style: var(--display-italic-style); }

a { color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Gate ---------------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--wash);
  color: var(--wash-ink);
  text-align: center;
}

.gate[hidden] { display: none; }

.gate-card { max-width: 26rem; }

.gate-emoji { font-size: 3rem; margin: 0 0 0.5rem; }

.gate-title { font-size: 2.6rem; }

.gate-sub { color: var(--wash-ink-soft); margin-bottom: 1.6rem; }

#gate-form {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

#gate-input {
  flex: 1 1 12rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-small);
  border: none;
  font: inherit;
  text-align: center;
  background: var(--field-bg);
  color: var(--field-ink);
}

#gate-input:focus { outline: 3px solid var(--accent-2); }

#gate-form button {
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-small);
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent-2);
  color: var(--accent-2-ink);
}

.gate-hint { min-height: 1.5em; margin-top: 1rem; color: var(--wash-ink-soft); }

.gate.gate-leaving { opacity: 0; transition: opacity 0.7s ease; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .gate.gate-leaving { transition: none; }
}

.gate-card.shake { animation: shake 0.4s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ---------------- Layout ---------------- */

.section {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4.5rem 1.4rem;
}

.section h2 { font-size: var(--scale-h2); }

.section-tinted {
  max-width: none;
  background: var(--paper-tint);
}

.section-tinted > * {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

/* Wider content lane for sections that need room (e.g. the two-column FAQ). */
.section-wide > * {
  max-width: 58rem;
  margin-left: auto;
  margin-right: auto;
}

.lede { font-size: 1.15em; }

.fine { color: var(--ink-soft); font-size: 0.95em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
}

/* ---------------- Hero ---------------- */

.hero {
  max-width: none;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--wash);
  color: var(--wash-ink);
  padding: 5rem 1.4rem 3.5rem;
}

.hero-title {
  font-size: var(--scale-hero);
  max-width: 15em;
  margin-bottom: 0.4em;
}

.hero-meta {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.hero-sub { color: var(--wash-ink-soft); margin: 0 0 2.2rem; }

.countdown {
  display: flex;
  gap: 1.6rem;
  margin-bottom: 2.5rem;
}

.count-unit { display: flex; flex-direction: column; align-items: center; }

.count-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: var(--display-weight);
  line-height: 1;
}

.count-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  margin-top: 0.4rem;
  color: var(--wash-ink-soft);
}

.scroll-cue {
  color: var(--wash-ink);
  text-decoration: none;
  font-size: 1.6rem;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------------- Cards ---------------- */

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.2rem;
  margin: 2rem 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.6rem 1.5rem;
}

.card h3 { font-size: 1.35rem; }

.card p:last-child { margin-bottom: 0; }

.card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: var(--display-weight);
  color: var(--accent);
  margin: 0 0 0.3rem;
}

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

.steps {
  padding-left: 1.4rem;
  margin: 2rem auto;
}

.steps li { margin-bottom: 1.3rem; }

.steps li::marker {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  color: var(--accent);
}

.todo {
  background: var(--accent-2);
  color: var(--accent-2-ink);
  border-radius: var(--radius-small);
  padding: 0.1em 0.5em;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------- Fitting room (theme try-on bar; dev chrome, theme-neutral) ---------------- */

.fitting-room {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 1rem);
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  background: rgba(18, 14, 26, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5);
}

.fitting-room button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #fff;
}

.fitting-room button.active {
  background: #fff;
  color: #16121f;
}

/* ---------------- Villa ---------------- */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 2.4rem;
}

.feature-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--paper-tint);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.photo-slot {
  margin: 0;
  aspect-ratio: 4 / 3;
  border: var(--slot-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  background: var(--paper-tint);
}

.photo-slot-wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ---------------- Travel tips ---------------- */

.tip-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
}

.tip-list li {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-small);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.7rem;
}

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

.faq {
  margin-top: 2.2rem;   /* top only — sides stay auto-centered by the section rules */
  display: grid;
  grid-template-columns: 1fr;   /* phones: one column */
  gap: 1.6rem;
}

@media (min-width: 720px) {
  .faq {
    grid-template-columns: 1fr 1fr;   /* computers: side by side */
    gap: 1.9rem 2.6rem;
  }
}

.faq-item { margin: 0; }

.faq-item dt {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.faq-item dd { margin: 0; color: var(--ink-soft); }

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

.footer {
  background: var(--wash);
  color: var(--wash-ink);
  text-align: center;
  padding: 4rem 1.4rem 4.5rem;
}

.footer p { margin: 0.2rem 0; }

.footer-big { font-size: 2.4rem; margin-bottom: 0.8rem; }

.footer-names {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 2rem;
}

.footer-meta { color: var(--wash-ink-soft); margin-top: 0.9rem; font-size: 0.9rem; }

/* ---------------- Reveal on scroll ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--reveal-time) ease, transform var(--reveal-time) ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
}
