/* ACE 2027. Theme taken from the Save the Date flyer: deep navy, antique gold, cream,
   an eight-pointed-star lattice, and the arch frame. */
:root {
  --navy: #0d1928;
  --navy-2: #111f33;
  --navy-3: #16263d;
  --gold: #d1ac69;
  --gold-soft: rgba(209, 172, 105, 0.38);
  --gold-faint: rgba(209, 172, 105, 0.16);
  --cream: #f3ede1;
  --muted: #a9b0bd;
  --serif-display: "Marcellus", "Trajan Pro", Georgia, serif;
  --serif-italic: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Futura", system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cream);
  background-color: var(--navy);
  /* Eight-pointed-star lattice, as on the flyer */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23d1ac69' stroke-opacity='.075' stroke-width='1'%3E%3Crect x='31' y='31' width='26' height='26'/%3E%3Crect x='31' y='31' width='26' height='26' transform='rotate(45 44 44)'/%3E%3Cpath d='M0 -9 9 0 0 9 -9 0Z M88 -9 97 0 88 9 79 0Z M0 79 9 88 0 97 -9 88Z M88 79 97 88 88 97 79 88Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 88px 88px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-top: 0.6rem;
}
.italic { font-family: var(--serif-italic); font-style: italic; font-weight: 500; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.star { width: 22px; height: 22px; fill: var(--gold); flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  min-height: 52px; padding: 0 1.9rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--gold); border-radius: 2px; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #dfbe80; }
.btn--line { background: transparent; color: var(--gold); }
.btn--line:hover { background: var(--gold-faint); }
.btn:active { transform: translateY(1px); }

/* ---------- Calendar menu ---------- */
.cal { position: relative; display: inline-block; }
.cal summary { list-style: none; }
.cal summary::-webkit-details-marker { display: none; }
.cal__menu {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  z-index: 20; min-width: 260px; padding: 6px;
  background: var(--navy-3); border: 1px solid var(--gold-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); text-align: left;
}
.cal__menu a {
  display: block; padding: 0.75rem 1rem; text-decoration: none; font-size: 0.98rem;
}
.cal__menu a:hover, .cal__menu a:focus-visible { background: var(--gold-faint); color: var(--gold); outline: none; }

/* ---------- Header ---------- */
.top { position: absolute; inset: 0 0 auto; z-index: 10; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 84px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { height: 22px; width: auto; }
.brand span { font-family: var(--serif-display); color: var(--gold); font-size: 1.15rem; letter-spacing: 0.14em; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  text-decoration: none; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream); opacity: 0.85; transition: color 0.2s, opacity 0.2s;
}
.nav a:not(.btn):hover { color: var(--gold); opacity: 1; }
.nav .btn { min-height: 42px; padding: 0 1.2rem; font-size: 0.78rem; }

/* ---------- Hero (the flyer, as a page) ---------- */
.hero { position: relative; padding: 112px var(--gutter) 72px; text-align: center; }
.hero::before { /* the flyer's thin outer frame */
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--gold-faint); pointer-events: none;
}
.hero__presents { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.arch {
  position: relative; width: min(560px, 100%); margin: 0 auto;
  padding: clamp(4.6rem, 15%, 6.2rem) clamp(1.5rem, 7%, 3rem) clamp(2.2rem, 6%, 3rem);
  border: 2px solid var(--gold); border-bottom-width: 2px;
  border-radius: 9999px 9999px 0 0;
}
.arch::before {
  content: ""; position: absolute; inset: 9px 9px 9px; border: 1px solid var(--gold-soft);
  border-radius: 9999px 9999px 0 0; pointer-events: none;
}
.arch .star { margin: 0 auto 1.6rem; width: 26px; height: 26px; }
.save {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(1.2rem, 4.2vw, 1.9rem); letter-spacing: 0.3em; text-indent: 0.3em;
  line-height: 1.2; text-transform: uppercase;
}
.wordmark { width: 76%; margin: clamp(1.1rem, 3vw, 1.5rem) auto 0.4rem; }
.arch h1 { font: inherit; }
.year {
  display: block;
  font-family: var(--serif-display); color: var(--gold);
  font-size: clamp(2.6rem, 9vw, 4.1rem); letter-spacing: 0.14em; text-indent: 0.14em; line-height: 1.1;
}
.rule { width: 46%; height: 1px; background: var(--gold); margin: 1.5rem auto; border: 0; }
.tagline { font-size: clamp(1.45rem, 4.2vw, 1.95rem); line-height: 1.35; }
.date {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.2rem, 6.6vw, 3.6rem); line-height: 1.15; margin-top: clamp(2rem, 5vw, 2.8rem);
}
.where {
  margin-top: 0.9rem; color: var(--gold); font-weight: 600;
  font-size: clamp(0.82rem, 2.3vw, 1.12rem); letter-spacing: 0.12em; text-transform: uppercase;
}
.where .dot { display: inline-block; margin: 0 0.6em; }
.hero__reg { margin: 1.1rem 0 1.8rem; font-size: 1.3rem; color: var(--cream); opacity: 0.85; }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 0; position: relative; }
.section--alt { background: rgba(6, 13, 23, 0.55); border-block: 1px solid var(--gold-faint); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(2.4rem, 5vw, 3.4rem); }
.section__head .lead { margin: 1rem auto 0; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.1rem; }
.ornament::before, .ornament::after { content: ""; width: 56px; height: 1px; background: var(--gold-soft); }

