/* =========================================================
   Sayed Nassrat Kachakech — Official Website
   Arabic only, several pages. Navy + logo gold on warm ivory.
   Hero: a real photograph of the Sayed on the minbar.
   Soft rounded cards, GE SS Two.
   ========================================================= */

/* The whole site uses GE SS Two (bold text uses Noto Kufi Arabic Bold). */
@font-face { font-family: "GE SS Two"; src: url("../fonts/GESSTwoLight-Light.otf") format("opentype"); font-weight: 100 600; font-display: swap; }
@font-face { font-family: "GE SS Two"; src: url("../fonts/NotoKufiArabic-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Nsr Amiri"; src: url("../fonts/Amiri-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nsr Amiri"; src: url("../fonts/Amiri-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #FAF6EF;            /* warm ivory */
  --band: #F2EADC;          /* deeper ivory band */
  --surface: #FFFFFF;
  --surface-2: #F5EEE1;
  --surface-3: #EADFCB;
  --navy: #14172A;          /* the dark of the minbar photographs */
  --navy-2: #1D2138;
  --ink: #171A2B;
  --ink-2: #474B5C;
  --ink-3: #666A7B;
  --border: #E6DAC4;
  --border-strong: #D3C3A4;
  --primary: #A47E33;       /* gold of the logo, darkened for text contrast */
  --primary-hover: #8C6A27;
  --bronze: #A47E33;
  --gold: #C39B4C;
  --gold-light: #E2C88C;
  --gold-text: #7C5D1F;
  --shadow-sm: 0 1px 2px rgb(60 46 20 / .06);
  --shadow-md: 0 8px 24px rgb(60 46 20 / .09);
  --shadow-lg: 0 18px 44px rgb(60 46 20 / .15);

  --font-ui: "GE SS Two", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-classic: "Nsr Amiri", "Amiri", serif; /* poem and hadith only */

  --radius-sm: 8px; --radius: 14px; --radius-lg: 18px; --radius-xl: 26px; --radius-pill: 999px;
  --header-h: 70px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 180ms;
  --pad: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.8 var(--font-ui);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
abbr { text-decoration: none; color: var(--bronze); }
svg { width: 22px; height: 22px; flex: none; }
::selection { background: var(--gold-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); }
.center { text-align: center; margin-top: 40px; }
.skip { position: fixed; inset-inline-start: 16px; top: -80px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  font-size: 16px; font-weight: 700; line-height: 1.2; cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn--sm svg { width: 18px; height: 18px; }
.btn--primary { background: linear-gradient(135deg, #B8913F, #9A7530); border-color: transparent; color: #fff; box-shadow: 0 10px 24px rgb(120 90 30 / .35); }
.btn--primary:hover { background: linear-gradient(135deg, #A47E33, #856425); box-shadow: 0 14px 30px rgb(120 90 30 / .42); }
.btn--outline { background: transparent; border-color: var(--bronze); color: var(--gold-text); }
.btn--outline:hover { background: var(--bronze); color: #fff; }
.btn--ghost { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .5); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- Header: clear over the photograph, white once scrolled ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); color: #fff;
  background: linear-gradient(180deg, rgb(20 23 42 / .55), rgb(20 23 42 / 0));
  transition: background-color 220ms var(--ease), box-shadow 220ms var(--ease), color 220ms var(--ease);
}
.header.is-scrolled { color: var(--ink); background: rgb(255 255 255 / .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--border), 0 8px 24px rgb(60 46 20 / .07); }
.header__inner { height: 100%; max-width: 1360px; margin: 0 auto; padding-inline: var(--pad); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.brand img { height: 42px; width: auto; }
.header__nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.header__nav a { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; font-size: 15.5px; font-weight: 500; opacity: .86; transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease); }
.header__nav a svg { display: none; }
.header__nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transition: transform 260ms var(--ease); }
.header__nav a:hover, .header__nav a.is-active { opacity: 1; }
.header__nav a.is-active { font-weight: 700; }
.header__nav a:hover::after, .header__nav a.is-active::after { transform: scaleX(1); }
.header__tools { display: flex; align-items: center; gap: 8px; }
.header .btn--outline { border-color: var(--gold-light); color: var(--gold-light); }
.header.is-scrolled .btn--outline { border-color: var(--bronze); color: var(--gold-text); }
.header .btn--outline:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.burger { display: none; width: 46px; height: 46px; place-items: center; border-radius: 50%; border: 1.5px solid currentColor; }
.burger svg { width: 22px; height: 22px; }
body.is-locked .header { color: var(--ink); background: var(--bg); }

.drawer { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; gap: 4px; padding: calc(var(--header-h) + 16px) 16px 24px; background: var(--bg); overflow-y: auto; animation: fade 200ms var(--ease); }
.drawer[hidden] { display: none; }
.drawer a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding-inline: 16px; border-radius: var(--radius); font-size: 18px; font-weight: 500; color: var(--ink); }
.drawer a svg { color: var(--bronze); }
.drawer a:hover { background: var(--surface-2); }

/* ---------- Hero: full photograph of the Sayed on the minbar ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: max(100svh, 700px); display: flex; align-items: flex-end; background: var(--navy); color: #fff; }
/* The photo is as tall as the hero; it slides left on narrower screens so the face stays clear of the text. */
.hero__photo { position: absolute; inset: 0; z-index: -1; --hh: max(100svh, 700px); background: var(--navy) url("../img/hero-main.jpg?v=48") min(0px, calc(29vw - var(--hh) * .84)) 0 / auto 100% no-repeat; animation: heroDrift 26s ease-in-out infinite alternate; transform-origin: 25% 35%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(to left, rgb(20 23 42 / .95) 0%, rgb(20 23 42 / .9) 30%, rgb(20 23 42 / .6) 42%, rgb(20 23 42 / 0) 56%),
  linear-gradient(to top, rgb(20 23 42 / .96) 0%, rgb(20 23 42 / .4) 22%, rgb(20 23 42 / 0) 42%),
  linear-gradient(to bottom, rgb(20 23 42 / .6) 0%, rgb(20 23 42 / 0) 22%); }
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.05); } }
.hero__inner { display: grid; grid-template-columns: minmax(0, 510px); justify-content: start; gap: clamp(26px, 3.4vw, 44px); padding-block: calc(var(--header-h) + 40px) clamp(40px, 6vw, 76px); }
.hero__pre { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; color: var(--gold-light); }
.hero__pre::before { content: ""; width: 34px; height: 2px; border-radius: 2px; background: var(--gold); }
.hero__name { margin-top: 10px; font-weight: 700; line-height: 1.4; }
.hero__name span { display: block; font-size: clamp(34px, 3.8vw, 54px); white-space: nowrap; }
.hero__name small { display: block; font-size: clamp(22px, 2.4vw, 34px); font-weight: 400; color: var(--gold-light); line-height: 1.4; }
.hero__role { margin-top: 14px; font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; color: #fff; }
.hero__lead { margin-top: 8px; max-width: 520px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.95; color: rgb(255 255 255 / .8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Latest lecture card inside the hero */
.latest { display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 16px; width: min(460px, 100%); padding: 10px; text-align: start; border-radius: 22px; color: #fff; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.latest:hover { background: rgb(255 255 255 / .18); transform: translateY(-2px); }
.latest__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; }
.latest__thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest .play { width: 38px; height: 38px; box-shadow: 0 0 0 5px rgb(255 255 255 / .25); }
.latest .play::after { border-width: 6px 0 6px 10px; margin-left: 3px; }
.latest__body { display: flex; flex-direction: column; gap: 2px; padding-inline-end: 8px; }
.latest__body small { font-size: 13.5px; color: var(--gold-light); }
.latest__body b { font-size: 16px; font-weight: 700; line-height: 1.6; }
.js .latest.rv.in:hover { transform: translateY(-2px); transition-delay: 0s; }

/* ---------- Bands ---------- */
.band { padding-block: clamp(56px, 7vw, 100px); }
.band--cream { background: var(--bg); }
.band--sand { background: var(--band); }
.rule-title { position: relative; margin-bottom: clamp(22px, 2.8vw, 36px); padding-top: 20px; color: var(--ink); font-size: clamp(26px, 3vw, 42px); font-weight: 700; line-height: 1.5; }
.rule-title::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #B8913F, #E2C88C); }
.lead { max-width: 720px; margin: calc(clamp(22px, 2.8vw, 36px) * -0.5) 0 clamp(28px, 3.4vw, 44px); color: var(--ink-2); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.95; }
.note { max-width: 720px; margin: 28px auto 0; text-align: center; color: var(--ink-3); font-size: 15.5px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }

/* ---------- Library ---------- */
.feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); margin-bottom: clamp(28px, 3.4vw, 44px); }
.feature__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; background: var(--surface-3); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.feature__media:hover img { transform: scale(1.03); }
.feature__body { padding: clamp(22px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.feature__tag { display: inline-flex; align-items: center; min-height: 30px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--gold-text); font-size: 13.5px; font-weight: 700; }
.feature__title { margin: 14px 0 10px; font-size: clamp(22px, 2.1vw, 30px); font-weight: 700; line-height: 1.6; color: var(--ink); }
.feature__body p { color: var(--ink-2); margin-bottom: 22px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: var(--radius-pill); background: var(--navy); color: #fff; font-size: 16px; font-weight: 700; box-shadow: 0 10px 22px rgb(20 23 42 / .25); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.link-arrow i { display: grid; place-items: center; }
.link-arrow svg { width: 20px; height: 20px; }
.link-arrow:hover { background: var(--navy-2); transform: translateY(-2px); }

.play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .9); box-shadow: 0 0 0 8px rgb(255 255 255 / .28), 0 10px 26px rgb(0 0 0 / .28); transition: transform var(--dur) var(--ease); }
.play::after { content: ""; margin-left: 5px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--primary); }
.feature__media:hover .play, .vcard:hover .play { transform: scale(1.08); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab { min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: rgb(255 255 255 / .55); color: var(--ink-2); font-size: 15.5px; font-weight: 500; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tab:hover { border-color: var(--bronze); color: var(--bronze); }
.tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px clamp(14px, 1.6vw, 24px); }
.vcard { display: block; text-align: center; cursor: pointer; animation: cardIn 420ms var(--ease) both; }
.vcard__media { display: block; position: relative; }
.vcard__img { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--surface-3); box-shadow: 0 6px 16px rgb(92 70 42 / .16); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; }
.vcard:hover .vcard__img { box-shadow: 0 14px 30px rgb(92 70 42 / .26); transform: translateY(-4px); }
.vcard .play { width: 50px; height: 50px; opacity: 0; box-shadow: 0 0 0 6px rgb(255 255 255 / .28); }
.vcard .play::after { border-width: 7px 0 7px 12px; margin-left: 3px; }
.vcard:hover .play, .vcard:focus-visible .play { opacity: 1; }
.vcard__num { position: absolute; z-index: 2; top: 8px; inset-inline-start: 8px; min-width: 30px; height: 26px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: var(--radius-pill); background: rgb(255 255 255 / .9); color: var(--gold-text); font-size: 13px; font-weight: 700; }
.vcard__title { display: block; margin-top: 12px; font-size: 16px; font-weight: 400; line-height: 1.6; color: var(--ink); }
.vcard:hover .vcard__title { color: var(--bronze); }
.vcard__meta { display: block; font-size: 13.5px; color: var(--ink-3); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(16px, 2vw, 28px); align-items: start; }
.about__text { padding: clamp(22px, 3vw, 40px); }
.about__text :is(h2, h3) { font-size: clamp(20px, 1.9vw, 26px); font-weight: 700; line-height: 1.6; color: var(--ink); margin-bottom: 12px; }
.about__text p { color: var(--ink-2); font-size: 17px; line-height: 2; margin-bottom: 12px; }
.name-note { display: flex; align-items: center; gap: 18px; margin: 20px 0 0 !important; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--surface-2); font-size: 15.5px !important; }
.name-note b { font-family: var(--font-classic); font-size: 34px; line-height: 1.3; color: var(--gold-text); white-space: nowrap; }
.steps { display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.steps li:hover { transform: translateX(-4px); box-shadow: var(--shadow-md); }
.steps b { font-size: 22px; font-weight: 700; color: var(--bronze); line-height: 1.4; }
.steps span { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.6vw, 22px); margin-top: clamp(22px, 3vw, 36px); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; text-align: center; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.stat__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--bronze); background: var(--surface); box-shadow: 0 6px 16px rgb(92 70 42 / .12); }
.stat b { font-size: clamp(30px, 3.2vw, 44px); font-weight: 700; line-height: 1.3; color: var(--ink); }
.stat > span:last-child { font-size: 15px; color: var(--ink-2); }

/* ---------- Hadith (navy band) ---------- */
.hadith { position: relative; isolation: isolate; text-align: center; background: var(--navy); color: #fff; }
.hadith::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 50% 0%, rgb(195 155 76 / .22), transparent 70%); }
.hadith blockquote { max-width: 940px; margin: 0 auto; }
.hadith blockquote::before { content: ""; display: block; width: 56px; height: 4px; margin: 0 auto; border-radius: 4px; background: linear-gradient(90deg, #B8913F, #E2C88C); }
.hadith p { margin-block: 24px 8px; font-family: var(--font-classic); font-weight: 700; font-size: clamp(28px, 3.8vw, 54px); line-height: 1.7; color: var(--gold-light); }
.hadith cite { display: block; font-style: normal; font-size: 15.5px; color: rgb(255 255 255 / .65); }

/* ---------- Shrines ---------- */
.shrines { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.8vw, 24px); }
.shrine { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 14px 24px; text-align: center; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.shrine:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ptile__icon { display: grid; place-items: center; color: var(--bronze); }
.ptile__icon svg { width: 30px; height: 30px; }
.shrine .ptile__icon { width: 72px; height: 72px; margin-bottom: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.shrine h3 { font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; line-height: 1.6; color: var(--ink); }
.shrine p { font-size: 15px; color: var(--bronze); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(24px, 3vw, 38px); }
.chips li { min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); background: rgb(255 255 255 / .55); border: 1px solid var(--border-strong); font-size: 15px; color: var(--ink-2); }

/* ---------- Poem ---------- */
.poem { max-width: 900px; margin: 0 auto; padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 56px); text-align: center; border-radius: 28px; }
.poem__title { font-size: clamp(20px, 2vw, 26px); font-weight: 700; color: var(--bronze); margin-bottom: 14px; }
.bayt { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 4vw, 56px); padding: 14px 0; font-family: var(--font-classic); font-size: clamp(20px, 2vw, 27px); line-height: 1.9; color: var(--ink); white-space: nowrap; }
.bayt + .bayt { border-top: 1px solid var(--border); }
.bayt span:first-child { text-align: left; }
.bayt span:last-child { text-align: right; }

