/* Al-Batool Fatima Association · albatoolfatima.org */

:root {
  --paper: #f3efe4;
  --paper-2: #e9e2cf;
  --paper-card: rgba(255, 252, 244, 0.62);
  --ink: #13261f;
  --ink-soft: #4b5c54;
  --green-950: #0a211b;
  --green-900: #0f2e26;
  --green-800: #163d33;
  --green-600: #2b6352;
  --gold: #c39d50;
  --gold-2: #e2ca93;
  --line: rgba(19, 38, 31, 0.14);
  --line-light: rgba(226, 202, 147, 0.22);
  --radius: 18px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-display: "Marcellus", "Amiri", Georgia, serif;
  --font-body: "Hanken Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar-display: "Amiri", "Marcellus", serif;
  --font-ar-body: "IBM Plex Sans Arabic", "Hanken Grotesk", system-ui, sans-serif;
  --pattern-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23163d33' stroke-width='1'%3E%3Cpath d='M40 12 68 40 40 68 12 40Z'/%3E%3Cpath d='M20 20h40v40H20Z'/%3E%3Cpath d='M0 0l20 20M80 0 60 20M0 80l20-20M80 80 60 60M40 0v12M40 68v12M0 40h12M68 40h12'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23e2ca93' stroke-width='1'%3E%3Cpath d='M40 12 68 40 40 68 12 40Z'/%3E%3Cpath d='M20 20h40v40H20Z'/%3E%3Cpath d='M0 0l20 20M80 0 60 20M0 80l20-20M80 80 60 60M40 0v12M40 68v12M0 40h12M68 40h12'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body { font-family: var(--font-ar-body); font-size: 17.5px; line-height: 1.9; }

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.12; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: var(--font-ar-display); font-weight: 700; line-height: 1.4; }
p { margin: 0; }
.ar { font-family: var(--font-ar-display); }
.nw { white-space: nowrap; }

/* language switching */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

/* the one environment layer behind the page */
.env {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern-green);
  background-size: 80px 80px;
  opacity: 0.04;
  animation: drift 140s linear infinite;
}
@keyframes drift { to { background-position: 160px 320px; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--paper);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(243, 239, 228, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--gold-2); transition: color 0.4s; }
.site-header.scrolled .brand-mark { color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-en { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: 0.02em; }
.brand-ar { font-size: 0.92rem; opacity: 0.8; }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; opacity: 0.86;
  transition: opacity 0.25s, background-color 0.25s;
}
.nav a:hover { opacity: 1; background: rgba(226, 202, 147, 0.14); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  border: 1px solid currentColor; background: transparent; cursor: pointer;
  border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; opacity: 0.9;
  transition: background-color 0.25s, color 0.25s;
}
.lang-toggle [lang="ar"] { font-family: var(--font-ar-body); }
.lang-toggle [lang="en"] { font-family: var(--font-body); }
.lang-toggle:hover { background: var(--gold-2); color: var(--green-950); border-color: var(--gold-2); }

.menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; position: relative; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; left: 11px; width: 20px; height: 1.6px; background: currentColor; border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.menu-toggle .bars { top: 20px; }
.menu-toggle .bars::before { content: ""; left: 0; top: -6px; }
.menu-toggle .bars::after { content: ""; left: 0; top: 6px; }
.menu-open .menu-toggle .bars { background: transparent; }
.menu-open .menu-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.98rem; line-height: 1.2; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .nav a:focus-visible, .lang-toggle:focus-visible, .pl-item:focus-visible, .copy-btn:focus-visible, .player-poster:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.btn-gold { background: var(--gold); color: var(--green-950); box-shadow: 0 10px 30px -12px rgba(195, 157, 80, 0.7); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { border-color: rgba(226, 202, 147, 0.5); color: var(--paper); }
.btn-ghost:hover { background: rgba(226, 202, 147, 0.12); }
.btn-outline { border-color: var(--green-600); color: var(--green-800); }
.btn-outline:hover { background: var(--green-800); color: var(--paper); }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn.is-missing { opacity: 0.55; pointer-events: none; box-shadow: none; }
.btn-block { width: 100%; }

/* ---------- shared section bits ---------- */
.section { position: relative; padding-block: clamp(76px, 10vw, 132px); }
.eyebrow, .kicker {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--green-600);
  margin-bottom: 14px;
}
html[lang="ar"] .eyebrow, html[lang="ar"] .kicker { letter-spacing: 0; font-size: 0.95rem; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); color: var(--green-900); }
.body-lg { font-size: 1.12rem; color: var(--ink-soft); max-width: 58ch; }
.section-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center .body-lg { margin-inline: auto; }

