/* ====================================================
   KARL & DIANE — Wedding Invitation
   Design tokens
   ==================================================== */
:root{
  --ink:        #2C3320;
  --forest:     #3F4A2B;
  --olive:      #6B7A4A;
  --gold:       #B68A4E;
  --gold-soft:  #D9BD8C;
  --ivory:      #F6F2E7;
  --card:       #FFFDF8;
  --terracotta: #C97C4B;
  --line:       rgba(182,138,78,.45);
  --shadow:     0 18px 40px rgba(44,51,32,.18);
  --radius:     2px;
}

@font-face-fallback{}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}

body{
  margin:0;
  background:var(--ivory);
  color:var(--ink);
  font-family:"EB Garamond", Georgia, serif;
  font-size:1.05rem;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a{color:var(--forest); text-decoration:none;}

/* ---------- Texture / atmosphere ---------- */
.page-bg{
  position:relative;
  min-height:100vh;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,.6), transparent 60%),
    var(--ivory);
}
/* Shared background image for landing.html, details.html, venue.html,
   entourage.html, and faq.html. Used via class="page-bg page-bg-landing" */
.page-bg-landing{
  background-image:
    radial-gradient(ellipse at top, rgba(255,255,255,.3), transparent 60%),
    url("../img/bg-landing.png");
  /* Width is scaled to exactly fill the page (100%), height is
     auto — so the artwork is never stretched/distorted. It shows
     ONCE at the top (no-repeat) instead of tiling; once you scroll
     past its natural height, the plain page background (--ivory,
     set in .page-bg) takes over underneath it for the rest of the
     page. */
  background-size:100%;
  background-position:top center;
  background-repeat:no-repeat;
  background-attachment:scroll;
}
/* Mobile: swap in a portrait-cropped/optimized version of the artwork */
@media (max-width: 767px){
  .page-bg-landing{
    background-image:
      radial-gradient(ellipse at top, rgba(255,255,255,.3), transparent 60%),
      url("../img/bg-landing-mobile.png");
  }
}
.leaf-corner{
  position:fixed;
  width:clamp(140px,18vw,260px);
  opacity:.5;
  pointer-events:none;
  z-index:0;
  filter:saturate(.9);
}
.leaf-corner.tl{ top:-20px; left:-30px; transform:rotate(-8deg); }
.leaf-corner.tr{ top:-20px; right:-30px; transform:scaleX(-1) rotate(-8deg); }
.leaf-corner.bl{ bottom:-20px; left:-30px; transform:scaleY(-1) rotate(-8deg); }
.leaf-corner.br{ bottom:-20px; right:-30px; transform:scale(-1) rotate(-8deg); }

.content-wrap{
  position:relative;
  z-index:1;
  max-width:760px;
  margin:0 auto;
  padding:64px 28px 90px;
}

/* ---------- Typography ---------- */
.script{
  font-family:"Parisienne", cursive;
  font-weight:400;
  line-height:1.15;
  color:var(--ink);
}
.page-title{
  font-size:clamp(2.6rem,7vw,4rem);
  text-align:center;
  margin:0 0 .2em;
}
.eyebrow{
  font-family:"Cormorant Garamond", serif;
  font-weight:600;
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size: 1.2rem;
  color:var(--gold);
}
.section-heading{
  font-family:"Cormorant Garamond", serif;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:1.05rem;
  color:var(--forest);
  margin:2.2em 0 .5em;
}
.lede{
  text-align:center;
  font-style:italic;
  color:var(--forest);
  max-width:540px;
  margin:0 auto 2.2em;
  font-size:1.1rem;
}

/* ---------- Signature ornament: wax-seal monogram ---------- */
.seal{
  display:block;
  margin:0 auto;
}
.divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:2.6em 0;
  color:var(--gold);
}
.divider .rule{
  flex:1;
  max-width:160px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}
.divider img{ width:30px; height:30px; flex-shrink:0; }

