:root {
  --cream: #fdf1dc;
  --cream2: #f9e3bb;
  --gold: #c8941f;
  --gold-light: #f2cf6b;
  --gold-dark: #8a5f0a;
  --ink: #2b2112;
  --blue: #1747c9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

/* progress bar */
#progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold));
  z-index: 200;
}

/* canvases */
#sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
#fx       { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* nav */
#nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; gap: 4px; padding: 5px;
  max-width: calc(100% - 20px); overflow-x: auto; white-space: nowrap;
  background: rgba(253, 241, 220, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--gold-light); border-radius: 999px;
  box-shadow: 0 6px 20px rgba(138, 95, 10, .2);
  scrollbar-width: none;
}
#nav::-webkit-scrollbar { display: none; }
#nav a {
  color: var(--gold-dark); text-decoration: none; font-size: .85rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; transition: background .25s, color .25s;
}
#nav a:hover { background: rgba(242, 207, 107, .45); }
#nav a.active { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #3a2704; }

section {
  position: relative; z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  padding: 90px 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 22px;
}
.frame {
  margin: 16px;
  padding: 56px 28px;
  width: calc(100% - 32px);
  max-width: 1400px;
  will-change: transform, opacity;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.small { font-size: .85rem; color: #7a6538; }

.gold-text {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.script { font-family: 'Great Vibes', cursive; }
.serif  { font-family: 'Playfair Display', serif; }

/* ---------- reveal ---------- */
/* Nakatago lang ang .reveal kapag gumagana ang JS (class "js" sa <html>).
   Kapag nag-fail ang script.js, lalabas pa rin ang buong content. */
.reveal {
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--delay, 0ms);
}
.js .reveal { opacity: 0; will-change: opacity, transform; }
.js .reveal.up    { transform: translateY(50px); }
.js .reveal.down  { transform: translateY(-40px); }
.js .reveal.left  { transform: translateX(-90px); }
.js .reveal.right { transform: translateX(90px); }
.js .reveal.zoom  { transform: scale(.75); }
.js .reveal.up,
.js .reveal.down,
.js .reveal.right,
.js .reveal.zoom  { transform: translateX(-90px); }
.js .reveal.show  { opacity: 1; transform: none; }
/* programme: isa-isa, slide galing kaliwa/kanan */
.js .reveal.one.left  { transform: translateX(-120px); }
.js .reveal.one.right { transform: translateX(-120px); }
.js .reveal.one.show  { transform: none; }
.timeline { overflow-x: clip; }

/* tilt + parallax (inner wrappers so they don't fight .reveal) */
.tilt { transition: transform .25s ease, box-shadow .25s ease; transform-style: preserve-3d; }
.tilt:hover { box-shadow: 0 18px 40px rgba(138,95,10,.32); }
.parallax { transition: transform .2s ease-out; will-change: transform; }

/* ---------- hero ---------- */
.logos { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center; }
.logo-box { text-align: center; }
.logo-box .name1 { font-family: 'Playfair Display'; font-weight: 900; font-style: italic; color: var(--blue); font-size: 1.6rem; letter-spacing: 1px; }
.logo-box .name1 small { display: block; font-size: 1.05rem; font-weight: 500; }
.logo-box .name2 { font-family: 'Playfair Display'; font-weight: 900; color: #153e8f; font-size: 2rem; letter-spacing: 6px; }
.logo-box .name2 small { display: block; font-size: .85rem; letter-spacing: 2px; color: #e6781e; }
.logo-sep { width: 1px; height: 100px; background: var(--gold); }
.logo-img { display: block; height: 130px; width: auto; max-width: 100%; }

h1.title { font-size: clamp(3.4rem, 12vw, 8rem); line-height: 1.12; padding: .04em .1em .12em; }
h1.title .year { font-family: 'Playfair Display'; font-weight: 900; font-size: .75em; letter-spacing: 4px; }
.theme {
  font-family: 'Playfair Display'; font-weight: 900;
  font-size: clamp(1.1rem, 3.2vw, 2rem);
  letter-spacing: 2px; text-transform: uppercase; max-width: 800px; margin: 0 auto;
}
.theme span { display: block; font-size: .8em; }
.divider { width: min(320px, 70%); height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); position: relative; margin: 0 auto; }
.divider::after { content: "❖"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--cream); padding: 0 10px; color: var(--gold); }

.click-hint { color: var(--gold-dark); font-size: .95rem; margin-top: 8px; }
.scroll-hint { margin-top: 14px; font-size: .9rem; letter-spacing: 3px; color: var(--gold-dark); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* ---------- details ---------- */
h2.sec-title { font-family: 'Playfair Display'; font-weight: 900; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: 3px; text-transform: uppercase; }
.info-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); width: 100%; max-width: 860px; margin-top: 10px; }
.info-card {
  background: #fffaf0; border: 1px solid var(--gold-light); border-radius: 14px; padding: 30px 22px;
  box-shadow: 0 10px 30px rgba(200,148,31,.18);
}
.info-card .ico { font-size: 2.4rem; }
.info-card h3 { font-family: 'Playfair Display'; font-size: 1.5rem; margin: 6px 0; }
.info-card p { color: #5b4a2c; }

.countdown { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.cd { background: linear-gradient(160deg, var(--gold-light), var(--gold)); color: #3a2704; border-radius: 12px; padding: 14px 18px; min-width: 84px; box-shadow: 0 6px 16px rgba(138,95,10,.3); }
.cd b { display: block; font-family: 'Playfair Display'; font-size: 2rem; }
.cd span { font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; }
.cdnote { font-weight: 600; color: var(--gold-dark); min-height: 1.6em; }

/* buttons */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: 999px; text-decoration: none; font-weight: 600;
  font-family: inherit; font-size: 1rem; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #3a2704;
  box-shadow: 0 8px 20px rgba(138,95,10,.35); transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(138,95,10,.4); }
.btn:active { transform: translateY(0) scale(.97); }

/* ---------- photos ---------- */
.photos { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); width: 100%; max-width: 900px; margin-top: 10px; }
.photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; cursor: zoom-in;
  border: 3px solid var(--gold); outline: 1px solid var(--gold-light); outline-offset: 6px;
  box-shadow: 0 16px 38px rgba(138,95,10,.32);
  background: linear-gradient(160deg, #fff7e2, var(--cream2));
}
.photo:focus-visible { outline: 3px solid var(--gold-dark); }
.photo .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--gold-dark); font-family: 'Playfair Display'; letter-spacing: 2px;
}
.photo .ph span { font-size: 2.6rem; }
.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s ease;
}
.photo:hover img { transform: scale(1.06); }

/* lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center;
  background: rgba(20, 14, 4, .88);
}
#lightbox.open { display: flex; animation: fadeIn .25s ease; }
#lightbox img { max-width: 88vw; max-height: 86vh; border-radius: 12px; border: 3px solid var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-close, .lb-nav {
  position: absolute; background: rgba(253,241,220,.15); color: #fff; border: 1px solid rgba(242,207,107,.6);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; line-height: 1;
  transition: background .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(242,207,107,.4); }
.lb-close { top: 18px; right: 18px; font-size: 1.2rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- programme ---------- */
.now-panel {
  position: sticky; top: 62px; z-index: 30;
  width: 100%; max-width: 820px; padding: 16px 20px 14px; text-align: left;
  background: rgba(255, 250, 240, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 2px solid var(--gold); border-radius: 16px;
  box-shadow: 0 10px 28px rgba(138,95,10,.25);
}
.np-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.badge { font-size: .72rem; font-weight: 700; letter-spacing: 2px; padding: 3px 10px; border-radius: 999px; background: var(--cream2); color: var(--gold-dark); }
.badge.live { background: #d63a2f; color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.np-clock { font-family: 'Playfair Display'; font-weight: 900; font-size: 1.5rem; color: var(--gold-dark); }
.np-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.np-grid small { display: block; font-size: .7rem; letter-spacing: 3px; color: var(--gold); font-weight: 700; }
.np-grid strong { display: block; font-family: 'Playfair Display'; font-size: 1.05rem; line-height: 1.25; }
.np-grid em { display: block; color: #5b4a2c; font-size: .85rem; min-height: 1.2em; }
#clock { width: 100%; cursor: pointer; -webkit-appearance: none; appearance: none; background: transparent; height: 22px; }
#clock::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
#clock::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
#clock::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-dark); box-shadow: 0 2px 8px rgba(138,95,10,.4); }
#clock::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-dark); }
.np-hint { font-size: .78rem; color: #7a6538; margin-top: 2px; }

.timeline { position: relative; width: 100%; max-width: 820px; text-align: left; margin-top: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 150px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--gold-light), var(--gold), var(--gold-light));
}
.item { display: grid; grid-template-columns: 150px 1fr; padding: 12px 0; position: relative; border-radius: 10px; }
.item .time { padding-right: 28px; text-align: right; font-weight: 600; color: var(--gold-dark); font-size: .95rem; transition: opacity .3s; }
.item .what { padding-left: 28px; position: relative; transition: opacity .3s; }
.item .what::before {
  content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--cream2);
  transition: transform .3s, background .3s;
}
.item .what strong { font-family: 'Playfair Display'; font-size: 1.1rem; display: block; }
.item .what em { color: #5b4a2c; display: block; }
.item .what ul { list-style: none; margin-top: 2px; }
.item .what li { font-style: italic; color: #5b4a2c; }
.item .what li::before { content: "# "; color: var(--gold); }

.item.done .time, .item.done .what { opacity: .45; }
.item.now { background: linear-gradient(90deg, rgba(242,207,107,.42), rgba(242,207,107,0)); }
.item.now .what strong { color: var(--gold-dark); }
.item.now .what::before { background: #d63a2f; transform: rotate(45deg) scale(1.5); animation: glow 1.6s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 9px rgba(214,58,47,.15); } }

.lunch {
  margin: 22px 0; display: flex; align-items: center; gap: 16px; justify-content: center; width: 100%;
}
.lunch::before, .lunch::after { content: ""; flex: 1; max-width: 160px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.lunch::after { transform: scaleX(-1); }
.lunch span {
  font-family: 'Playfair Display'; font-weight: 900; letter-spacing: 6px; font-size: 1.5rem;
  padding: 8px 40px; background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #3a2704; border-radius: 6px; box-shadow: 0 6px 16px rgba(138,95,10,.3);
}
.end { font-family: 'Playfair Display'; font-weight: 900; font-size: 2.2rem; letter-spacing: 6px; margin-top: 20px; }

/* ---------- dance / cheer ---------- */
.branches { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); width: 100%; max-width: 900px; margin-top: 8px; }
.branch {
  background: #fffaf0; border: 1px solid var(--gold-light); border-radius: 16px; padding: 24px 16px;
  box-shadow: 0 10px 30px rgba(200,148,31,.18);
}
.b-ico { font-size: 2.6rem; }
.branch h3 { font-family: 'Playfair Display'; font-size: 1.15rem; margin: 6px 0 12px; }
.bar { height: 8px; border-radius: 999px; background: var(--cream2); overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-light), var(--gold-dark)); transition: width .5s ease; }
.count { font-family: 'Playfair Display'; font-weight: 900; font-size: 2rem; color: var(--gold-dark); margin: 8px 0; }
.cheer {
  padding: 10px 22px; border-radius: 999px; border: 2px solid var(--gold); background: transparent;
  color: var(--gold-dark); font-weight: 700; font-family: inherit; cursor: pointer; transition: background .2s, transform .15s;
}
.cheer:hover { background: var(--gold-light); }
.cheer:active { transform: scale(.92); }

/* ---------- venue ---------- */
.map-wrap { width: 100%; max-width: 760px; border: 3px solid var(--gold); border-radius: 22px; overflow: hidden; box-shadow: 0 14px 34px rgba(138,95,10,.3); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- RSVP ---------- */
.rsvp {
  width: 100%; max-width: 460px; text-align: left; display: flex; flex-direction: column; gap: 8px;
  background: #fffaf0; border: 2px solid var(--gold); border-radius: 18px; padding: 28px 26px;
  box-shadow: 0 14px 34px rgba(138,95,10,.25);
}
.rsvp label { font-weight: 600; color: var(--gold-dark); font-size: .9rem; }
.rsvp input, .rsvp select {
  font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--gold-light); background: #fff;
  color: var(--ink); margin-bottom: 8px;
}
.rsvp input:focus, .rsvp select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.rsvp .btn { margin-top: 6px; width: 100%; }
.rsvp-msg { font-weight: 600; color: var(--gold-dark); min-height: 1.4em; text-align: center; }
.rsvp .small { text-align: center; }

footer { position: relative; z-index: 2; text-align: center; padding: 50px 20px 70px; color: var(--gold-dark); }

/* toast + back to top */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  z-index: 350; background: #2b2112; color: #fff3c4; padding: 12px 22px; border-radius: 999px;
  font-size: .9rem; transition: opacity .3s, transform .3s; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toTop {
  position: fixed; right: 18px; bottom: 22px; z-index: 160; width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.3rem; font-weight: 700; color: #3a2704;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); box-shadow: 0 8px 20px rgba(138,95,10,.4);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .3s;
}
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 640px) {
  .timeline::before { left: 98px; }
  .item { grid-template-columns: 98px 1fr; }
  .item .time { font-size: .78rem; padding-right: 18px; }
  .item .what { padding-left: 18px; }
  .logo-sep { display: none; }
  .now-panel { top: 58px; padding: 12px 14px; }
  .np-grid strong { font-size: .92rem; }
  .np-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint, .badge.live, .item.now .what::before { animation: none; }
  .tilt, .parallax { transition: none; }
}

html, body { overflow-x: clip; max-width: 100%; }
@media (max-width: 1100px) { .logo-img { height: 90px; } }
@media (max-width: 600px) { .logo-img { height: 56px; } }


.attire-label { margin-top: 14px; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.5rem; letter-spacing: 4px; color: var(--gold-dark); text-align: center; }

#musicBtn {
  position: fixed; left: 18px; bottom: 22px; z-index: 160; width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.3rem;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); box-shadow: 0 8px 20px rgba(138,95,10,.4);
}
#musicBtn.on { animation: pulse 1.6s infinite; }

