/* Farah & Bassem — wedding website stylesheet */

:root {
  --ivory: #fbf6ef;
  --ivory-deep: #f4ebdf;
  --cream: #f8f1e7;
  --gold: #a9782c;
  --gold-light: #c9a05a;
  --gold-pale: #e6d3ae;
  --ink: #5b4631;
  --ink-soft: #7a6550;
  --blue: #c9d7e6;
  --blue-deep: #b7c8db;
  --pink: #f0c7d1;
  --peach: #f6cfb5;
  --sage: #c6d2bd;
  --fuchsia: #b8336a;
  --script: "Pinyon Script", "Great Vibes", cursive;
  --display: "Gilda Display", "Cormorant Garamond", Georgia, serif;
  --body: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--fuchsia); }
img { max-width: 100%; display: block; }

.script { font-family: var(--script); font-weight: 400; color: var(--gold); }
.display { font-family: var(--display); font-weight: 400; }
.caps {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  color: var(--gold);
}
.center { text-align: center; }

/* ---------- Envelope opening screen ---------- */
#envelope {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  background-color: #dbe5ef;
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(170,190,212,.45), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.42 0 0 0 0 0.52 0 0 0 .16 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  transition: opacity 1.1s ease, visibility 1.1s;
}
#envelope.open { opacity: 0; visibility: hidden; pointer-events: none; }
#envelope img {
  width: min(78vw, 560px);
  filter: drop-shadow(0 24px 40px rgba(60,80,110,.28));
  transition: transform .5s ease;
}
#envelope:hover img { transform: translateY(-6px) scale(1.01); }
#envelope .tap {
  margin-top: 1.2rem;
  font-family: var(--script);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  color: var(--gold);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .75; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* ---------- Hero / invitation ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--ivory) url("img/hero.jpg") center top / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  /* top padding clears the chandelier, which occupies the top ~24% of the backdrop image */
  padding: max(27vw, 34vh) 1.25rem 5rem;
}
.hero .card { max-width: 620px; margin: 0 auto; }
.hero .names {
  font-size: clamp(3.2rem, 9.5vw, 6rem);
  line-height: 1.1;
  margin: .4rem 0 .6rem;
  white-space: nowrap;
}
.hero .caps { font-size: clamp(.68rem, 1.6vw, .82rem); line-height: 1.9; }
.hero .when {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: clamp(.85rem, 2vw, 1.05rem);
  line-height: 1.9;
  color: var(--ink);
}
.hero .when sup { font-size: .55em; letter-spacing: .05em; }
.hero .when a { color: var(--ink); border-bottom: 1px solid var(--gold-pale); }
.hero .when a:hover { color: var(--gold); border-color: var(--gold); }

.rule {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin: 1.4rem auto; color: var(--gold); max-width: 320px;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .75; }
.rule svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.2; }