.ornament { width: 160px; height: 12px; margin: 18px 0 26px; overflow: visible; }
.ornament path { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 100; stroke-dashoffset: 0; }
.ornament .ornament-gem { fill: var(--gold); stroke: none; transform-origin: 80px 6px; }
html.js .ornament path { stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease) 0.2s; }
html.js .ornament .ornament-gem { transform: scale(0) rotate(-90deg); transition: transform 0.9s var(--ease) 0.5s; }
html.js .ornament.in path { stroke-dashoffset: 0; }
html.js .ornament.in .ornament-gem { transform: none; }

/* reveal on scroll */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }
/* the hero plays on load instead of waiting for the observer */
html.js .hero .reveal { opacity: 1; transform: none; transition: none; animation: rise 1s var(--ease) both; animation-delay: calc(0.1s + var(--d, 0s)); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 40px); padding-bottom: 96px;
  background:
    radial-gradient(1200px 700px at 78% 30%, rgba(43, 99, 82, 0.55), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, rgba(195, 157, 80, 0.12), transparent 60%),
    linear-gradient(160deg, var(--green-900), var(--green-950));
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.hero-pattern, .majalis-pattern, .contact-pattern {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern-gold); background-size: 80px 80px;
  opacity: 0.09; animation: drift 140s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero .kicker { color: var(--gold-2); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); color: var(--paper); line-height: 1.06; }
html[lang="ar"] .hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); line-height: 1.35; }
.hero h1 .as { font-size: 0.42em; color: var(--gold-2); letter-spacing: 0.06em; vertical-align: 0.5em; }
html[lang="ar"] .hero h1 .as { font-size: 0.55em; letter-spacing: 0; vertical-align: 0.2em; }
.hero .lede { margin-top: 26px; font-size: 1.16rem; color: rgba(243, 239, 228, 0.78); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-address { display: flex; align-items: center; gap: 10px; margin-top: 34px; font-size: 0.95rem; color: rgba(243, 239, 228, 0.7); }
.hero-address svg { width: 18px; height: 18px; color: var(--gold-2); flex-shrink: 0; }

/* the signature: the mihrab arch */
.arch-card {
  position: relative; justify-self: end; width: 100%; max-width: 420px; min-height: 560px;
  padding: 118px 40px 46px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 70px rgba(226, 202, 147, 0.14));
}
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arch-fill { fill: var(--paper); }
.arch-line { fill: none; stroke: var(--gold); stroke-width: 0.7; stroke-dasharray: 100; stroke-dashoffset: 0; }
.arch-line-inner { stroke-width: 0.4; opacity: 0.8; }
html.js .arch-line { stroke-dashoffset: 100; animation: draw 2.8s var(--ease) 0.5s forwards; }
html.js .arch-line-inner { animation-delay: 0.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.arch-inner { position: relative; }
.verse { font-size: 1.3rem; line-height: 2.05; color: var(--green-900); direction: rtl; }
.verse-ref { margin-top: 6px; font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.08em; }
html[lang="ar"] .verse-ref { letter-spacing: 0; }
.arch-rule { display: block; width: 64px; height: 1px; background: var(--gold); margin: 22px auto; position: relative; }
.arch-rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--gold); transform: translate(-50%, -50%) rotate(45deg); }
.arch-label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-600); }
html[lang="ar"] .arch-label { letter-spacing: 0; font-size: 0.9rem; }
.arch-time { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: 1.1; color: var(--green-900); margin-top: 8px; font-variant-numeric: lining-nums; }
html[lang="ar"] .arch-time { font-family: var(--font-display); }
.arch-date { margin-top: 4px; font-size: 1rem; color: var(--ink); }
.arch-imam { margin-top: 12px; font-size: 0.92rem; color: var(--ink-soft); }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 24px; height: 40px; transform: translateX(-50%); border: 1px solid rgba(226, 202, 147, 0.5); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold-2); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- friday ---------- */
.friday-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.facts { margin: 34px 0 0; }
.fact { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green-600); padding-top: 4px; }
html[lang="ar"] .fact dt { letter-spacing: 0; font-size: 0.95rem; padding-top: 0; }
.fact dd { margin: 0; font-size: 1.08rem; }