/* ---------- Buttons & links ---------- */
.btn-vintage{
  display:inline-block;
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.82rem;
  font-weight:600;
  color:var(--forest);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px 22px;
  text-align:center;
  box-shadow:var(--shadow);
  transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-vintage:hover{
  transform:translateY(-3px);
  background:var(--forest);
  color:var(--ivory);
}
.btn-vintage .script{
  display:block;
  font-size:1.4rem;
  margin-top:2px;
  color:inherit;
}

.btn-link-back{
  display:block;
  text-align:center;
  margin-top:3em;
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:.78rem;
  color:var(--forest);
  border-bottom:1px solid var(--gold);
  width:max-content;
  margin-left:auto;
  margin-right:auto;
  padding-bottom:2px;
}
.btn-link-back:hover{ color:var(--gold); }

/* ---------- Cards ---------- */
.card-vintage{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:28px;
}

/* ---------- Placeholder illustration frames ---------- */
.illu-frame{
  border:1px solid var(--line);
  background:var(--card);
  box-shadow:var(--shadow);
  padding:6px;
  margin:0 auto 1.4em;
}
.illu-frame svg, .illu-frame img{ width:100%; display:block; }
.illu-caption{
  text-align:center;
  font-family:"Cormorant Garamond", serif;
  font-size:.85rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--olive);
  margin-bottom:1.6em;
}

.photo-placeholder{
  width:100%;
  aspect-ratio:16/9;
  background:
    repeating-linear-gradient(135deg, rgba(182,138,78,.08) 0 10px, transparent 10px 20px),
    linear-gradient(160deg,#dfe3cf,#cdd3b6);
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--forest);
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.78rem;
  text-align:center;
  padding:1em;
}

.figure-placeholder{
  flex:1;
  min-width:64px;
  aspect-ratio:2/3;
  background:linear-gradient(170deg,#e7e2cf,#cfd2ab);
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-family:"Cormorant Garamond", serif;
  font-size:.68rem;
  letter-spacing:.05em;
  color:var(--forest);
  padding:6px;
}
.figure-row{ display:flex; gap:8px; margin:0 auto 1.4em; flex-wrap:wrap; justify-content:center; }

/* ---------- Tables (rates / schedules) ---------- */
.table-vintage{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.4em;
  font-size:.92rem;
}
.table-vintage th, .table-vintage td{
  border:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
}
.table-vintage th{
  background:rgba(182,138,78,.12);
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.78rem;
  color:var(--forest);
}

/* ---------- FAQ accordion ---------- */
.faq-item{
  border-bottom:1px solid var(--line);
  padding:18px 0;
}
.faq-q{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  cursor:pointer;
  font-family:"Cormorant Garamond", serif;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:1rem;
  color:var(--forest);
}
.faq-q .plus{
  color:var(--gold);
  font-size:1.2rem;
  transition:transform .25s ease;
  flex-shrink:0;
}
.faq-item.open .faq-q .plus{ transform:rotate(45deg); }
.faq-a{
  max-height:0;
  overflow:hidden;
  transition:max-height .35s ease;
}
.faq-a-inner{ padding-top:12px; }

/* ---------- Swatches (dress code) ---------- */
.swatch-row{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:1.2em; }
.swatch{ text-align:center; }
.swatch-chip{
  width:64px; height:64px; border-radius:50%;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.5);
  margin-bottom:6px;
}
.swatch-label{
  font-family:"Cormorant Garamond", serif;
  font-size:.68rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--forest);
}
.story-link-caption{
  text-align:center;
  font-family:"Cormorant Garamond", serif;
  font-weight:600;
  font-size:.75rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--forest);
  margin:8px 0 2px;
  transition:color .25s ease;
}
.story-link:hover .story-link-caption{ color:var(--gold); }
 

/* ---------- Timeline ---------- */
.timeline{
  border:1px solid var(--line);
  background:var(--card);
  padding:28px 24px;
  box-shadow:var(--shadow);
}
.timeline-item{
  display:flex;
  align-items:center;
  gap:16px;
  padding:10px 0;
  position:relative;
}
.timeline-item:not(:last-child)::after{
  content:"";
  position:absolute;
  left:14px;
  top:34px;
  bottom:-10px;
  width:1px;
  background:var(--gold-soft);
}
.timeline-dot{
  width:10px; height:10px; border-radius:50%;
  border:2px solid var(--gold);
  background:var(--card);
  flex-shrink:0;
  z-index:1;
}
.timeline-label{ font-family:"Cormorant Garamond",serif; font-weight:600; letter-spacing:.04em; color:var(--ink); }
.timeline-time{ margin-left:auto; color:var(--olive); font-style:italic; font-size:.92rem; }

