/* ============================================================
   WEDDING — style.css
   Shared between seating.html and index.html (RSVP)
   Palette: sage, cream, warm beige, light brown
   ============================================================ */

:root {
  --sage:        #8aab89;
  --sage-dark:   #5e7f5d;
  --sage-light:  #c8dbc7;
  --beige:       #f5ede0;
  --beige-dark:  #e4d3be;
  --brown:       #8b6748;
  --brown-light: #c9a882;
  --cream:       #fdf9f4;
  --text:        #4a3728;
  --text-soft:   #9a8070;
  --shadow:      rgba(74, 55, 40, 0.10);
  --radius:      16px;

  --font-sans:   "Gill Sans Nova", "Gill Sans MT", "Gill Sans", Optima, Candara, sans-serif;
  --font-serif:  "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* ── Animations ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Body ───────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background-color: var(--beige);
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text);
}

/* ── Page wrap (seating page) ───────────────────────── */
.page-wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 0;
  animation: fadeIn 0.8s ease both;
}

/* ── Main card (seating page) ───────────────────────── */
.card {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 36px 28px 40px;
  box-shadow: 0 4px 24px var(--shadow);
}

/* ── Header ─────────────────────────────────────────── */
.header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 7vw, 34px);
  color: var(--brown);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.subtitle {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* ── Search area ────────────────────────────────────── */
.search-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--beige-dark);
  border-radius: 50px;
  background: var(--beige);
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder {
  color: var(--brown-light);
  font-style: italic;
}

input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138, 171, 137, 0.2);
  background: #fff;
}

button {
  width: 100%;
  padding: 13px 28px;
  border: none;
  border-radius: 50px;
  background: var(--sage-dark);
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(94, 127, 93, 0.3);
  transition: background 0.2s, box-shadow 0.2s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  background: #4e6e4d;
  box-shadow: 0 4px 14px rgba(94, 127, 93, 0.38);
}

button:active {
  transform: scale(0.97);
  box-shadow: 0 1px 6px rgba(94, 127, 93, 0.25);
}

/* ── Result area ────────────────────────────────────── */
#result {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Found: result card ─────────────────────────────── */
.result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 2px 10px var(--shadow);
  animation: popIn 0.35s cubic-bezier(0.34, 1.46, 0.64, 1) both;
}

.table-badge {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--beige);
  border: 1px solid var(--beige-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.badge-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  line-height: 1;
}

.badge-number {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.1;
}

.result-info { flex: 1; min-width: 0; }

.result-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-desc {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ── Not found card ─────────────────────────────────── */
.not-found-card {
  background: var(--cream);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  animation: popIn 0.3s ease both;
}

.not-found-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--brown);
  margin-bottom: 6px;
}

.not-found-card p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ── Multiple matches label ─────────────────────────── */
.matches-header {
  text-align: center;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Footer name ────────────────────────────────────── */
.footer-deco {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--brown-light);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ── Footer illustration block (seating page) ────────── */
.footer-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 36px 0 56px;
  animation: fadeInUp 1s ease 0.4s both;
}

.footer-illustration__label {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.footer-illustration img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  opacity: 0.82;
}

/* Seating page footer spacing */
.page-wrap .footer-deco {
  margin-top: 24px;
}


/* ============================================================
   RSVP PAGE — index.html additions
   ============================================================ */

/* ── Body override for RSVP (full-width, no flex centering) ── */
body.rsvp-page {
  display: block;
  background-color: var(--beige);
  max-width: 100%;
}

/* ── Scroll reveal ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 520px;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__bg-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  display: block;
  background-color: #3a3630;
}

@media (max-width: 559px) {
  .hero__bg {
    object-position: center center;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 24, 18, 0.00) 0%,
    rgba(30, 24, 18, 0.30) 50%,
    rgba(30, 24, 18, 0.60) 100%
  );
}

.hero__text {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 52px;
  width: 100%;
}

.hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.80);
  margin-bottom: 12px;
}

.hero__names {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(38px, 10vw, 64px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #fff !important;
}

.hero__date {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.75);
}

/* ── INVITE outer wrapper ───────────────────────────── */
.invite-outer {
  width: 100%;
  background-color: var(--beige);
  display: flex;
  justify-content: center;
}

