/* Masjid Hearts: base styles (ported from the Astro build) */
/* playfair-display-cyrillic-wght-normal */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-cyrillic-wght-normal.5WvUvBgz.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* playfair-display-vietnamese-wght-normal */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-vietnamese-wght-normal.Cabi7G8-.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* playfair-display-latin-ext-wght-normal */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-latin-ext-wght-normal.CT1r92Rl.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* playfair-display-latin-wght-normal */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-latin-wght-normal.BOwq7MWX.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* playfair-display-cyrillic-wght-italic */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-cyrillic-wght-italic.D5dBZ3aJ.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* playfair-display-vietnamese-wght-italic */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-vietnamese-wght-italic.DUEcMSM3.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* playfair-display-latin-ext-wght-italic */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-latin-ext-wght-italic.ze_cPdSg.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* playfair-display-latin-wght-italic */
@font-face {
  font-family: 'Playfair Display Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url(../fonts/playfair-display-latin-wght-italic.DmbndNpe.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* figtree-latin-ext-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(../fonts/figtree-latin-ext-wght-normal.DCwSJGxG.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* figtree-latin-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(../fonts/figtree-latin-wght-normal.D_ZTVpCC.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* newsreader-vietnamese-wght-normal */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-vietnamese-wght-normal.Czsa-EzN.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* newsreader-latin-ext-wght-normal */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-latin-ext-wght-normal.C-3rgBeH.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* newsreader-latin-wght-normal */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-latin-wght-normal.CCVVNp6i.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* newsreader-vietnamese-wght-italic */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-vietnamese-wght-italic.xAqemagA.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* newsreader-latin-ext-wght-italic */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-latin-ext-wght-italic.DFS986qL.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* newsreader-latin-wght-italic */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/newsreader-latin-wght-italic.Bxi8ein9.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  /* Brand guide: #00483D, #CFB083, #FFFFFF */
  --green: #00483d;
  --green-deep: #00332b;
  --green-night: #00231e;
  --gold: #cfb083;
  --gold-soft: #e7d6b8;
  --gold-ink: #7a5e33; /* gold dark enough for small text on white */
  --white: #ffffff;
  --mist: #f1f6f4;
  --ink: #0b2a25;
  --ink-soft: #46605a;
  --line: rgba(0, 72, 61, 0.14);
  --line-light: rgba(231, 214, 184, 0.2);

  --display: 'Playfair Display Variable', 'Playfair Display', Georgia, serif;
  --sans: 'Figtree Variable', Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader Variable', Newsreader, Georgia, serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 148px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--green-night); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main :focus-visible, .site-header :focus-visible { outline-color: var(--green); }
.dark :focus-visible, .site-footer :focus-visible, .site-header.over-dark:not(.scrolled):not(.open) :focus-visible { outline-color: var(--gold-soft); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--green-night); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.dark { background: var(--green); color: var(--white); }
.mist { background: var(--mist); }

/* ---------- Type ---------- */
.display {
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); }
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.18; }
.display em { font-style: italic; font-weight: 500; color: var(--gold); }
.on-light .display em, .mist .display em { color: var(--gold-ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-ink);
}
.dark .eyebrow { color: var(--gold-soft); }
.eyebrow svg { width: 13px; height: 13px; flex: none; }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.6; color: var(--ink-soft); max-width: 58ch; text-wrap: pretty; }
.dark .lede { color: rgba(255, 255, 255, 0.82); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: var(--green-night); }
.btn-gold:hover { background: var(--gold-soft); box-shadow: 0 10px 30px -12px rgba(207, 176, 131, 0.7); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-deep); box-shadow: 0 12px 30px -14px rgba(0, 72, 61, 0.7); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.34); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-line { border-color: var(--line); color: var(--green); }
.btn-line:hover { border-color: var(--green); }
.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--green); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 3px;
}
.dark .link { color: var(--gold); }
.link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.link:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--green);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.site-header.over-dark:not(.scrolled):not(.open) { background: transparent; color: var(--white); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.brand svg { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 550; font-size: 0.98rem; position: relative; padding: 6px 0; }
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }
.menu-btn { display: none; width: 44px; height: 44px; margin-inline-end: -10px; border: 0; background: none; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn span:first-child, .menu-btn span:first-child::before { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-btn span:first-child { position: relative; transform: translateY(-4px); }
.menu-btn span:first-child::before { content: ''; position: absolute; top: 8px; }
.open .menu-btn span:first-child { transform: translateY(0) rotate(45deg); }
.open .menu-btn span:first-child::before { transform: translateY(-8px) rotate(-90deg); }

@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .site-header .bar { height: 64px; }
  .brand svg { height: 38px; }
  .nav {
    position: fixed; inset: 64px 0 0 0; height: calc(100dvh - 64px); background: var(--white); color: var(--green);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 32px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  }
  .open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { font-family: var(--display); font-weight: 650; font-size: 1.9rem; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 28px; min-height: 54px; font-size: 1.05rem; }
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Cards / covers ---------- */
.cover { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--green); aspect-ratio: 16 / 10; isolation: isolate; }
.cover > svg, .cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
a:hover .cover > svg, a:hover .cover > img { transform: scale(1.045); }
.card { display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: inherit; }
.card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.card .meta .cat { color: var(--gold-ink); }
.card .meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.card h3 { font-family: var(--display); font-weight: 650; font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.18; letter-spacing: -0.01em; text-wrap: balance; }
.card h3 span { background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1.5px no-repeat; transition: background-size 0.45s var(--ease); }
.card:hover h3 span { background-size: 100% 1.5px; }
.card p { color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-night); color: rgba(255, 255, 255, 0.78); padding: clamp(56px, 8vw, 96px) 0 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.foot-brand svg { height: 54px; width: auto; color: var(--white); }
.foot-brand p { margin-top: 20px; max-width: 34ch; }
.foot-col h2 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 650; margin-bottom: 16px; }
.foot-col li + li { margin-top: 10px; }
.foot-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-light); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Language switch ---------- */
.lang-switch { font-weight: 600; }
.lang-switch:lang(ar) { font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif; font-size: 1.02rem; }
.lang-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 4px; font-family: var(--sans); font-size: 0.62rem; font-weight: 650; letter-spacing: 0.08em; line-height: 1.5; vertical-align: 0.25em; opacity: 0.7; }