/* ---------- Hub buttons (landing page) — now image-based,
   same pattern as the collage Details badge ---------- */
.hub-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:2em;
  align-items:center;
  justify-items:center;   /* ← add this */
}
.hub-grid .nav-btn-img{
  display:block;
  transition:transform .25s ease;
}
.hub-grid .nav-btn-img:hover{ transform:translateY(-4px); }
.hub-grid .nav-btn-img img{
  display:block;
  width:200px;
  height:auto;
  filter:drop-shadow(0 10px 18px rgba(20,25,10,.3));
}
@media (max-width:560px){
  .hub-grid{ grid-template-columns:1fr; max-width:260px; margin-left:auto; margin-right:auto; }
}

/* ---------- Scroll reveal ---------- */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }

/* ---------- Misc ---------- */
.qr-block{
  width:160px;
  margin:0 auto;
  text-align:center;
}
.qr-block .photo-placeholder{ aspect-ratio:1/1; margin-bottom:6px; }

.entourage-cols{ display:grid; grid-template-columns:1fr 1fr; gap:4px 24px; }
@media (max-width:560px){ .entourage-cols{ grid-template-columns:1fr; } }
 
@media (max-width:560px){
  .secondary-sponsors .col-4{ flex:0 0 100%; width:100%; max-width:100%; margin-bottom:1em; }
  .secondary-sponsors .col-4:last-child{ margin-bottom:0; }
}
.entourage-cols p{ margin:.25em 0; }
.entourage-cols .role, .secondary-sponsors .role{
  font-family:"Cormorant Garamond", serif;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:.8rem;
  color:var(--gold);
  margin-top:1em;
}

.kv-list p{ text-align:center; margin:.2em 0; }
.sponsor-pairs{
  column-count:2;
  column-gap:24px;
}
.sponsor-pairs .sponsor-pair{
  break-inside:avoid;
  -webkit-column-break-inside:avoid;
  margin-bottom:.9em;
  text-align:center;
}
.sponsor-pairs .sponsor-pair p{ margin:.2em 0; }

@media (max-width:560px){
  .sponsor-pairs{ column-count:1; }
}

/* ====================================================
   WELCOME / ENVELOPE PAGE (index.html)
   ==================================================== */
