/* =====================================================================
   ALMA MATER — Graduation Celebration Website Template
   Style: Minimal / Editorial — paper + ink + navy + a single gold accent
   ---------------------------------------------------------------------
   01 Tokens · 02 Reset · 03 Type helpers · 04 Layout & buttons
   05 Nav · 06 Hero + countdown · 07 About/Stats · 08 Story
   09 Schedule/Timeline · 10 Venue/Map · 11 Gallery · 12 Cards
   13 RSVP · 14 Contact · 15 Footer · 16 WhatsApp · 17 Reveal
   18 Responsive · 19 Accessibility
   ===================================================================== */

/* ============================ 01. TOKENS ============================ */
:root {
  --paper:   #f5f3ee;   /* off-white base */
  --paper-2: #eceae2;   /* panel */
  --ink:     #1a1c22;   /* near-black text */
  --ink-soft:#6f6c63;
  --navy:    #1f3a5f;   /* primary accent */
  --navy-d:  #172c48;
  --gold:    #b08542;   /* single warm highlight */
  --line:    rgba(26, 28, 34, 0.14);

  --font-display: "Libre Caslon Display", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(5rem, 11vw, 9rem);
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========================= 02. RESET & BASE ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--navy); color: var(--paper); }

.skip-link { position: fixed; top: -60px; left: 1rem; z-index: 200; background: var(--navy); color: #fff; padding: .6rem 1rem; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 0; }

/* ====================== 03. TYPOGRAPHY HELPERS ===================== */
/* Numbered editorial labels */
.section__label { display: inline-flex; align-items: center; gap: .8rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.section__label .num { font-family: var(--font-display); font-size: 1rem; color: var(--gold); letter-spacing: 0; }
.section__label::after { content: ""; width: 44px; height: 1px; background: var(--line); }
.section__label--center { justify-content: center; }
.section__label--light { color: rgba(255,255,255,.75); }
.section__label--light .num { color: var(--gold); }
.section__label--light::after { background: rgba(255,255,255,.3); }

.section__title {
  font-family: var(--font-display); font-weight: 400; line-height: 1.14;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem); color: var(--ink); margin-top: 1.1rem;
  letter-spacing: -0.005em;
}
.section__title--light { color: var(--paper); }
.section__sub { color: var(--ink-soft); max-width: 46ch; margin-top: 1rem; font-size: 1.02rem; }
.lead { font-size: clamp(1.08rem, 2.1vw, 1.26rem); color: var(--ink-soft); max-width: 56ch; margin-top: 1.4rem; }
.lead--light { color: rgba(255,255,255,.82); }

/* ===================== 04. LAYOUT & BUTTONS ====================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 640px; margin-inline: auto; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head .section__sub { margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem 2.1rem; font-family: var(--font-body); font-weight: 600;
  font-size: .9rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--navy); transition: background .3s var(--ease), color .3s, transform .3s, box-shadow .3s;
}
.btn--primary { background: var(--navy); color: var(--paper); }
.btn--primary:hover { background: var(--navy-d); transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(31,58,95,.9); }
.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--paper); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ========================= 05. NAVIGATION ========================= */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background .35s, box-shadow .35s; }
.nav.is-scrolled { background: rgba(245,243,238,.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand__name { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.nav__menu { display: flex; align-items: center; gap: 2rem; }
.nav__menu a { color: var(--ink); font-weight: 500; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; position: relative; transition: color .2s; }
.nav__menu a:not(.nav__cta)::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--gold); transition: width .3s var(--ease); }
.nav__menu a:hover { color: var(--navy); }
.nav__menu a:hover:not(.nav__cta)::after { width: 100%; }
.nav__cta { border: 1px solid var(--navy); color: var(--navy); padding: .5rem 1.2rem; letter-spacing: .12em; transition: all .25s; }
.nav__cta:hover { background: var(--navy); color: var(--paper); }

.nav__toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav__toggle span { width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===================== 06. HERO / COUNTDOWN ======================= */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 0 90px; }
.hero__inner { max-width: 780px; }
.hero__pre { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .28em; font-size: .76rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 9vw, 6rem); line-height: 1; color: var(--ink); letter-spacing: -0.01em; }
.hero__degree { font-family: var(--font-body); color: var(--navy); font-weight: 500; letter-spacing: .04em; margin-top: 1rem; }
.hero__rule { width: 60px; height: 2px; background: var(--gold); margin: 2rem auto; }
.hero__hosts { display: flex; flex-direction: column; gap: .15rem; margin-bottom: 2rem; }
.hero__hosts-label { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.hero__hosts-names { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }

/* Countdown */
.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0 auto 2rem; border: 1px solid var(--line); width: fit-content; }
.cd { padding: 1.2rem clamp(1rem, 4vw, 2rem); text-align: center; border-right: 1px solid var(--line); }
.cd:last-child { border-right: none; }
.cd__num { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.cd__label { display: block; margin-top: .5rem; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }

.hero__when { color: var(--ink-soft); letter-spacing: .04em; margin-bottom: 2rem; }

.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 1px; height: 46px; background: linear-gradient(var(--navy), transparent); }
.hero__scroll span { position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { top: 0; opacity: 1; } 70% { top: 40px; opacity: 0; } 100% { opacity: 0; } }