/* ---------- Gallery ---------- */
.gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(170px, 17vw, 250px); gap: clamp(10px, 1.2vw, 18px); }
.shot { position: relative; overflow: hidden; padding: 0; border-radius: 18px; cursor: zoom-in; background: var(--surface-3); box-shadow: 0 6px 16px rgb(92 70 42 / .16); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.shot--wide { grid-column: span 2; }
.shot--wide:last-child { grid-column: span 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.shot:hover { box-shadow: 0 14px 30px rgb(92 70 42 / .26); transform: translateY(-3px); }
.shot:hover img { transform: scale(1.04); }

/* ---------- Invite form ---------- */
.form { max-width: 880px; margin: 0 auto; padding: clamp(20px, 3.4vw, 44px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--bronze) 50%), linear-gradient(135deg, var(--bronze) 50%, transparent 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: left 20px center, left 14px center; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background-color: #fff; border-color: var(--bronze); box-shadow: 0 0 0 4px rgb(139 111 77 / .16); }
.field input[aria-invalid="true"] { border-color: #B91C1C; }
.form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.form__status { font-size: 15px; color: var(--gold-text); }


/* ---------- Section heading with a "see all" link ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: clamp(22px, 2.8vw, 36px); }
.sec-head .rule-title { margin-bottom: 0; }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold-text); font-size: 15.5px; font-weight: 700; }
.more svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.more:hover svg { transform: translateX(-4px); }
.btn--navy { background: var(--navy); color: #fff; box-shadow: 0 10px 22px rgb(20 23 42 / .25); }
.btn--navy:hover { background: var(--navy-2); }
.btn svg { width: 20px; height: 20px; }
.sub-title { margin-top: clamp(28px, 4vw, 48px); font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; color: var(--ink); }
.sub-title + .chips { margin-top: 14px; }

/* ---------- Inner page banner ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + clamp(34px, 5vw, 64px)) 0 clamp(34px, 5vw, 60px); background: var(--navy); color: #fff; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../img/page-bg.jpg") center 40% / cover no-repeat; opacity: .34; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(to left, rgb(20 23 42 / .96) 0%, rgb(20 23 42 / .7) 55%, rgb(20 23 42 / .35) 100%),
  linear-gradient(to top, rgb(20 23 42 / .9) 0%, rgb(20 23 42 / 0) 70%); }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14.5px; color: rgb(255 255 255 / .62); }
.crumbs a:hover { color: var(--gold-light); }
.crumbs span:last-child { color: var(--gold-light); }
.page-hero h1 { position: relative; padding-top: 20px; font-size: clamp(30px, 4vw, 52px); font-weight: 700; line-height: 1.45; }
.page-hero h1::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #B8913F, #E2C88C); }
.page-hero p { max-width: 660px; margin-top: 8px; color: rgb(255 255 255 / .78); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.95; }

/* ---------- Home: biography teaser ---------- */
.split { display: grid; grid-template-columns: minmax(0, 430px) 1fr; align-items: center; gap: clamp(28px, 6vw, 84px); }
.split__photo { position: relative; }
.split__photo img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.split__photo figcaption { position: absolute; inset-inline-end: -22px; bottom: 30px; display: flex; flex-direction: column; padding: 12px 20px 14px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.split__photo figcaption b { font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--bronze); }
.split__photo figcaption span { font-size: 14px; color: var(--ink-2); }
.split__text > p { max-width: 640px; margin-bottom: 12px; color: var(--ink-2); font-size: 17px; line-height: 2; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 10px clamp(22px, 3.4vw, 52px); margin: 22px 0 28px; }
.mini-stats li { display: flex; flex-direction: column; }
.mini-stats b { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.3; color: var(--ink); }
.mini-stats span { font-size: 14.5px; color: var(--ink-3); }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.ncard { display: flex; flex-direction: column; overflow: hidden; text-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); cursor: zoom-in; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ncard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ncard__img { position: relative; display: block; aspect-ratio: 760 / 480; overflow: hidden; background: var(--surface-3); }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.ncard:hover .ncard__img img { transform: scale(1.04); }
.ncard__count { position: absolute; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--radius-pill); background: rgb(20 23 42 / .72); color: #fff; font-size: 13.5px; font-weight: 700; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ncard__count svg { width: 16px; height: 16px; }
.ncard__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.ncard time { font-size: 13.5px; font-weight: 700; color: var(--gold-text); }
.ncard b { font-size: 18px; font-weight: 700; line-height: 1.65; color: var(--ink); }
.ncard__place { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink-3); }
.ncard__place svg { width: 17px; height: 17px; color: var(--bronze); }
.follow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-top: clamp(28px, 4vw, 48px); padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 40px); }
.follow h2 { font-size: clamp(19px, 1.8vw, 23px); font-weight: 700; color: var(--ink); }
.follow p { color: var(--ink-2); }
.socials--light a { color: var(--gold-text); border-color: var(--border-strong); }

/* ---------- Gallery page (masonry) ---------- */
.masonry { columns: 4; column-gap: clamp(10px, 1.2vw, 18px); }
.mshot { display: block; width: 100%; margin-bottom: clamp(10px, 1.2vw, 18px); padding: 0; overflow: hidden; break-inside: avoid; border-radius: 18px; cursor: zoom-in; background: var(--surface-3); box-shadow: 0 6px 16px rgb(92 70 42 / .16); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.mshot img { width: 100%; height: auto; transition: transform 600ms var(--ease); }
.mshot:hover { box-shadow: 0 14px 30px rgb(92 70 42 / .26); transform: translateY(-3px); }
.mshot:hover img { transform: scale(1.04); }

/* ---------- Poetry page ---------- */
.chips--links { justify-content: center; margin: 0 0 clamp(26px, 3.4vw, 44px); }
.chips--links a { min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); background: rgb(255 255 255 / .6); border: 1.5px solid var(--border-strong); color: var(--ink-2); font-size: 15.5px; font-weight: 500; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.chips--links a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.poem-wrap + .poem-wrap { margin-top: clamp(36px, 5vw, 64px); }
.poem__sub { margin: -8px 0 14px; font-size: 15px; color: var(--ink-3); }
.poem__more { margin-top: 16px; }
.lead--center { margin: 0 auto 22px; text-align: center; }

/* ---------- Biography page ---------- */
.about { align-items: stretch; }
.about__side { display: flex; }
.about__photo { flex: 1; }
.about__photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.steps--row { grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.steps--row li { grid-template-columns: 1fr; gap: 4px; padding: 22px 14px; text-align: center; }
.steps--row li:hover { transform: translateY(-4px); }

/* ---------- Invitation page ---------- */
.invite { display: grid; grid-template-columns: 1.7fr 1fr; align-items: start; gap: clamp(16px, 2vw, 28px); }
.invite .form { max-width: none; margin: 0; }
.invite__side { display: grid; gap: clamp(16px, 2vw, 28px); }
.tips { padding: clamp(20px, 2.6vw, 32px); }
.tips h2 { margin-bottom: 12px; font-size: 20px; font-weight: 700; color: var(--ink); }
.tips ol { display: grid; gap: 14px; }
.tips li { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 12px; color: var(--ink-2); font-size: 15.5px; line-height: 1.85; }
.tips li b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--gold-text); font-weight: 700; }
.tips--navy { background: var(--navy); border-color: transparent; color: rgb(255 255 255 / .75); }
.tips--navy h2 { color: #fff; }
.tips--navy .socials { margin-top: 16px; }

/* ---------- Invitation banner at the foot of pages ---------- */
.band--cta { padding-top: 0; }
.band--sand + .band--cta { padding-top: clamp(56px, 7vw, 100px); }
.cta { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px; padding: clamp(26px, 4vw, 54px); border-radius: 30px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 0% 0%, rgb(195 155 76 / .3), transparent 70%); }
.cta h2 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; line-height: 1.5; }
.cta p { max-width: 560px; color: rgb(255 255 255 / .76); }