/* ── INVITE (portrait + copy) ───────────────────────── */
.invite {
  background: var(--cream);
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* ── Portrait container ─────────────────────────────── */
.invite__portrait {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--beige-dark);
  flex-shrink: 0;
  box-shadow: 0 3px 16px rgba(74, 55, 40, 0.12);
}

.invite__portrait picture {
  display: block;
  width: 100%;
  height: 100%;
}

.invite__portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center center; /* desktop default */
}

/*
 * Fix 1 — Mobile crop: shift object-position down so the middle-to-lower
 * portion of body-pic-3.jpg is visible instead of the top.
 * "center 65%" anchors the focal point 65% down the image height,
 * pulling subjects into the visible frame on the 4:3 mobile crop.
 */
@media (max-width: 559px) {
  .invite__portrait-img {
    object-position: center 65%;
  }
}

.invite__copy {
  flex: 1;
  padding: 0 4px;
}

.invite__headline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 6vw, 38px);
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 20px;
}

.invite__subtext {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 0;
  font-style: italic;
  /*
   * Fix 2 — Desktop copy width: cap the paragraph so it doesn't
   * stretch across the full remaining column width at large viewports.
   * This also naturally tightens the void to the right of the text.
   */
  max-width: 480px;
}

/* Desktop: side-by-side */
@media (min-width: 560px) {
  .invite {
    flex-direction: row;
    /*
     * Fix 2 — Desktop vertical alignment: change from flex-start to center
     * so the copy column sits optically paired with the image rather than
     * anchoring to the top and leaving a dead zone below the paragraph.
     */
    align-items: center;
    padding: 72px 64px;
    gap: 48px;
  }

  .invite__portrait {
    max-width: 240px;
    aspect-ratio: 3 / 4;
    box-shadow: none;
    border-radius: 4px;
    /* flex-shrink: 0 already set above — portrait never squashes */
  }

  .invite__copy {
    padding: 0;
  }
}

/* ── SCHEDULE ─────────────────────────────────────────── */
.schedule {
  position: relative;
  width: 100%;
  padding: 72px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  overflow: hidden;

  background-image: url('assets/body-pic-4.jpg');
  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
}

@media (min-width: 560px) {
  .schedule {
    background-position: center 85%;
  }
}

.schedule__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 10, 0.52);
}

.schedule__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.schedule__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 7vw, 42px);
  margin-bottom: 48px;
  letter-spacing: 0.01em;
  color: #fff !important;
}

.timeline {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
  transform: translateX(-50%);
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: center;
  gap: 0 12px;
  padding: 16px 0;
  position: relative;
}

@media (max-width: 559px) {
  .timeline__item {
    padding: 22px 0;
  }
  .schedule__title {
    margin-bottom: 56px;
  }
}

.timeline__item:nth-child(odd) .timeline__time  { text-align: right; order: 1; }
.timeline__item:nth-child(odd) .timeline__dot   { order: 2; }
.timeline__item:nth-child(odd) .timeline__event { text-align: left;  order: 3; }

.timeline__item:nth-child(even) .timeline__event { text-align: right; order: 1; }
.timeline__item:nth-child(even) .timeline__dot   { order: 2; }
.timeline__item:nth-child(even) .timeline__time  { text-align: left;  order: 3; }

.timeline__time {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.timeline__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown-light);
  border: 2px solid rgba(255, 255, 255, 0.4);
  justify-self: center;
  flex-shrink: 0;
}

.timeline__event {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.3;
}

/* ── FORM SECTION ─────────────────────────────────────── */
.form-section {
  background: var(--beige);
  padding: 72px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-section__header {
  text-align: center;
  margin-bottom: 36px;
}

.form-section__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 6vw, 34px);
  color: var(--brown);
  letter-spacing: 0.01em;
}

.form-card {
  width: 100%;
  max-width: 620px;
  background: var(--cream);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px var(--shadow);
  overflow: hidden;
}

.form-card iframe {
  display: block;
  width: 100%;
  height: 820px;
  border: none;
}

/* ── SITE FOOTER (RSVP page) ─────────────────────────── */
.site-footer {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 40px;
  border-top: 1px solid var(--beige-dark);
}

.site-footer .footer-deco {
  margin-top: 0;
}