.btn {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .78rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: .85rem 1.9rem;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
  transition: background .3s, color .3s, transform .3s;
}
.btn:hover { background: var(--gold); color: #fff; transform: translateY(-1px); }
.btn.solid { background: var(--gold); color: #fff; }
.btn.solid:hover { background: var(--fuchsia); border-color: var(--fuchsia); }
.rsvp-note { margin-top: .9rem; font-style: italic; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Countdown banner ---------- */
.countdown {
  background: linear-gradient(90deg, var(--blue) 0%, #e5ecf3 50%, var(--blue) 100%);
  padding: 1.6rem 1rem;
  text-align: center;
}
.countdown .caps { color: var(--ink-soft); margin-bottom: .6rem; display: block; }
.countdown .units { display: flex; justify-content: center; gap: clamp(1.2rem, 5vw, 3rem); }
.countdown .unit { min-width: 56px; }
.countdown .num {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
  color: var(--ink);
}
.countdown .lbl { font-family: var(--display); text-transform: uppercase; letter-spacing: .18em; font-size: .62rem; color: var(--gold); margin-top: .35rem; }
.countdown .married { font-family: var(--script); font-size: 2rem; }

/* ---------- Generic section ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }
.wrap { max-width: 900px; margin: 0 auto; }
.section h2.display { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .25rem; }
.section .sub { margin: 0 0 2.5rem; }

/* Welcome note */
.note { background: var(--cream); }
.note .script { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1.1; margin: .2rem 0 .3rem; }
.note p.body { max-width: 820px; margin: 1.6rem auto 0; font-size: 1.2rem; line-height: 1.75; }

/* Celebration: dress code + evening */
.celebrate { background: var(--ivory); }
.celebrate .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; max-width: 860px; margin: 0 auto; }
.celebrate h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .6rem; }
.celebrate p { margin: 0; font-size: 1.15rem; }
.timeline { list-style: none; padding: 0; margin: .4rem 0 0; }
.timeline li {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .85rem;
  padding: .55rem 0; border-bottom: 1px solid var(--gold-pale);
  display: flex; align-items: center; gap: .8rem;
}
.timeline li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.timeline li:last-child { border-bottom: 0; }

/* Travel grid */
.travel { background: var(--cream); text-align: center; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 760px; margin: 0 auto 2.2rem; }
.card-link {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 190px; padding: 1.6rem 1rem 1.2rem;
  border: 1px solid var(--gold-light);
  border-radius: 14px;
  background: rgba(255,255,255,.35);
  color: var(--gold);
  transition: transform .3s, box-shadow .3s, background .3s;
}
.card-link:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(169,120,44,.14); background: rgba(255,255,255,.7); color: var(--gold); }
.card-link svg { width: 64px; height: 64px; stroke: var(--gold); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: auto; }
.card-link span { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; line-height: 1.6; margin-top: 1rem; }

/* Sunset */
.sunset {
  position: relative;
  min-height: 78vh;
  background: url("img/sunset.jpg") center / cover no-repeat;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 11vh;
}
.sunset h2 {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 7rem);
  color: #8c6420; margin: 0;
  text-shadow: 0 2px 18px rgba(255,255,255,.55);
}

footer {
  background: var(--ivory-deep);
  text-align: center; padding: 2rem 1rem;
  font-size: .95rem; color: var(--ink-soft);
}
footer .script { font-size: 1.8rem; }

/* ---------- Inner (travel) pages ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem;
  background: var(--ivory);
  border-bottom: 1px solid var(--gold-pale);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-family: var(--script); font-size: 1.7rem; color: var(--gold); line-height: 1; }
.topbar .back { font-family: var(--display); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; }

.page-head {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.25rem 2.5rem;
  background: linear-gradient(180deg, var(--cream), var(--ivory));
}
.page-head svg { width: 64px; height: 64px; stroke: var(--gold); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 1rem; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5.5vw, 3.1rem); margin: 0 0 .3rem; }

.content { max-width: 760px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.content h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 2.6rem 0 .8rem; color: var(--ink); }
.content h2:first-child { margin-top: 1rem; }
.content h3 { font-family: var(--display); font-weight: 400; font-size: 1.2rem; letter-spacing: .04em; margin: 1.6rem 0 .3rem; color: var(--gold); }
.content p { margin: 0 0 1rem; }
.content ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.content li { margin-bottom: .55rem; }
.content li strong, .content p strong { font-weight: 600; color: var(--ink); }
.callout {
  border-left: 3px solid var(--fuchsia);
  background: #fbf0f3;
  padding: .9rem 1.2rem; margin: 1.4rem 0;
  border-radius: 0 8px 8px 0;
}
.callout.blue { border-color: var(--blue-deep); background: #eef3f8; }
.callout.sage { border-color: #9fb393; background: #eff3ec; }
.callout.peach { border-color: #e2a884; background: #fcf1ea; }

.pager {
  max-width: 760px; margin: 0 auto; padding: 0 1.25rem 4rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.pager a { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; }
.pager .all { text-align: center; width: 100%; order: 3; }

.guide-toc { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0 auto 2rem; max-width: 760px; padding: 0 1.25rem; }
.guide-toc a { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; border: 1px solid var(--gold-pale); padding: .5rem .9rem; border-radius: 20px; }
.guide-toc a:hover { border-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 17.5px; }
  .hero { padding-top: 38vh; min-height: 92vh; background-position: center top; }
  .hero .names { white-space: normal; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .card-link { min-height: 160px; }
  .celebrate .grid { grid-template-columns: 1fr; gap: 2rem; }
  .sunset { min-height: 60vh; padding-top: 9vh; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card-link span { font-size: .66rem; }
}
@media (prefers-reduced-motion: reduce) {
  #envelope .tap { animation: none; }
  html { scroll-behavior: auto; }
}