.friday-log { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: 0 30px 60px -40px rgba(15, 46, 38, 0.35); }
.friday-log h3 { font-size: 1.35rem; color: var(--green-900); margin-bottom: 18px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 112px 1fr 52px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.log li:first-child .log-time { color: var(--green-900); font-weight: 600; }
.log-date { color: var(--ink-soft); white-space: nowrap; }
.log-bar { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); width: calc(var(--w, 0.5) * 100%); transform-origin: left center; }
[dir="rtl"] .log-bar { background: linear-gradient(270deg, var(--gold), var(--gold-2)); transform-origin: right center; }
html.js .friday-log .log-bar { transform: scaleX(0); transition: transform 1.2s var(--ease); transition-delay: var(--bd, 0s); }
html.js .friday-log.in .log-bar { transform: scaleX(1); }
.log-time { font-family: var(--font-display); font-size: 1.1rem; text-align: end; font-variant-numeric: tabular-nums; }
.log-note { margin-top: 18px; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- monthly times ---------- */
.times { background: linear-gradient(180deg, transparent, rgba(233, 226, 207, 0.65) 30%, rgba(233, 226, 207, 0.65) 70%, transparent); }
.month-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 32px); align-items: end; }
.month {
  position: relative; text-align: center;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 50% 50% var(--radius) var(--radius) / 120px 120px var(--radius) var(--radius);
  padding: 92px 26px 32px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.month:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(15, 46, 38, 0.4); }
.month-ar { font-size: 2.5rem; line-height: 1.3; color: var(--green-800); }
.month-en { font-size: 1.25rem; color: var(--ink); }
html[lang="ar"] .month-en { font-family: var(--font-display); font-weight: 400; }
.month-meta { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 18px; }
.month.current { background: var(--green-900); border-color: var(--gold); color: var(--paper); padding-top: 112px; box-shadow: 0 40px 70px -40px rgba(10, 33, 27, 0.8); }
.month.current .month-ar { color: var(--gold-2); font-size: 2.9rem; }
.month.current .month-en { color: var(--paper); }
.month.current .month-meta { color: rgba(243, 239, 228, 0.7); }
.month-badge {
  position: absolute; top: 46px; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green-950); background: var(--gold-2); padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
html[lang="ar"] .month-badge { letter-spacing: 0; font-size: 0.85rem; }

/* ---------- majalis ---------- */
.majalis { background: linear-gradient(170deg, var(--green-950), var(--green-900)); color: var(--paper); overflow: hidden; isolation: isolate; }
.majalis-pattern { -webkit-mask-image: radial-gradient(ellipse at 15% 10%, #000 0%, transparent 60%); mask-image: radial-gradient(ellipse at 15% 10%, #000 0%, transparent 60%); }
.majalis .eyebrow { color: var(--gold-2); }
.majalis h2 { color: var(--paper); }
.majalis .body-lg { color: rgba(243, 239, 228, 0.74); }
.majalis-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }

.player-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.player-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); border: 1px solid var(--line-light); }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.86; transition: opacity 0.5s, transform 1.2s var(--ease); }
.player-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10, 33, 27, 0.55)); }
.player-poster:hover img { opacity: 1; transform: scale(1.03); }
.play-btn { position: absolute; z-index: 1; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(226, 202, 147, 0.18); transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.play-btn svg { width: 30px; height: 30px; fill: var(--green-950); margin-left: 4px; }
.player-poster:hover .play-btn { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(226, 202, 147, 0.14); }
.player-caption { margin-top: 22px; }
.player-date { font-size: 0.85rem; color: var(--gold-2); letter-spacing: 0.08em; }
html[lang="ar"] .player-date { letter-spacing: 0; }
.player-caption h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-top: 8px; color: var(--paper); }
.player-speaker { margin-top: 8px; color: rgba(243, 239, 228, 0.7); }

