/* ============================================================
   JA@60 — shared design system
   Midnight navy and gold, taken straight from the asoebi: blue is the
   colour of the day, so it carries the whole site rather than sitting in
   one section. Gold is the only accent.
   ============================================================ */
:root {
  --ink:      #04070E;
  --navy-900: #070C1A;
  --navy-800: #0B1326;
  --navy-700: #111C36;

  --gold:       #C8A44D;
  --gold-light: #E7CE8E;
  --gold-deep:  #8C6B24;

  --cream: #F4EFE4;

  --w-90: rgba(255,255,255,0.90);
  --w-70: rgba(255,255,255,0.70);
  --w-55: rgba(255,255,255,0.55);
  --w-40: rgba(255,255,255,0.40);
  --w-14: rgba(255,255,255,0.14);
  --w-08: rgba(255,255,255,0.08);

  --g-30: rgba(200,164,77,0.30);
  --g-18: rgba(200,164,77,0.18);

  --display: 'Bamboly Demo', 'Playfair Display', serif;
  --serif:   'Playfair Display', Georgia, serif;
  --ui:      'Poppins', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shell: min(1180px, 100% - 3rem);
}

@media (min-width: 768px) { :root { --shell: min(1180px, 100% - 8rem); } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--navy-900);
  color: var(--w-70);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* Film grain over everything */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- PRIMITIVES ---------- */
.shell { width: var(--shell); margin-inline: auto; }

.eyebrow {
  font-family: var(--ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: clamp(0.6rem, 1.6vw, 0.72rem);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.eyebrow::before, .eyebrow::after {
  content: '';
  height: 1px;
  width: clamp(1.5rem, 6vw, 3.5rem);
  background: linear-gradient(90deg, transparent, var(--g-30));
}
.eyebrow::after { background: linear-gradient(90deg, var(--g-30), transparent); }
.eyebrow.plain::before, .eyebrow.plain::after { display: none; }

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  color: #fff;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.section-title em { font-style: italic; font-weight: 500; color: var(--gold-light); }

/* Line-by-line mask reveal for headings */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.line-mask > span {
  display: block;
  transform: translateY(115%);
  transition: transform 1.05s var(--ease);
  transition-delay: var(--ld, 0ms);
}

.in .line-mask > span, .line-mask.in > span { transform: none; }

.lede {
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  line-height: 1.75;
  color: var(--w-55);
  max-width: 46ch;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* A reveal that only unmasks its own children, without shifting the block */
.reveal.static-block { transform: none; }

/* ---------- BUTTONS ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-family: var(--ui);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  padding: 1.15rem 2.6rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  box-shadow: 0 10px 34px -12px rgba(200,164,77,0.6);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.btn span { position: relative; z-index: 2; }

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.85s var(--ease);
}

.btn:hover { box-shadow: 0 18px 44px -12px rgba(200,164,77,0.7); }
.btn:hover::after { transform: translateX(120%); }

.btn.ghost {
  background: transparent;
  color: var(--w-90);
  border: 1px solid var(--w-14);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--g-30); color: #fff; box-shadow: none; }

/* ---------- TOP BAR + SCROLL PROGRESS ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease),
              border-color 0.5s var(--ease), padding 0.5s var(--ease);
}

.topbar.stuck {
  background: rgba(7, 12, 26, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--w-08);
  padding-block: 0.8rem;
}

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 95;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.monogram {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.monogram .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: breathe 3.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--gold); }
  50%      { opacity: 0.45; box-shadow: 0 0 3px var(--gold); }
}

.topbar-right { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }

.topbar-tag {
  font-family: var(--ui);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--w-40);
  display: none;
}
@media (min-width: 620px) { .topbar-tag { display: block; } }

.topbar-cta {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--g-30);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.topbar-cta:hover { background: var(--gold); color: var(--ink); }

/* ---------- CHIPS / DEADLINES ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--w-55);
  border: 1px solid var(--w-08);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  white-space: nowrap;
}

.chip.locked { color: var(--w-40); border-style: dashed; }
.chip svg { width: 11px; height: 11px; fill: currentColor; opacity: 0.8; }

.deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--g-18);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

/* ---------- NOTICE ----------
   The house rules that have to be impossible to miss: the celebration is
   adults only, and an RSVP belongs to the person who made it. Used in the
   RSVP form and again on the confirmation page. */
.notice {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid var(--g-18);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  padding: 0.95rem 1.1rem;
  background: rgba(200,164,77,0.05);
}

.notice + .notice { margin-top: 0.7rem; }

.notice svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice p {
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--w-70);
  margin: 0;
}

.notice b {
  display: block;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

/* ---------- RSVP PASS ----------
   One RSVP, one code, one name. Shown in the modal to anybody who has
   already RSVPed, and at the top of the confirmation page. */
.pass {
  border: 1px solid var(--g-30);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(200,164,77,0.07), rgba(0,0,0,0.28));
  padding: clamp(1.2rem, 3.5vw, 1.6rem);
  text-align: left;
}

.pass-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--g-18);
}

.pass-code {
  display: block;
  margin: 1rem 0 0.25rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  letter-spacing: 0.09em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1;
}

.pass-name {
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--w-90);
}

.pass-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-top: 1rem;
}

.pass-meta span {
  font-family: var(--ui);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--w-55);
  border: 1px solid var(--w-08);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.pass-foot {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--g-18);
  font-family: var(--body);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--w-40);
}

/* ---------- MARQUEE ---------- */
.marquee {
  position: relative;
  width: 100%;
  background: var(--ink);
  border-block: 1px solid var(--g-18);
  overflow: hidden;
  padding: clamp(1.1rem, 3vw, 1.7rem) 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 38s linear infinite;
  width: max-content;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  padding-right: clamp(1.4rem, 4vw, 2.6rem);
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--cream);
  user-select: none;
  flex-shrink: 0;
}

.marquee-item .outline { color: transparent; -webkit-text-stroke: 1px var(--gold); }

.marquee-item .sep {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(2.5rem, 10vw, 9rem);
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--navy-900);
  border-top: 1px solid var(--w-08);
  padding: clamp(3rem, 8vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.footer-grid { display: flex; flex-direction: column; gap: 1.6rem; align-items: center; text-align: center; }

@media (min-width: 760px) {
  .footer-grid { flex-direction: row; justify-content: space-between; text-align: left; }
}

.footer-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: #fff; }

.footer-name small {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w-40);
}

.footer-tags {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-bottom {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--w-08);
  text-align: center;
  font-family: var(--ui);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

/* ---------- MUSIC ---------- */
.music-player {
  position: fixed;
  bottom: clamp(1.1rem, 3vw, 1.9rem);
  right: clamp(1.1rem, 3vw, 1.9rem);
  z-index: 150;
}

#music-toggle {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--w-14);
  color: var(--gold-light);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

#music-toggle:hover { background: rgba(200,164,77,0.14); border-color: var(--g-30); transform: scale(1.06); }
#music-toggle svg { width: 15px; height: 15px; fill: currentColor; }

#music-toggle::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0;
}

#music-toggle.playing::after { animation: pulse-ring 2.6s var(--ease) infinite; }

@keyframes pulse-ring {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.55); }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .line-mask > span { transform: none; }
}
