/* =====================================================================
   WEDDING SAMPLE SITE — THEMING LAYER
   ---------------------------------------------------------------------
   This is a non-deployed DEMO. To re-theme the whole site, edit ONLY
   the variables in :root below. Everything else cascades from them.

   WHAT TO CHANGE:
   - Colors:  --color-* values (hex). Default palette is sage green +
              warm ivory + muted gold. Swap to dusty rose, navy, etc.
   - Fonts:   --font-display (the elegant serif) and --font-body (the
              clean sans). If you change them, also update the Google
              Fonts <link> in index.html to load the new families.
   - Spacing/scale: --space-section and --maxw tune rhythm + width.

   The couple names, date, venue and photos are PLACEHOLDERS and live in
   index.html (search for "PLACEHOLDER"). The countdown target date is
   set in script.js (WEDDING_DATE).
   ===================================================================== */

:root {
  /* --- COLOR PALETTE (sage + ivory + muted gold) --- */
  --color-primary:   #6f7d5e;  /* sage green — headings, primary accents */
  --color-primary-2: #56624a;  /* deeper sage — hover / strong text */
  --color-accent:    #b89b5e;  /* muted gold — fine lines, flourishes */
  --color-cream:     #f6f1e7;  /* warm ivory — page background */
  --color-cream-2:   #efe7d7;  /* slightly deeper ivory — alt sections */
  --color-ink:       #3a3a34;  /* soft near-black — body text */
  --color-muted:     #8a857a;  /* muted taupe — secondary text */
  --color-white:     #fffdf9;  /* card surfaces */
  --color-line:      #e3dac8;  /* hairline borders */

  /* --- TYPE --- */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Jost", "Helvetica Neue", Arial, sans-serif;

  /* --- LAYOUT --- */
  --maxw: 1080px;
  --space-section: clamp(4rem, 9vw, 8rem);
  --radius: 4px;
  --shadow: 0 18px 50px rgba(58, 58, 52, 0.10);
}

/* ---------------------- RESET / BASE ---------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-primary-2);
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* gold flourish underline under section headings */
.flourish::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin: 1.1rem auto 0;
  background: var(--color-accent);
}