/* ---------- Footer (navy) ---------- */
.footer { background: var(--navy); color: rgb(255 255 255 / .72); font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px clamp(24px, 4vw, 72px); padding-block: clamp(44px, 5vw, 72px); }
.footer__about img { width: 54px; height: auto; margin-bottom: 14px; }
.footer__about p { max-width: 460px; line-height: 1.9; color: var(--gold-light); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; }
.footer__col h2 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer__col > a { display: inline-flex; align-items: center; min-height: 38px; transition: color var(--dur) var(--ease); }
.footer__col > a:hover { color: var(--gold-light); }
.socials { display: flex; gap: 8px; }
.socials[hidden] { display: none; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-light); border: 1px solid rgb(255 255 255 / .22); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer__bottom { border-top: 1px solid rgb(255 255 255 / .12); font-size: 14px; color: rgb(255 255 255 / .55); }
.footer__bottom-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 16px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 70px var(--pad) 40px; background: rgb(20 23 42 / .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 200ms var(--ease); }
.modal[hidden] { display: none; }
.modal__body { width: min(1120px, 100%); }
.modal__body img { max-height: 80vh; width: auto; margin: auto; border-radius: 18px; }
.ratio { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #000; box-shadow: 0 30px 70px rgb(0 0 0 / .5); }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__close { position: absolute; top: 16px; inset-inline-end: 18px; width: 48px; height: 48px; border-radius: 14px; background: rgb(255 255 255 / .92); color: var(--ink); font-size: 26px; line-height: 1; }
.modal__close:hover { background: #fff; }
.modal--photo .modal__body { width: auto; max-width: min(1120px, 100%); }
.modal--photo figcaption { margin-top: 12px; text-align: center; color: rgb(255 255 255 / .85); font-size: 15px; }
.modal__nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3); transition: background var(--dur) var(--ease); }
.modal__nav:hover { background: var(--gold); border-color: var(--gold); }
.modal__nav[hidden] { display: none; }
.modal__nav--prev { right: 18px; }
.modal__nav--prev svg { transform: scaleX(-1); }
.modal__nav--next { left: 18px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Reveal (subtle) ---------- */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.in:is(.shrine, .steps li, .shot, .mshot, .ncard):hover { transition-delay: 0s; }
.js .shrine.rv.in:hover { transform: translateY(-4px); }
.js :is(.shot, .mshot).rv.in:hover { transform: translateY(-3px); }
.js .ncard.rv.in:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) and (min-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 470px); }
  .hero__name span { font-size: 40px; }
}

