:root {
  --paper: #FBFAF6;
  --ink: #33291F;
  --maroon: #7D2027;
  --rust: #873100;
  --olive: #998731;
  --gold: #D3A345;
  --blue: #7397A3;
  --sky: #9FC6CF;

  --display: 'Ojuju', sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;

  --gutter: clamp(18px, 4vw, 56px);
  --mat: clamp(4px, 0.5vw, 4px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

.matted {
  background: var(--sky);
  padding: var(--mat);
}

/* ================= SITE HEADER ================= */
.hero {
  padding: clamp(20px, 4vw, 36px) var(--gutter);
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--sky);
}

.names-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 22px);
  color: var(--maroon);
}

.names-lockup .name {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

.names-lockup .icon-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 3.2vw, 32px);
  height: clamp(22px, 3.2vw, 32px);
  color: var(--gold);
  flex-shrink: 0;
}

.names-lockup .icon-divider svg {
  width: 100%;
  height: 100%;
}

/* ================= PASSWORD GATE (RIGHT TO LEFT ANIMATION) ================= */
#gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  overflow: hidden;
  will-change: transform;
}

.gate-photo-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/passwordgate.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(105%);
  transition: filter 2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: filter;
}

.gate-scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 16, 0.55);
  transition: background 1.2s ease;
}

.gate-card {
  position: relative;
  z-index: 2;
  width: min(580px, 100%);
  background: transparent;
  padding: 0;
  box-shadow: none;
  text-align: center;
  color: #fff;
  transition: opacity 0.5s ease, transform 0.6s ease;
}

.gate-inner {
  background: transparent;
  padding: 0;
  text-align: center;
  color: #fff;
}

.gate-lockup {
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  /* Offsets the trailing letter-spacing after the last letter so it centers truly */
  padding-left: 0.04em; 
}

.gate-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 420px; /* Tightens the input + button width to align with JUSTIN + LIKHITA */
  margin: 0 auto;   /* Keeps the form dead center */
}

.gate-lockup .icon-divider {
  color: var(--gold);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.gate-meta {
  font-size: 12px;
  letter-spacing: 0.18em;
  line-height: 2;
  color: #fff;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  margin: 0 0 26px;
}

.gate-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.gate-form input {
  flex: 1 1 220px;
  min-width: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.gate-form input::placeholder {
  color: #777;
}

.gate-form button {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: var(--maroon);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease;
}

.gate-form button:hover {
  background: var(--rust);
}

.gate-hint {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  margin: 18px 0 0;
}

.gate-error {
  display: none;
  font-size: 13px;
  color: #fff;
  background: var(--maroon);
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin: 16px 0 0;
  padding: 9px 12px;
}

.gate-error.show {
  display: block;
}

/* Phase 1: Slow Color Reveal */
#gate.gate-color-reveal .gate-photo-bg {
  filter: grayscale(0%) contrast(100%);
}

#gate.gate-color-reveal .gate-scrim {
  background: rgba(20, 24, 16, 0.25);
}

#gate.gate-color-reveal .gate-card {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

/* Phase 2: Slide Horizontally from Right to Left */
#gate.gate-slide-left {
  transform: translateX(-100%);
  transition: transform 1.8s cubic-bezier(0.77, 0, 0.175, 1);
  pointer-events: none;
}

/* ================= MULTI-PAGE TAB NAVIGATION ================= */
#site[hidden] {
  display: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--sky);
  display: flex;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 34px);
  padding: 14px var(--gutter);
  overflow-x: auto;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding-bottom: 2px;
  font-family: var(--display);
  font-size: 19.5px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom-color 0.2s;
}

.nav-btn:hover {
  color: var(--rust);
}

.nav-btn.active {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}

/* ================= PAGE CONTAINER & PAGES ================= */
.content-pages {
  min-height: 65vh;
}

.page {
  display: none;
  animation: fadeIn 0.35s ease-in-out;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= HOME PAGE ================= */
.intro {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 1.25fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start; 
  max-width: 1440px;  
  margin: 0 auto;
  padding: clamp(36px, 5vw, 80px) var(--gutter);
}

.hero-frame-wrapper {
  max-width: 540px;    /* Allows the photo to display significantly larger */
  margin: 0;
  width: 100%;
}

.lede {
  max-width: 58ch;     /* Broadens the paragraph line length */
  font-size: 18px;
  margin: 0 0 24px;
}

.frame {
  aspect-ratio: 4/5;
  overflow: hidden;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--olive);
}

.frame .ph {
  width: 100%;
  height: 100%;
  background: var(--olive);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.date {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--ink);
}

.place {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
  color: var(--maroon);
}

.lede {
  max-width: 46ch;
  margin: 0 0 22px;
}

.rule {
  height: 1px;
  background: var(--sky);
  border: 0;
  margin: 26px 0;
}

.stats-list {
  margin: 0;
}

.stat {
  display: flex;
  gap: 14px;
  font-size: 20px;
  margin: 0 0 6px;
}

.stat dt {
  color: var(--blue);
  min-width: 9ch;
  flex: none;
}

.stat dd {
  margin: 0;
}

/* ================= SCHEDULE / OTHER PAGES ================= */
.section {
  padding: clamp(40px, 7vw, 86px) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(30px, 5.5vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: var(--maroon);
}

.schedule {
  position: relative;
  border-top: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url('images/tiles.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.schedule h2 {
  color: #fff;
  text-shadow: 0 2px 14px rgba(20, 26, 12, 0.45);
}

.days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 26px);
}

