/* Structure and layout only. Colours, fonts and patterns come from the theme file (/themes/<name>.css). */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.7; }
body.locked { overflow: hidden; height: 100dvh; }
h1, h2, p { margin: 0; }
a { color: inherit; }
.noscript, .notice { max-width: 30rem; margin: 20vh auto; padding: 0 24px; text-align: center; }

/* ---- cover */
.cover { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 32px 24px; text-align: center;
  background: var(--cover-bg); color: var(--cover-ink); overflow: hidden; transition: transform .9s cubic-bezier(.7,0,.2,1), opacity .9s ease; }
.cover::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cover); background-size: var(--pattern-size); opacity: var(--pattern-cover-opacity); }
.cover::after { content: ""; position: absolute; inset: 14px; border: 1px solid var(--cover-line); border-radius: var(--frame-radius); pointer-events: none; }
.cover.open { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.cover-inner { position: relative; max-width: 26rem; display: grid; justify-items: center; gap: 14px; }
.cover .crest { width: 92px; color: var(--accent); margin-bottom: 6px; }
.eyebrow { font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; opacity: .82; }
.kind { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--accent); }
.cover h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(4rem, 22vw, 6.5rem); line-height: .95; letter-spacing: .01em; }
.cover .when { font-size: .95rem; letter-spacing: .06em; }
.guest { margin-top: 10px; padding: 12px 22px; border: 1px solid var(--cover-line); border-radius: var(--radius); min-width: 13rem; }
.guest small { display: block; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.guest b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.btn { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--shadow); }
.btn:focus-visible, .dock a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cover .btn { margin-top: 14px; }

/* ---- sections */
main { position: relative; }
.section { position: relative; padding: 76px 24px; text-align: center; overflow: hidden; }
.section > .wrap { position: relative; max-width: 38rem; margin: 0 auto; display: grid; justify-items: center; gap: 18px; }
.section.tint { background: var(--surface); }
.section.patterned::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-page); background-size: var(--pattern-size); opacity: var(--pattern-page-opacity); pointer-events: none; }
.section.dark { background: var(--cover-bg); color: var(--cover-ink); }
.section.dark::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cover); background-size: var(--pattern-size); opacity: var(--pattern-cover-opacity); pointer-events: none; }
.section h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.12; }
.section p { max-width: 34rem; }
.divider { width: 150px; color: var(--accent); }
.crest-sm { width: 54px; color: var(--accent); }
.arabic { font-family: var(--font-arabic); direction: rtl; font-size: clamp(1.55rem, 6.4vw, 2.05rem); line-height: 2.05; color: var(--arabic-ink); }
.section.dark .arabic { color: var(--accent); }
.arabic.lg { font-size: clamp(1.9rem, 8vw, 2.6rem); }
.sub { font-size: .9rem; color: var(--muted); font-style: italic; }
.section.dark .sub { color: inherit; opacity: .78; }
.source { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; display: grid; justify-items: center; gap: 10px; box-shadow: 0 10px 30px var(--shadow-soft); }
.prayers { width: 100%; display: grid; gap: 16px; }

/* ---- details */
.facts { width: 100%; display: grid; gap: 12px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.fact small { display: block; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.fact b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.25; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 24rem; }
.countdown div { padding: 14px 4px; border-radius: var(--radius); background: var(--cover-bg); color: var(--cover-ink); }
.countdown b { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.address { font-size: .95rem; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.signoff { font-style: italic; color: var(--muted); }
.hosts { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
footer { padding: 22px 24px 96px; text-align: center; font-size: .75rem; color: var(--muted); background: var(--page); }

/* ---- dock (section shortcuts) */
.dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 10; display: flex; gap: 2px; padding: 5px;
  background: var(--dock); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 28px var(--shadow); transition: transform .6s ease .5s; max-width: calc(100vw - 24px); }
body.opened .dock { transform: translate(-50%, 0); }
.dock a { text-decoration: none; font-size: .78rem; font-weight: 600; padding: 9px 13px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.dock a.on { background: var(--accent); color: var(--on-accent); }

/* ---- motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cover { transition: opacity .2s linear; }
  .cover.open { transform: none; }
}
@media (min-width: 720px) {
  .section { padding: 104px 32px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact.wide { grid-column: 1 / -1; }
}