/* About */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about p + p { margin-top: 1rem; }
.about__text { color: var(--muted); }
.about__text strong { color: var(--cream); font-weight: 500; }
.facts { list-style: none; margin-top: clamp(3rem, 7vw, 4.5rem); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--gold-faint); }
.facts li { padding: 1.6rem 1.4rem 0; text-align: center; }
.facts li + li { border-left: 1px solid var(--gold-faint); }
.facts b { display: block; font-family: var(--serif-display); font-weight: 400; font-size: 1.35rem; margin-top: 0.5rem; line-height: 1.3; }
.facts .italic { font-size: 1.45rem; }

/* Registration */
.reg {
  position: relative; max-width: 760px; margin: 0 auto; text-align: center;
  padding: clamp(2.6rem, 6vw, 3.8rem) clamp(1.4rem, 5vw, 3.6rem);
  border: 1px solid var(--gold);
  background: rgba(13, 25, 40, 0.7);
}
.reg::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--gold-faint); pointer-events: none; }
.reg .lead { margin: 1rem auto 0; }
.reg__details { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem 2.6rem; margin-top: 1.6rem; }
.reg__details span { display: block; font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.reg__cta { margin-top: 2rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9rem; }

/* Program */
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.8rem); }
.day {
  position: relative; text-align: center;
  padding: clamp(3.4rem, 7vw, 4.4rem) 1.6rem 2.2rem;
  border: 1px solid var(--gold-soft); border-radius: 9999px 9999px 0 0;
  background: rgba(13, 25, 40, 0.7);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.day:hover { border-color: var(--gold); transform: translateY(-3px); }
.day .star { width: 16px; height: 16px; margin: 0 auto 0.9rem; }
.day h3 { font-family: var(--serif-display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.04em; }
.day__date { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; margin-top: 0.3rem; }
.day__body { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--gold-faint); }
.day__body .italic { font-size: 1.3rem; color: var(--muted); }
.sessions { list-style: none; text-align: left; display: grid; gap: 1rem; }
.sessions li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.8rem; }
.sessions time { color: var(--gold); font-size: 0.86rem; font-weight: 500; padding-top: 0.15rem; }
.sessions b { display: block; font-weight: 500; line-height: 1.35; }
.sessions span { display: block; color: var(--muted); font-size: 0.92rem; }

/* Venue */
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.venue address { font-style: normal; color: var(--muted); font-size: 1.12rem; margin-top: 1.2rem; }
.venue__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.venue .cal__menu { left: 0; transform: none; }
.window {
  position: relative; aspect-ratio: 4 / 5; max-width: 380px; width: 100%; margin-left: auto;
  border: 2px solid var(--gold); border-radius: 9999px 9999px 0 0;
  display: grid; place-items: center; text-align: center; padding: 3rem 1.5rem 2rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(209, 172, 105, 0.12), transparent 60%),
    rgba(13, 25, 40, 0.6);
}
.window::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--gold-soft); border-radius: 9999px 9999px 0 0; }
.window .star { width: 30px; height: 30px; margin: 0 auto 1.2rem; }
.window b { display: block; font-family: var(--serif-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.1rem); line-height: 1.25; }
.window span { display: block; margin-top: 0.8rem; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; }

/* Hadith */
.quote { text-align: center; max-width: 820px; margin: 0 auto; }
.quote blockquote { font-size: clamp(1.7rem, 4.4vw, 2.5rem); line-height: 1.3; margin-top: 1.2rem; }
.quote figcaption { margin-top: 1.4rem; color: var(--muted); font-size: 0.95rem; }
.quote figcaption strong { display: block; color: var(--cream); font-weight: 500; letter-spacing: 0.04em; }
.quote cite { font-style: normal; }

/* Connect */
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.link {
  display: block; padding: 1.4rem 1.4rem 1.3rem; text-decoration: none;
  border: 1px solid var(--gold-faint); background: rgba(13, 25, 40, 0.7);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.link:hover { border-color: var(--gold); background: var(--navy-3); }
.link b { display: block; font-family: var(--serif-display); font-weight: 400; font-size: 1.3rem; }
.link span { color: var(--muted); font-size: 0.92rem; }
.contact { text-align: center; margin-top: 2.4rem; color: var(--muted); }
.contact a { color: var(--gold); text-underline-offset: 4px; }

/* Footer */
.foot { padding: 3.6rem 0 2.6rem; border-top: 1px solid var(--gold-faint); text-align: center; }
.foot .label { font-size: 0.7rem; }
.organizer { display: inline-block; margin-top: 1rem; background: #fff; border-radius: 6px; padding: 1rem 1.6rem; }
.organizer img { width: min(340px, 70vw); }
.foot small { display: block; margin-top: 1.8rem; color: var(--muted); font-size: 0.82rem; }
.foot small a { text-underline-offset: 3px; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .day, .btn, .link { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about, .venue { grid-template-columns: 1fr; }
  .window { margin: 0 auto; max-width: 320px; }
  .days { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .top .wrap { height: 72px; }
  .hero { padding-top: 96px; }
  .hero::before { inset: 8px; }
  .facts { grid-template-columns: 1fr; }
  .facts li + li { border-left: 0; border-top: 1px solid var(--gold-faint); }
  .facts li { padding: 1.4rem 0; }
  .where .dot { display: none; }
  .where span { display: block; }
}
@media (max-width: 420px) {
  .links { grid-template-columns: 1fr; }
  .btn { padding: 0 1.3rem; letter-spacing: 0.12em; }
}