.playlist { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-light); border-radius: var(--radius); padding: 18px; }
.playlist-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-2); padding: 4px 10px 12px; }
html[lang="ar"] .playlist-label { letter-spacing: 0; font-size: 0.9rem; }
.playlist ul { list-style: none; margin: 0 0 16px; padding: 0; max-height: 400px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(226, 202, 147, 0.3) transparent; }
.pl-item {
  width: 100%; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline;
  text-align: start; background: transparent; border: 0; border-inline-start: 2px solid transparent;
  padding: 12px 12px; cursor: pointer; border-radius: 4px; color: rgba(243, 239, 228, 0.82);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.pl-item:hover { background: rgba(226, 202, 147, 0.07); color: var(--paper); }
.pl-item.active { background: rgba(226, 202, 147, 0.12); border-inline-start-color: var(--gold); color: var(--paper); }
.pl-date { font-size: 0.82rem; color: var(--gold-2); white-space: nowrap; }
.pl-title { font-size: 0.98rem; line-height: 1.45; }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.news-side { position: sticky; top: calc(var(--header-h) + 32px); }
.whatsapp-card { background: var(--green-900); color: var(--paper); border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; margin-top: 8px; }
.whatsapp-card svg { width: 28px; height: 28px; color: var(--gold-2); }
.whatsapp-card p { color: rgba(243, 239, 228, 0.82); font-size: 0.98rem; }
.whatsapp-card a { color: var(--gold-2); font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 118px; width: 1px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 118px 1fr; gap: 0; padding-bottom: 34px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 114px; top: 9px; width: 9px; height: 9px; background: var(--paper); border: 1.5px solid var(--gold); transform: rotate(45deg); }
.timeline li:first-child::before { background: var(--gold); }
.timeline time { font-family: var(--font-display); font-size: 0.98rem; color: var(--green-600); padding-top: 2px; padding-inline-end: 20px; }
html[lang="ar"] .timeline time { font-family: var(--font-ar-body); font-size: 0.92rem; }
.timeline li > div { padding-inline-start: 32px; }
.timeline h3 { font-size: 1.28rem; color: var(--green-900); }
html[lang="ar"] .timeline h3 { font-size: 1.32rem; }
.timeline p { margin-top: 8px; color: var(--ink-soft); }
.text-link { color: var(--green-600); font-weight: 600; text-underline-offset: 4px; white-space: nowrap; }
.text-link:hover { color: var(--green-900); }

/* ---------- visit ---------- */
.visit { padding-block: 0; }
.visit-grid { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 540px; background: var(--paper-2); }
.map-wrap { position: relative; min-height: 420px; }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(0.75) contrast(1.02); }
.visit-card { padding: clamp(40px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.visit-card h2 { margin-bottom: 22px; }
.visit-card address { font-style: normal; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.45; color: var(--ink); display: flex; flex-direction: column; margin-bottom: 22px; }
html[lang="ar"] .visit-card address { direction: ltr; text-align: end; align-self: stretch; }
html[lang="ar"] .visit-card address [data-l="ar"] { font-family: var(--font-ar-display); }
.visit-notes { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; color: var(--ink-soft); }
.visit-notes li { position: relative; padding-inline-start: 22px; }
.visit-notes li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.72em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
html[lang="ar"] .visit-notes li::before { top: 0.85em; }

/* ---------- contact ---------- */
.contact { background: linear-gradient(180deg, var(--green-900), var(--green-950)); color: var(--paper); overflow: hidden; isolation: isolate; }
.contact-pattern { -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }
.contact .eyebrow { color: var(--gold-2); }
.contact h2 { color: var(--paper); }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 3vw, 28px); max-width: 940px; margin-inline: auto; }
.contact-card { border: 1px solid var(--line-light); border-radius: var(--radius); padding: clamp(26px, 4vw, 40px); background: rgba(255, 255, 255, 0.035); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transition: border-color 0.4s, background-color 0.4s; }
.contact-card:hover { border-color: rgba(226, 202, 147, 0.5); background: rgba(255, 255, 255, 0.06); }
.cc-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-2); }
html[lang="ar"] .cc-label { letter-spacing: 0; font-size: 1rem; }
.cc-email { font-family: var(--font-display); font-size: clamp(1.15rem, 2.3vw, 1.6rem); color: var(--paper); text-decoration: none; overflow-wrap: anywhere; border-bottom: 1px solid rgba(226, 202, 147, 0.4); padding-bottom: 2px; direction: ltr; }
.cc-email:hover { border-bottom-color: var(--gold-2); }
.cc-note { color: rgba(243, 239, 228, 0.7); font-size: 0.98rem; flex-grow: 1; }
.copy-btn { margin-top: 8px; border: 1px solid rgba(226, 202, 147, 0.4); background: transparent; color: var(--gold-2); border-radius: 999px; padding: 7px 16px; font-size: 0.85rem; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.copy-btn:hover { background: var(--gold-2); color: var(--green-950); }
.socials { display: flex; justify-content: center; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-light); color: rgba(243, 239, 228, 0.85); font-size: 0.92rem; transition: border-color 0.3s, color 0.3s; }
.socials a:hover { border-color: var(--gold-2); color: var(--paper); }
.socials svg { width: 18px; height: 18px; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-950); color: rgba(243, 239, 228, 0.68); padding-block: 40px 48px; font-size: 0.9rem; border-top: 1px solid rgba(226, 202, 147, 0.12); }
.footer-row { display: grid; gap: 14px; justify-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; color: var(--paper); text-align: start; }
.footer-brand .brand-mark { color: var(--gold-2); }
.footer-name { font-family: var(--font-display); font-size: 1.05rem; }
.footer-name.ar { font-family: var(--font-ar-display); font-size: 1rem; opacity: 0.8; }
.footer-meta a { color: var(--gold-2); text-underline-offset: 3px; }
.footer-credit { margin-top: 6px; font-size: 0.8rem; color: rgba(243, 239, 228, 0.5); }
.footer-credit a { color: rgba(226, 202, 147, 0.85); text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--gold-2); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--gold-2); color: var(--green-950); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; transition: opacity 0.3s, transform 0.3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .header-tools { margin-inline-start: auto; }
  .nav {
    position: absolute; top: var(--header-h); inset-inline: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px clamp(16px, 4vw, 40px) 20px;
    background: rgba(243, 239, 228, 0.97); color: var(--ink);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(10, 33, 27, 0.35);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; }
  .menu-open.site-header { background: rgba(243, 239, 228, 0.97); color: var(--ink); }
  .menu-open .brand-mark { color: var(--gold); }
}