/* ---------------------- LAYOUT HELPERS ---------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--space-section) 0; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 0.6rem; }
.lead { color: var(--color-muted); max-width: 46ch; margin: 1rem auto 0; }
.alt-bg { background: var(--color-cream-2); }

/* ---------------------- NAV ---------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem;
}
.nav-mono {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.04em;
  color: var(--color-primary-2);
}
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--color-ink); transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-primary); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  font-size: 1.5rem; color: var(--color-primary-2);
}

/* ---------------------- HERO ---------------------- */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--color-white);
  /* Soft sage-to-gold wash. The couple's photo sits framed above the names
     (see .hero-photo) rather than behind the text, so nothing covers their faces. */
  background:
    linear-gradient(rgba(58,58,52,0.12), rgba(58,58,52,0.18)),
    linear-gradient(135deg, #7d8a6c 0%, #5a6450 45%, #b89b5e 130%);
  background-size: cover; background-position: center;
  padding: 6rem 1.5rem;
}
.hero-inner { max-width: 760px; }
/* Matted, gold-lined square frame around the couple's photo. */
.hero-figure {
  position: relative; margin: 2rem auto 2.4rem;
  width: clamp(240px, 62vw, 400px);
  padding: 14px; background: rgba(246,241,231,0.94);
  box-shadow: 0 22px 55px rgba(40,40,32,0.38);
}
.hero-figure img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
}
/* thin gold inner line, inset from the mat edge */
.hero-figure::after {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--color-accent); pointer-events: none;
}
.hero .eyebrow { color: #e8dcc0; }
.hero h1 {
  color: var(--color-white);
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 500; margin: 1rem 0; letter-spacing: 0.01em;
}
.hero h1 .amp { font-style: italic; color: #e8dcc0; font-size: 0.7em; }
.hero-meta {
  text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.85rem; color: #f1ead9;
}
.hero-divider { width: 1px; height: 46px; background: #e8dcc0; margin: 1.8rem auto; opacity: 0.7; }

/* countdown */
.countdown { display: flex; gap: 1.4rem; justify-content: center; margin: 2.4rem 0 2rem; flex-wrap: wrap; }
.cd-unit { min-width: 68px; }
.cd-num {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1; color: var(--color-white);
}
.cd-label {
  display: block; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.2em; margin-top: 0.5rem; color: #e8dcc0;
}
.btn {
  display: inline-block; margin-top: 0.5rem;
  padding: 0.85rem 2.2rem; border-radius: var(--radius);
  background: var(--color-accent); color: #2c2a22;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem;
  font-weight: 600; transition: transform 0.2s, background 0.2s;
}
.btn:hover { background: #c9ab69; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--color-accent); color: var(--color-primary-2); }
.btn-outline:hover { background: var(--color-accent); color: #2c2a22; }

/* ---------------------- STORY ---------------------- */
.story-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.story-grid p + p { margin-top: 1rem; }
.story-grid .lead { margin-left: 0; text-align: left; }

/* PHOTO SLOT placeholder treatment */
.photo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--color-cream-2), #d9cfb6);
  border: 1px solid var(--color-line);
  display: flex; align-items: center; justify-content: center;
  min-height: 360px; color: var(--color-muted);
}
.photo span {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; text-align: center; padding: 1rem;
}
.photo--tall { min-height: 460px; }

/* ---------------------- DETAILS CARDS ---------------------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.card {
  background: var(--color-white); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 2.4rem 2rem; box-shadow: var(--shadow);
  text-align: center;
}
.card h3 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.card .card-kind { color: var(--color-accent); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.7rem; }
.card dl { margin-top: 1.4rem; text-align: left; }
.card dt { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--color-muted); margin-top: 1rem; }
.card dd { font-size: 1.02rem; }
.map-embed {
  margin-top: 1.6rem; height: 150px; border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, var(--color-cream-2) 0 12px, var(--color-cream) 12px 24px);
  border: 1px dashed var(--color-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em;
}

/* ---------------------- TIMELINE ---------------------- */
.timeline { max-width: 620px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 110px; top: 6px; bottom: 6px;
  width: 1px; background: var(--color-line);
}
.tl-item { display: grid; grid-template-columns: 96px 1fr; gap: 2rem; padding: 1.1rem 0; position: relative; }
.tl-time { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-primary); text-align: right; }
.tl-item::before {
  content: ""; position: absolute; left: 105px; top: 1.6rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid var(--color-cream);
}
.tl-body h4 { font-size: 1.25rem; }
.tl-body p { color: var(--color-muted); font-size: 0.94rem; }

/* ---------------------- RSVP FORM ---------------------- */
.rsvp-card {
  max-width: 640px; margin: 0 auto; background: var(--color-white);
  border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 3rem); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
/* Per-guest cards inside the RSVP form */
.guest-card {
  background: var(--color-cream); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 1.2rem 1.2rem 0.2rem;
  margin-bottom: 1.2rem;
}
.guest-card .field input, .guest-card .field select { background: var(--color-white); }
.guest-kind {
  font-family: var(--font-display); font-size: 1.15rem; font-style: italic;
  color: var(--color-primary); margin-bottom: 0.9rem;
}
.field { margin-bottom: 1.2rem; }
.field label {
  display: block; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--color-muted); margin-bottom: 0.45rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.9rem; font-family: var(--font-body);
  font-size: 0.95rem; color: var(--color-ink);
  background: var(--color-cream); border: 1px solid var(--color-line);
  border-radius: var(--radius); transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--color-primary);
}
.field textarea { resize: vertical; min-height: 90px; }
.rsvp-card .btn { width: 100%; border: none; cursor: pointer; margin-top: 0.4rem; }
.rsvp-confirm {
  display: none; text-align: center; padding: 1rem 0;
}
.rsvp-confirm.show { display: block; }
.rsvp-confirm .mark {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1.2rem;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.rsvp-confirm h3 { font-size: 2rem; margin-bottom: 0.4rem; }
.rsvp-confirm p { color: var(--color-muted); }

/* ---------------------- REGISTRY ---------------------- */
.registry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.registry-card {
  background: var(--color-white); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 2.2rem 1.4rem; text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.registry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.registry-card .logo {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--color-primary-2);
  margin-bottom: 0.6rem;
}
.registry-card p { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 1.2rem; }

/* ---------------------- TRAVEL ---------------------- */
.hotel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.hotel {
  display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem;
  background: var(--color-white); border: 1px solid var(--color-line);
  border-radius: var(--radius); overflow: hidden;
}
.hotel .photo { min-height: 100%; border: none; border-radius: 0; }
.hotel .photo span { font-size: 0.6rem; }
.hotel-body { padding: 1.4rem 1.4rem 1.4rem 0; }
.hotel-body h4 { font-size: 1.35rem; }
.hotel-body p { font-size: 0.88rem; color: var(--color-muted); }
.hotel-body .tag { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--color-accent); }

/* ---------------------- FAQ ---------------------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--color-line); padding: 1.2rem 0;
}
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-display);
  font-size: 1.35rem; color: var(--color-primary-2);
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-accent); font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--color-muted); margin-top: 0.8rem; padding-right: 2rem; }

/* ---------------------- FOOTER ---------------------- */
.footer { text-align: center; padding: var(--space-section) 1.5rem 3rem; background: var(--color-cream-2); }
.footer-photo {
  width: clamp(200px, 60vw, 360px); aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 8px; display: block; margin: 0 auto 2.4rem;
  border: 6px solid var(--color-white);
  box-shadow: 0 16px 40px rgba(40,40,32,0.18);
}
.footer .mono { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--color-primary-2); }
.footer .footer-amp { font-style: italic; color: var(--color-accent); }
.footer p { color: var(--color-muted); margin-top: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.74rem; }
.footer .credit { margin-top: 2rem; font-size: 0.66rem; letter-spacing: 0.12em; opacity: 0.7; }

/* ---------------------- SCROLL REVEAL ---------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--color-cream);
    border-bottom: 1px solid var(--color-line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 460px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.9rem; border-top: 1px solid var(--color-line); }
  .nav-toggle { display: block; }

  .story-grid, .cards, .hotel-grid { grid-template-columns: 1fr; }
  .registry-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .timeline::before { left: 86px; }
  .tl-item { grid-template-columns: 74px 1fr; gap: 1.2rem; }
  .tl-item::before { left: 81px; }
  .timeline::before { left: 80px; }
}