/* ---------- Right to left ---------- */
[dir='rtl'] .arrow { transform: scaleX(-1); }
[dir='rtl'] .btn:hover svg.arrow, [dir='rtl'] .link:hover svg { transform: scaleX(-1) translateX(4px); }
[dir='rtl'] .nav a:not(.btn)::after { transform-origin: right; }
[dir='rtl'] .card h3 span { background-position: 100% 100%; }

@media print { .js [data-reveal] { opacity: 1; transform: none; } .site-header { position: static; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

.dome {
  width: 100%;
  height: auto;
  overflow: visible;
}

.heart, .finial {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .heart {
    opacity: 0;
    animation: .7s cubic-bezier(.22, .8, .26, 1) forwards gather, 1.1s ease-in-out glow;
    animation-delay: calc(.1s + var(--i) * 40ms), calc(2.1s + var(--i) * 40ms);
  }

  .finial {
    opacity: 0;
    transform-origin: 50% 100%;
    animation: .9s cubic-bezier(.22, .8, .26, 1) forwards rise;
    animation-delay: calc(.15s + var(--i) * 40ms);
  }
}

@keyframes gather {
  from {
    opacity: 0;
    transform: translateY(22%) scale(.5);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12%) scaleY(.7);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes glow {
  0%, 100% {
    fill: #cfb083;
  }

  50% {
    fill: #f6ead2;
  }
}