@media (max-width: 900px) {
  .hero { padding-bottom: 88px; }
  .hero-grid { grid-template-columns: 1fr; }
  .arch-card { justify-self: center; max-width: 380px; min-height: 0; padding: 100px 30px 40px; }
  .friday-grid, .news-grid, .majalis-head, .player-grid { grid-template-columns: 1fr; }
  .news-side { position: static; }
  .month-cards { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .month.current { order: -1; }
  .visit-grid { grid-template-columns: 1fr; }
  .map-wrap { min-height: 320px; }
  .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-en { font-size: 1rem; }
  .brand-ar { font-size: 0.82rem; }
  .brand-mark { width: 30px; height: 30px; }
  .hero-actions .btn { width: 100%; }
  .verse { font-size: 1.15rem; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .log li { grid-template-columns: 96px 1fr 48px; gap: 10px; }
  .timeline::before { inset-inline-start: 4px; }
  .timeline li { grid-template-columns: 1fr; padding-inline-start: 30px; padding-bottom: 28px; }
  .timeline li::before { inset-inline-start: 0; }
  .timeline time { padding: 0 0 4px; }
  .timeline li > div { padding-inline-start: 0; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .env, .hero-pattern, .majalis-pattern, .contact-pattern, .scroll-cue span { animation: none; }
  html.js .reveal, html.js .hero .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  html.js .arch-line { animation: none; stroke-dashoffset: 0; }
  html.js .ornament path { stroke-dashoffset: 0; transition: none; }
  html.js .ornament .ornament-gem { transform: none; transition: none; }
  html.js .friday-log .log-bar { transform: none; transition: none; }
  .btn:hover, .month:hover { transform: none; }
}