@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { columns: 3; }
  .header__nav a { padding: 0 10px; }
}

@media (max-width: 1023px) {
  .header__nav, .header .btn--sm { display: none; }
  .header__inner { justify-content: space-between; }
  .burger { display: grid; }

  .hero { min-height: max(100svh, 640px); }
  .hero__photo { background-image: url("../img/hero-main-sm.jpg?v=48"); background-position: 44% top; background-size: auto 62%; animation: none; }
  .hero::after { background: linear-gradient(to top, rgb(20 23 42 / 1) 0%, rgb(20 23 42 / .97) 42%, rgb(20 23 42 / .3) 60%, rgb(20 23 42 / .25) 100%); }
  .hero__inner { grid-template-columns: 1fr; padding-top: 46svh; }
  .hero__name span { white-space: normal; }
  .latest { width: 100%; }

  .about { grid-template-columns: 1fr; }
  .about__photo img { aspect-ratio: 4 / 3; min-height: 0; }
  .split { grid-template-columns: 1fr; }
  .split__photo { max-width: 440px; }
  .split__photo figcaption { inset-inline-end: 14px; bottom: 14px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .steps--row { grid-template-columns: repeat(3, 1fr); }
  .invite { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .shrines, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
  .bayt { white-space: normal; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand { font-size: 17px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .vcard__title { font-size: 14.5px; }
  .gal { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .shot--wide:last-child { grid-column: span 2; }
  .form { grid-template-columns: 1fr; }
  .bayt { grid-template-columns: 1fr; gap: 0; padding: 12px 0; }
  .bayt span:first-child, .bayt span:last-child { text-align: center; }
  .name-note { flex-direction: column; align-items: flex-start; gap: 2px; }
  .steps li { grid-template-columns: 80px 1fr; padding: 14px 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
  .steps--row { grid-template-columns: 1fr; }
  .steps--row li { grid-template-columns: 80px 1fr; text-align: start; }
  .steps--row li:hover { transform: none; }
  .cta .btn { flex: 1 1 100%; }
  .modal__nav { width: 44px; height: 44px; top: auto; bottom: 18px; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; }
}