.days.two-days {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
}

.day {
  background: var(--sky);
  padding: var(--mat);
  min-width: 0;
}

.day-in {
  background: var(--olive);
  color: #fff;
  padding: clamp(20px, 2.6vw, 30px);
  height: 100%;
}

/* Location row styling */
.day-venue {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.venue-label {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.venue-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
}

.day:nth-child(2) .day-in {
  background: var(--maroon);
}

.day:nth-child(3) .day-in {
  background: var(--blue);
}

.day .dow {
  font-size: 24px;
  letter-spacing: 0.18em;
  color: var(--sky);
  margin: 0;
}

.day .num {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  margin: 2px 0 18px;
}

.day ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.day li {
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

.day li span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.schedule .note {
  margin: 22px 0 0;
  font-size: 13px;
  max-width: 60ch;
  color: #fff;
  text-shadow: 0 2px 10px rgba(20, 26, 12, 0.5);
}

.page-text-content .info-block {
  max-width: 680px;
  font-size: 18px;
  line-height: 1.8;
}

footer {
  border-top: 1px solid var(--sky);
  padding: clamp(30px, 5vw, 54px) var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--blue);
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 820px) {
  .intro {
    grid-template-columns: 1fr;
  }
  .days,
  .days.two-days {
    grid-template-columns: 1fr;
  }
  .nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gate,
  .gate-photo-bg,
  .gate-card,
  .page {
    transition: none !important;
    animation: none !important;
  }
}

/* ================= CONTACT PAGE 2-COLUMN LAYOUT ================= */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.contact-frame-wrapper {
  width: 100%;
  max-width: 440px;
  min-width: 0;
}

.contact-text {
  min-width: 0;
}

.contact-text h2 {
  margin-top: 0;
}

@media (max-width: 820px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-frame-wrapper {
  width: 100%;
  max-width: 360px; /* Forces the container to stay capped even if the raw photo file is huge */
  min-width: 0;
}

.contact-frame-wrapper .frame {
  aspect-ratio: 2 / 3;
  width: 100%;
  overflow: hidden;
}

.contact-frame-wrapper .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= SCHEDULE STYLING & HIERARCHY ================= */
.days.two-days {
  max-width: 100%;
}

.day li.event-item {
  padding: 18px 0;
  display: flex;
  flex-direction: column;
}

/* 1. Event Title: Larger, bold display font */
.day li span.event-name {
  font-family: var(--display);
  font-size: clamp(26px, 2.5vw, 32px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 6px;
}

/* 2. Body Text (Time): Larger and clearly readable */
.day li span.event-time {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--sky);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* 3. Body Text (Dress Code): Scaled up tag style */
.day li span.event-dress {
  font-family: var(--mono);
  font-size: 13px;
  color: #ffffff;
  opacity: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.28);
  padding: 5px 10px;
  max-width: 100%;
  width: fit-content;
  border-radius: 3px;
}

/* ================= LOCATION PROMINENCE ================= */
.day-venue {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.venue-label {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
}

.venue-name {
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.2;
}

/* ================= TRAVEL PAGE 2-COLUMN LAYOUT ================= */
.travel-layout {
  display: grid;
  /* Reduced max-width slightly to keep a tall vertical portrait well-proportioned */
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.travel-frame-wrapper {
  width: 100%;
}

.travel-frame-wrapper .frame {
  aspect-ratio: 2 / 3; /* Tall rectangular vertical portrait */
}

.travel-text h2 {
  margin-top: 0; /* Ensures the heading and photo share the exact same top baseline */
}

/* Fallback placeholder matching homepage */
.travel-frame-wrapper .frame .ph {
  width: 100%;
  height: 100%;
  background: var(--olive);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* Stack into a single column on smaller screens */
@media (max-width: 820px) {
  .travel-layout {
    grid-template-columns: 1fr;
  }

  .travel-frame-wrapper {
    max-width: 460px;
  }
}

/* ================= POPUP / WELCOME MODAL ================= */
.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 24, 16, 0.65);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--sky);
  padding: clamp(24px, 4vw, 40px);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(12px);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

.modal-title {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 28px);
  color: var(--maroon);
  line-height: 1.2;
  margin: 0 0 12px;
}

.modal-desc {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
  color: var(--ink);
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(51, 41, 31, 0.25);
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: 2px solid var(--rust);
}

.modal-submit-btn {
  width: 100%;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 12px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease;
}

.modal-submit-btn:hover {
  background: var(--rust);
}

.form-success {
  margin-top: 14px;
  font-size: 14px;
  color: var(--olive);
  font-weight: 600;
  text-align: center;
}

/* ================= STAY PAGE 2-COLUMN LAYOUT & HIGHLIGHT ================= */
.stay-layout {
  display: grid;
  /* Left column is now the wider photo (up to 560px), right column is text */
  grid-template-columns: minmax(340px, 560px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.stay-text {
  min-width: 0;
}

.stay-text h2 {
  margin-top: 0;
}

.stay-frame-wrapper {
  width: 100%;
  max-width: 560px;
  min-width: 0;
}

.stay-frame-wrapper .frame {
  aspect-ratio: auto;
  width: 100%;
  overflow: hidden;
}

.stay-frame-wrapper .frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Bold display font highlight for venue names inline */
.venue-highlight {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.8em;
  line-height: 1;
  color: var(--maroon);
  letter-spacing: 0.02em;
}

@media (max-width: 820px) {
  .stay-layout {
    grid-template-columns: 1fr;
  }
}