/* ---------- MOBILE & TABLET ---------- */
@media (max-width: 1024px) {
  section { padding: 84px 20px; }
  .frame { max-width: 100%; }
}
@media (max-width: 768px) {
  section { padding: 76px 16px; gap: 18px; min-height: auto; }
  #home { min-height: 100svh; }
  .frame { margin: 8px; padding: 32px 8px; width: calc(100% - 16px); }
  .logos { flex-wrap: nowrap; gap: 10px; }
  .logo-sep { display: block; height: 44px; }
  .logo-img { height: 62px; max-width: 100%; }
  .photos { grid-template-columns: 1fr 1fr; gap: 14px; }
  .attire-label { font-size: 1.05rem; letter-spacing: 2px; }
  .info-grid { grid-template-columns: 1fr; }
  .map-wrap iframe { height: 300px; }
}
@media (max-width: 520px) {
  #nav a { padding: 8px 12px; font-size: .8rem; }
  .logos { gap: 8px; }
  .logo-sep { height: 32px; }
  .logo-img { height: 40px; }
  h1.title { font-size: clamp(3rem, 15vw, 4.5rem); }
  .theme { font-size: 1rem; }
  .countdown { gap: 8px; flex-wrap: nowrap; width: 100%; }
  .cd { flex: 1; min-width: 0; padding: 10px 4px; }
  .cd b { font-size: 1.5rem; }
  .cd span { font-size: .6rem; letter-spacing: 1px; }
  .photos { grid-template-columns: 1fr; max-width: 360px; }
  .attire-label { font-size: 1.2rem; }
  .map-wrap iframe { height: 260px; }
  #toTop, #musicBtn { width: 44px; height: 44px; bottom: max(16px, env(safe-area-inset-bottom)); }
  #toTop { right: 14px; }
  #musicBtn { left: 14px; }
  footer .script { font-size: 2.1rem !important; }
}
@media (hover: none) {
  .tilt { transform: none !important; }
}