/* ========================= 07. ABOUT ============================== */
.about__grid { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--line); }
.stat { padding: 1.6rem 1rem 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--navy); line-height: 1; }
.stat__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-top: .5rem; }

/* ========================== 08. STORY ============================= */
.story__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.story__frame { overflow: hidden; }
.story__frame img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.story__text { color: var(--ink-soft); margin-top: 1.2rem; font-size: 1.06rem; }
.pullquote { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); margin-top: 1.8rem; padding-left: 1.4rem; border-left: 2px solid var(--gold); line-height: 1.35; }

/* ==================== 09. SCHEDULE / TIMELINE ==================== */
.timeline { max-width: 780px; margin-inline: auto; border-top: 1px solid var(--line); }
.tl-item { display: grid; grid-template-columns: 130px 1fr; gap: 2rem; align-items: baseline; padding: 1.8rem 0; border-bottom: 1px solid var(--line); transition: padding-left .3s var(--ease); }
.tl-item:hover { padding-left: .8rem; }
.tl-item__time { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); }
.tl-item__title { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.tl-item__desc { color: var(--ink-soft); font-size: .98rem; margin-top: .3rem; }

/* ======================== 10. VENUE / MAP ========================= */
.venue__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.venue__tagline { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin-top: 1rem; }
.venue__address { font-style: normal; color: var(--ink-soft); margin: 1rem 0 1.8rem; line-height: 1.7; }
.map-frame { position: relative; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.map-frame__placeholder { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem; color: var(--ink-soft); background: var(--paper-2); }
.map-frame__placeholder p { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; }
.map-frame__placeholder small { font-family: var(--font-display); color: var(--navy); font-size: 1.05rem; }
.map-frame__pin { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: var(--gold); transform: rotate(-45deg); margin: 0 auto .5rem; }

/* ========================= 11. GALLERY ============================ */
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.gallery__item { position: relative; overflow: hidden; background: var(--paper-2); }
.gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery__item:nth-child(6) { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .5s; filter: saturate(.95); }
.gallery__item::after { content: ""; position: absolute; inset: 0; background: var(--navy); opacity: 0; transition: opacity .4s; mix-blend-mode: multiply; }
.gallery__cap { position: absolute; left: 16px; bottom: 14px; z-index: 2; font-family: var(--font-display); color: var(--paper); font-size: 1.05rem; transform: translateY(8px); opacity: 0; transition: transform .4s var(--ease), opacity .4s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:hover::after { opacity: .28; }
.gallery__item:hover .gallery__cap { transform: translateY(0); opacity: 1; }

/* ==================== 12. DETAIL CARDS ============================ */
.details__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.card { padding: clamp(1.8rem, 3.5vw, 2.6rem); border-right: 1px solid var(--line); transition: background .3s; }
.card:last-child { border-right: none; }
.card:hover { background: var(--paper-2); }
.card__title { font-family: var(--font-display); color: var(--ink); font-size: 1.5rem; margin: 1rem 0 .7rem; }
.card__text { color: var(--ink-soft); font-size: .98rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chip-row .chip { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: .4rem .85rem; border: 1px solid var(--line); color: var(--navy); }
.card .btn { margin-top: 1.4rem; }

/* ========================== 13. RSVP ============================== */
.rsvp { background: var(--navy); border-top: none; }
.rsvp__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.rsvp__aside { margin-top: 1.4rem; color: rgba(255,255,255,.72); }
.rsvp__aside a { color: var(--gold); border-bottom: 1px solid rgba(176,133,66,.5); }
.rsvp__form { background: var(--paper); padding: clamp(1.6rem, 4vw, 2.6rem); }
.field { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.field__opt { text-transform: none; letter-spacing: normal; color: var(--gold); }
.field input, .field select, .field textarea { background: transparent; border: none; border-bottom: 1px solid var(--line); padding: .7rem 0; transition: border-color .25s; width: 100%; border-radius: 0; }
.field textarea { resize: vertical; min-height: 70px; }
.field input::placeholder, .field textarea::placeholder { color: #b3afa4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%231f3a5f'%3E%3Cpath d='M7 10L2 4h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .2rem center; padding-right: 2rem; }
.field.is-invalid input, .field.is-invalid select { border-color: #b23a3a; }
.field__error { font-size: .78rem; color: #b23a3a; min-height: 1em; }
.rsvp__status { margin-top: 1rem; text-align: center; font-family: var(--font-display); font-size: 1.2rem; min-height: 1.2em; }
.rsvp__status.is-success { color: var(--navy); }
.rsvp__status.is-error { color: #b23a3a; font-family: var(--font-body); font-size: .95rem; }

/* ========================= 14. CONTACT ============================ */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.contact__list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact__list li { display: grid; gap: .2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.contact__label { text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--gold); }
.contact__list a { font-family: var(--font-display); color: var(--navy); font-size: 1.2rem; transition: color .2s; }
.contact__list a:hover { color: var(--ink); }

/* ========================== 15. FOOTER ============================ */
.footer { background: var(--ink); color: rgba(245,243,238,.85); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__name { font-family: var(--font-display); font-size: 1.5rem; color: var(--paper); }
.footer__tag { color: rgba(245,243,238,.6); margin-top: .3rem; }
.footer__nav { display: flex; flex-direction: column; gap: .7rem; }
.footer__nav a { color: rgba(245,243,238,.7); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; transition: color .2s; }
.footer__nav a:hover { color: var(--gold); }
.socials { display: flex; gap: .7rem; flex-wrap: wrap; align-content: start; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(245,243,238,.25); color: var(--paper); transition: all .25s; }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.socials svg { width: 18px; height: 18px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding-block: 1.5rem; border-top: 1px solid rgba(245,243,238,.16); font-size: .84rem; color: rgba(245,243,238,.6); }
.footer__credit strong { color: var(--paper); }

/* ==================== 16. FLOATING WHATSAPP ======================= */
.wa-float { position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 120; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #128c4b; box-shadow: 0 12px 28px -10px rgba(18,140,75,.7); transition: transform .25s var(--ease); }
.wa-float:hover { transform: scale(1.08) translateY(-2px); }

/* ==================== 17. REVEAL ANIMATIONS ======================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.tl-item, .gallery__item, .stat { transition-delay: var(--d, 0s); }

/* ==================== 18. RESPONSIVE ============================== */
@media (max-width: 940px) {
  .about__grid, .story__grid, .venue__grid, .rsvp__grid, .contact__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .details__grid { grid-template-columns: 1fr; }
  .card { border-right: none; border-bottom: 1px solid var(--line); }
  .card:last-child { border-bottom: none; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery__item:nth-child(6) { grid-column: span 2; }
}
@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(245,243,238,.98); backdrop-filter: blur(12px); padding: 1rem var(--gutter) 1.4rem; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .4s var(--ease);
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__menu a { padding: .9rem 0; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav__menu a:last-child { border-bottom: none; }
  .nav__cta { text-align: center; margin-top: .8rem; padding: .85rem; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; }
  .field-row { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: .4rem; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__item, .gallery__item:nth-child(1) { grid-column: span 1; }
  .countdown { width: 100%; }
  .cd { flex: 1; padding-inline: .5rem; }
}

/* ================= 19. ACCESSIBILITY / REDUCED MOTION ============= */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