.envelope-screen{
  min-height:100vh;
  width:100%;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:48px 24px;
  /* placeholder background photo/texture (swap assets/img/bg-welcome.jpg
     with your real image) — gradients on top act as a dark tint so
     text stays readable regardless of what photo you drop in */
  background-image:
    radial-gradient(circle at 30% 20%, rgba(110,128,80,.45), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(60,40,20,.45), transparent 55%),
    linear-gradient(160deg, rgba(31,42,22,.82) 0%, rgba(44,58,28,.82) 45%, rgba(35,48,24,.82) 100%),
    url("../img/12513.webp");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-attachment:scroll;
}
.envelope-screen .leaf-corner{ opacity:.65; filter:none; }
.envelope-leaves-scatter{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.5;
}
.envelope-leaves-scatter img{
  position:absolute;
  width:120px;
}
.envelope-content{
  position:relative;
  z-index:1;
  text-align:center;
  max-width:560px;
}
.envelope-content .script{
  color:#F6F2E7;
  font-size:clamp(2.6rem,8vw,4.2rem);
  margin-bottom:.5em;
  text-shadow:0 4px 24px rgba(0,0,0,.35);
}
.envelope-link{
  display:inline-block;
  text-decoration:none;
  cursor:pointer;
}
.envelope{
  position:relative;
  width:min(86vw,500px);
  aspect-ratio:5/3.6;
  margin:0 auto;
  transition:transform .35s ease, box-shadow .35s ease;
  filter:drop-shadow(0 22px 38px rgba(0,0,0,.45));
}
.envelope-link:hover .envelope{ transform:translateY(-6px); }
.envelope-body{
  position:absolute;
  inset:0;
  background:#5B6A2F;
  border-radius:3px;
}
.envelope-flap{
  position:absolute;
  top:0; left:0; right:0;
  height:62%;
  background:#4D5C27;
  clip-path:polygon(0 0, 100% 0, 50% 80%);
}
.envelope-fold-l{
  position:absolute;
  left:0; top:0; bottom:0; width:52%;
  background:rgba(0,0,0,.08);
  clip-path:polygon(0 0, 100% 50%, 0 100%);
}
.envelope-fold-r{
  position:absolute;
  right:0; top:0; bottom:0; width:52%;
  background:rgba(0,0,0,.08);
  clip-path:polygon(100% 0, 0 50%, 100% 100%);
}
.envelope-date{
  position:absolute;
  top:10%;
  left:0; right:0;
  text-align:center;
  color:#F6F2E7;
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-size:.78rem;
  z-index:2;
}
.envelope-seal{
  position:absolute;
  bottom:18%;
  left:50%;
  transform:translateX(-50%);
  width:64px; height:64px;
  z-index:3;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.envelope-cta{
  position:absolute;
  bottom:7%;
  left:0; right:0;
  text-align:center;
  color:#F6F2E7;
  font-family:"Cormorant Garamond", serif;
  letter-spacing:.2em;
  text-transform:uppercase;
  font-size:.7rem;
  z-index:3;
}

.envelope img{
  width: 100%;
  height: 100%;
}

/* ====================================================
   LANDING HERO COLLAGE (landing.html)
   Pure-CSS responsive layout — NO JavaScript involved.
   .collage-wrap uses aspect-ratio to lock its height to
   its width, so every child's left/top/width below (all
   in %) scales together at any screen size automatically,
   including mobile — no JS resize listener needed.

   Reference design canvas: 800 x 880.
   To reposition a piece: take your desired px coordinate
   on that canvas and convert —
     left%  = px / 800 * 100
     top%   = px / 880 * 100
     width% = px / 800 * 100

   Each box sets WIDTH only; the <img> uses height:auto,
   so the photo's own aspect ratio is always preserved
   (never cropped or squeezed) — width is always exactly
   what you specify, regardless of the photo's shape.

   Overlap between pieces is intentional — do not add
   overflow:hidden anywhere in this block.

   Filenames used in landing.html:
     - collage-envelope.png  (envelope, open flap)
     - collage-message.png   (green "Dearest gentle readers" card)
     - collage-date.png      (white date card)
     - collage-details.png   ("Click for the Details" badge)
   ==================================================== */
.collage-outer{
  position:relative;
  width:calc(100% + 56px);
  margin:2em -28px 3em;
}
@media (min-width:817px){
  /* once content-wrap hits its own 760px max-width, the
     -28px/+56px bleed (matched to its padding) stops being
     enough to look bigger — switch to true viewport-width
     breakout here instead (the mobile scrollbar-width quirk
     that makes 100vw unreliable is a touch-device-only issue) */
  .collage-outer{
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
  }
}
.collage-wrap{
  position:relative;
  width:100%;
  max-width:1080px;
  margin:0 auto; /* centers the clamped width — independent of
                     the breakout math above, so it's always
                     correct regardless of viewport size */
  aspect-ratio:800/900;
}
.collage-wrap > *{
  position:absolute;
}
.collage-wrap img{
  display:block;
  width:100%;
  height:auto;

}

/* envelope, date card, and badge all share a true 50%
   horizontal center — left% = 50% - (width%/2) */
.collage-envelope{
  left:27.5%; top:3%; width:45%;
  z-index:1;
}
/* message card: overlaps in from the left, in front of envelope */
.collage-message{
  left:13%; top:42%; width:39%;
  z-index:2;
}
.collage-date{
  left:49%; top:35%; width:37.5%;
  z-index:3;
}
.collage-badge{
  left:53%; top:79%; width:30%;
  z-index:4;
  display:block;
  transition:transform .25s ease;
}
.collage-badge:hover{ transform:translateY(-4px); }
