/* =====================================================================
   University of Edinburgh Islamic Society (Edinburgh ISoc)
   Global stylesheet (all pages)
   Handwritten CSS. No frameworks, no bundlers.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Parisienne&family=Inter:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ---------- Design tokens — navy / gold / cream ---------- */
:root {
  --ink: #11154a;
  --ink2: #0a0c2c;
  --green: #44467c;
  --green2: #2c2f5a;
  --gold: #c9a24b;
  --gold-lt: #e3cd97;
  --cream: #f3eedd;
  --panel: #eae3cc;
  --text: #23264a;
  --muted: #5c5f85;
  --white: #ffffff;
  --line: #ddd3ba;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', Times, serif;
  --serif-italic: 'Cormorant Garamond', Georgia, serif;
  --script: 'Parisienne', 'Snell Roundhand', cursive;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --arabic: 'Noto Naskh Arabic', 'Geeza Pro', 'Traditional Arabic', serif;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --maxw: 1120px;
  --shadow-sm: 0 2px 8px rgba(18, 21, 58, 0.08);
  --shadow: 0 14px 34px -6px rgba(18, 21, 58, 0.18), 0 4px 10px -4px rgba(18, 21, 58, 0.12);
  --shadow-lg: 0 30px 60px -12px rgba(18, 21, 58, 0.32), 0 10px 24px -8px rgba(18, 21, 58, 0.18);
  --ring: 0 0 0 3px rgba(201, 162, 75, 0.38);

  /* subtle 8-point Islamic star lattice, tokenised so any section can call it */
  --pattern-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9a24b' stroke-width='1'%3E%3Cpath d='M42 4 L54 20 L74 20 L62 36 L74 52 L54 52 L42 68 L30 52 L10 52 L22 36 L10 20 L30 20 Z'/%3E%3Ccircle cx='42' cy='36' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23f3eedd' stroke-width='1'%3E%3Cpath d='M42 4 L54 20 L74 20 L62 36 L74 52 L54 52 L42 68 L30 52 L10 52 L22 36 L10 20 L30 20 Z'/%3E%3Ccircle cx='42' cy='36' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green2); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--ink);
  line-height: 1.14;
  font-weight: 600;
  margin: 0 0 .4em;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.28rem; font-weight: 600; }
p { margin: 0 0 1rem; max-width: 62ch; }
p.center, .center p { margin-inline: auto; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(52px, 7.5vw, 96px) 0; }
.section--cream { background: var(--cream); }
.section--panel { background: var(--panel); position: relative; }
.section--ink { background: var(--ink); color: var(--cream); }
.section--ink.has-photo {
  position: relative;
  background-image:
    linear-gradient(165deg, rgba(74,75,124,.5), rgba(18,21,58,.94) 62%),
    url('cta-photo.jpg');
  background-size: cover;
  background-position: center center;
}
.section--ink.has-photo::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-gold); background-size: 84px 84px; opacity: .08; mix-blend-mode: soft-light; }
.section--ink.has-photo .container { position: relative; }
.section-head { max-width: 720px; margin: 0 auto clamp(30px, 4vw, 52px); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .74rem; color: var(--gold); margin-bottom: .7rem; }
.eyebrow::before { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.center { text-align: center; }

/* ---------- Gold divider ---------- */
.gold-rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px auto; }
.gold-rule::before, .gold-rule::after { content: ""; height: 2px; width: 64px; background: linear-gradient(90deg, transparent, var(--gold)); border-radius: 2px; }
.gold-rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.gold-rule .diamond { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); border-radius: 2px; }
.gold-rule.start { justify-content: flex-start; }
.gold-rule.start::before { display: none; }

/* Arabic text */
.arabic { font-family: var(--arabic); direction: rtl; line-height: 2; }

/* Script accent — sparing use, short phrases only */
.script { font-family: var(--script); font-weight: 400; color: var(--gold); line-height: 1.1; }
.hero-script { display: block; font-family: var(--script); font-size: clamp(1.35rem, 5.5vw, 2.15rem); color: var(--gold-lt); margin: 0 0 14px; }

/* =====================================================================
   Salaam top bar
   ===================================================================== */
.topbar { background: var(--ink2); color: var(--gold-lt); font-size: .82rem; border-bottom: 1px solid rgba(201,162,75,.18); }
.topbar-inner { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 8px 24px; max-width: var(--maxw); margin-inline: auto; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.topbar-inner::-webkit-scrollbar { display: none; }
.topbar .salaam { font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: .95rem; font-weight: 500; }
.topbar .tb-item { color: rgba(243,238,221,.86); display: inline-flex; align-items: center; gap: 7px; }
.topbar .tb-item svg { flex: none; width: 13px; height: 13px; opacity: .85; }
.topbar .tb-spacer { flex: 1 1 auto; min-width: 8px; }
.topbar .tb-link { color: var(--gold); font-weight: 600; }
.topbar .tb-link:hover { color: var(--gold-lt); }

/* =====================================================================
   Sticky nav
   ===================================================================== */
.nav { position: sticky; top: 0; z-index: 70; background: rgba(243,238,221,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; max-width: var(--maxw); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img.brand-mark, .brand svg.brand-mark { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); background: var(--cream); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; max-width: 230px; }
.brand-text b { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: .98rem; white-space: normal; }
.brand-text span { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .96rem; padding: 9px 14px; border-radius: 999px; transition: background .18s ease, color .18s ease; }
.nav-links a:hover { background: rgba(201,162,75,.14); }
.nav-links a.active { color: var(--green2); background: rgba(74,75,124,.10); font-weight: 600; }
.nav-links a.nav-cta { background: var(--gold); color: var(--ink2); font-weight: 600; padding: 9px 18px; box-shadow: var(--shadow-sm); }
.nav-links a.nav-cta:hover { background: var(--gold-lt); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 10px; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-overlay { display: none; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--serif); font-weight: 700; letter-spacing: .01em; font-size: 1.08rem; padding: 13px 25px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .22s ease, background .2s ease, color .2s ease; line-height: 1; position: relative; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(160deg, var(--gold-lt), var(--gold)); color: var(--ink2); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: linear-gradient(160deg, var(--gold-lt), var(--gold-lt)); color: var(--ink2); box-shadow: var(--shadow); transform: translateY(-2px); }
.btn-green { background: linear-gradient(160deg, var(--green), var(--green2)); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-green:hover { background: var(--green2); color: var(--white); box-shadow: var(--shadow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(201,162,75,.14); color: var(--gold-lt); transform: translateY(-2px); }
.btn-ghost.on-light { color: var(--green2); border-color: var(--gold); }
.btn-ghost.on-light:hover { background: rgba(201,162,75,.12); color: var(--green2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row.center { justify-content: center; }
.btn svg { width: 17px; height: 17px; }

/* =====================================================================
   Hero — photographic, layered
   ===================================================================== */
.hero {
  position: relative;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -3;
  background-image: url('hero-photo.jpg');
  background-size: cover; background-position: center 78%;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.22) 0%, rgba(68,70,124,.6) 32%, rgba(17,21,74,.9) 65%, rgba(10,12,44,.98) 100%);
}
.hero-pattern {
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--pattern-gold);
  background-size: 84px 84px;
  opacity: .12;
  mix-blend-mode: soft-light;
}
.hero-inner { position: relative; max-width: var(--maxw); margin-inline: auto; padding: clamp(36px, 5vw, 64px) 24px; text-align: center; }
.hero h1 { color: var(--white); margin-bottom: 14px; }
.hero .logo-full { width: clamp(112px, 20vw, 138px); height: auto; margin: 0 auto 14px; border-radius: 50%; box-shadow: var(--shadow-lg), 0 0 0 3px rgba(201,162,75,.5); background: var(--cream); padding: 6px; }
.hero .bismillah { font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 14px; }
.hero .gold-rule::before, .hero .gold-rule::after { background: linear-gradient(90deg, transparent, var(--gold)); }
.hero .gold-rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.hero .hero-lead { color: rgba(243,238,221,.92); font-size: 1.1rem; line-height: 1.45; max-width: 480px; margin: 8px auto 26px; font-family: var(--serif-italic); font-style: italic; font-weight: 500; }
.hero .hero-meta { margin-top: 26px; color: var(--gold-lt); font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.hero .hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero .hero-meta svg { width: 15px; height: 15px; }

/* Page (inner) hero — smaller, for sub pages, same photographic system */
.page-hero { position: relative; color: var(--cream); overflow: hidden; isolation: isolate; }
.page-hero .hero-bg { background-position: center 60%; }
.page-hero .hero-scrim { background: linear-gradient(165deg, rgba(255,255,255,.16) 0%, rgba(68,70,124,.78) 30%, rgba(17,21,74,.94) 70%); }
.page-hero .hero-inner { padding: clamp(52px, 7.5vw, 84px) 24px; }
.page-hero h1 { color: var(--white); }
.page-hero .hero-lead { margin: 0 auto; max-width: 640px; color: rgba(243,238,221,.88); }
.page-hero .arabic-sub { font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 4px 0 12px; }
.page-hero .eyebrow-pale { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-lt); margin-bottom: .8rem; }
.page-hero .eyebrow-pale::before { content: ""; width: 5px; height: 5px; background: var(--gold-lt); transform: rotate(45deg); }

/* =====================================================================
   Cards
   ===================================================================== */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; position: relative; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold-lt); }
.icon-chip { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(150deg, var(--gold-lt), var(--gold)); color: var(--ink2); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.icon-chip svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .98rem; }
.card .role-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

/* =====================================================================
   Lineage / chain of presidents
   ===================================================================== */
.lineage { border-top: 1px solid var(--line); max-width: 640px; margin: 0 auto; }
.lineage-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.5rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.lineage-row .yr { font-family: var(--body); font-weight: 600; letter-spacing: .04em; color: var(--gold); font-variant-numeric: tabular-nums; font-size: .92rem; }
.lineage-row .who { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.12rem; }
.lineage-row .who .tag { font-family: var(--body); font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: .5em; }
.lineage-row.current .who { color: var(--green2); }
.lineage-row.current .who .tag { color: var(--green); font-weight: 600; }

/* =====================================================================
   Quote bands
   ===================================================================== */
.quote-band { background: linear-gradient(145deg, var(--green) 0%, var(--green2) 55%, var(--ink) 100%); color: var(--cream); text-align: center; border-radius: var(--radius-lg); padding: clamp(40px, 6.5vw, 72px); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.quote-band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cream); background-size: 84px 84px; opacity: .07; }
.quote-band::after { content: "\201D"; position: absolute; top: -14px; left: 30px; font-family: var(--serif); font-size: 9rem; color: rgba(201,162,75,.24); line-height: 1; }
.quote-band .ar { position: relative; text-align: center; font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 auto 22px; line-height: 1.9; }
.quote-band .tr { position: relative; text-align: center; font-family: var(--serif-italic); font-size: clamp(1.18rem, 2.4vw, 1.55rem); font-style: italic; font-weight: 500; max-width: 720px; margin: 0 auto 22px; color: var(--white); }
.quote-band .ref { position: relative; text-align: center; color: var(--gold-lt); font-size: .9rem; letter-spacing: .06em; }

.quote-card { background: linear-gradient(145deg, var(--green) 0%, var(--green2) 55%, var(--ink) 100%); color: var(--cream); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); border: 1px solid rgba(201,162,75,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.quote-card::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cream); background-size: 70px 70px; opacity: .06; }
.quote-card::after { content: "\201D"; position: absolute; top: -8px; left: 18px; font-family: var(--serif); font-size: 6rem; color: rgba(201,162,75,.24); line-height: 1; }
.quote-card .ar { position: relative; font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: 1.9rem; line-height: 1.9; margin: 0 auto 18px; }
.quote-card .tr { position: relative; font-family: var(--serif-italic); font-style: italic; font-weight: 500; font-size: 1.22rem; color: var(--white); margin: 0 auto 18px; }
.quote-card .ref { position: relative; color: var(--gold-lt); font-size: .85rem; letter-spacing: .06em; }

/* =====================================================================
   Two-column feature
   ===================================================================== */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.feature .ticklist { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 12px; }
.feature .ticklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(74,75,124,.12); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.tick svg { width: 13px; height: 13px; }

/* =====================================================================
   Book cover mockup
   ===================================================================== */
.book-wrap { display: flex; justify-content: center; perspective: 1400px; }
.book {
  width: min(320px, 80%); aspect-ratio: 3 / 4.2; border-radius: 8px 14px 14px 8px;
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,.035) 0 2px, transparent 2px 5px),
    linear-gradient(150deg, var(--green2), var(--ink) 75%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(201,162,75,.3);
  color: var(--cream); padding: 32px 28px; position: relative;
  transform: rotateY(-14deg) rotateX(3deg); transition: transform .45s ease;
  border-left: 8px solid rgba(0,0,0,.28);
}
.book:hover { transform: rotateY(-6deg) rotateX(1deg); }
.book::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cream); background-size: 60px 60px; opacity: .05; border-radius: inherit; }
.book::after { content: ""; position: absolute; inset: 14px; border: 1.5px solid rgba(201,162,75,.45); border-radius: 6px; pointer-events: none; }
.book .crescent { font-size: 2.4rem; color: var(--gold-lt); }
.book .b-sub { font-family: var(--body); letter-spacing: .24em; text-transform: uppercase; font-size: .66rem; color: var(--gold); margin-top: 40px; }
.book .b-title { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1.18; margin: 8px 0 6px; color: var(--white); }
.book .b-year { font-family: var(--serif); color: var(--gold-lt); font-size: 1rem; }
.book .b-ar { font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: 1.3rem; position: absolute; bottom: 28px; left: 28px; right: 28px; }

.book-cover {
  display: block; width: min(320px, 80%); aspect-ratio: 3 / 4.24; border-radius: 8px 14px 14px 8px;
  object-fit: cover; object-position: top center;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(201,162,75,.3);
  transform: rotateY(-14deg) rotateX(3deg); transition: transform .45s ease;
  border-left: 8px solid rgba(0,0,0,.28);
}
.book-cover:hover { transform: rotateY(-6deg) rotateX(1deg); }

/* =====================================================================
   Prayer times widget
   ===================================================================== */
.prayer-widget { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--green) 0%, var(--green2) 55%, var(--ink) 100%); color: var(--cream); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); border: 1px solid rgba(201,162,75,.25); }
.prayer-widget::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cream); background-size: 84px 84px; opacity: .06; }
.pw-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 22px; }
.pw-head h3 { color: var(--white); margin: 0; }
.pw-dates { color: var(--gold-lt); font-size: .92rem; text-align: right; }
.pw-dates .hijri { font-family: var(--arabic); direction: rtl; font-size: 1.05rem; }
.pw-grid { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.pw-cell { background: rgba(255,255,255,.07); border: 1px solid rgba(201,162,75,.18); border-radius: 14px; padding: 17px 10px; text-align: center; transition: transform .2s ease, background .2s ease; }
.pw-cell .name { font-size: .82rem; letter-spacing: .05em; color: rgba(243,238,221,.82); margin-bottom: 6px; }
.pw-cell .time { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--white); font-variant-numeric: tabular-nums; }
.pw-cell.next { background: linear-gradient(150deg, var(--gold-lt), var(--gold)); border-color: var(--gold-lt); transform: translateY(-5px); box-shadow: 0 14px 28px rgba(0,0,0,.28); }
.pw-cell.next .name, .pw-cell.next .time { color: var(--ink2); }
.pw-cell .badge-next { display: none; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-top: 7px; color: var(--ink2); }
.pw-cell.next .badge-next { display: block; }
.pw-note { position: relative; margin: 18px 0 0; color: rgba(243,238,221,.78); font-size: .86rem; }
.pw-error { position: relative; background: rgba(0,0,0,.18); border-radius: 12px; padding: 14px 16px; color: var(--gold-lt); font-size: .92rem; }

/* =====================================================================
   Events
   ===================================================================== */
.semester-title { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.semester-title .pill { background: linear-gradient(150deg, var(--green), var(--green2)); color: var(--white); font-weight: 600; font-size: .8rem; letter-spacing: .07em; padding: 7px 15px; border-radius: 999px; }
.event-list { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.event:hover { transform: translateX(5px); box-shadow: var(--shadow); border-color: var(--gold-lt); }
.event.highlight { border-color: var(--gold); background: linear-gradient(0deg, rgba(201,162,75,.08), rgba(201,162,75,.08)), var(--white); }
.date-chip { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; min-height: 64px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--green2); padding: 6px; text-align: center; }
.date-chip .m { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.date-chip .d { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.event .ev-body h4 { font-family: var(--serif); font-weight: 600; margin: 0 0 3px; font-size: 1.12rem; color: var(--ink); }
.event .ev-body p { margin: 0; color: var(--muted); font-size: .92rem; }
.badge { flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 13px; border-radius: 999px; white-space: nowrap; }
.badge-free { background: rgba(74,75,124,.14); color: var(--green2); }
.badge-ticketed { background: rgba(201,162,75,.20); color: #8a6d1f; }
.badge-mixed { background: rgba(110,84,160,.16); color: #5b4790; }

/* =====================================================================
   CTA band (gold)
   ===================================================================== */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--gold-lt), var(--gold)); border-radius: var(--radius-lg); padding: clamp(30px, 4vw, 46px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; box-shadow: var(--shadow); }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-cream); background-size: 70px 70px; opacity: .1; }
.cta-band h3 { position: relative; color: var(--ink2); margin: 0 0 4px; }
.cta-band p { position: relative; color: #5c4a16; margin: 0; max-width: 560px; }
.cta-band > a, .cta-band > div { position: relative; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--white); }
table.styled { width: 100%; border-collapse: collapse; min-width: 480px; }
table.styled th, table.styled td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.styled thead th { background: var(--ink); color: var(--cream); font-family: var(--body); font-weight: 600; font-size: .85rem; letter-spacing: .05em; }
table.styled tbody tr:nth-child(even) { background: var(--panel); }
table.styled tbody tr:hover { background: rgba(201,162,75,.10); }
table.styled td:first-child { font-weight: 600; color: var(--ink); }

/* =====================================================================
   Contact form
   ===================================================================== */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 38px); box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select { width: 100%; font-family: var(--body); font-size: 1rem; color: var(--text); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); transition: border-color .18s ease, box-shadow .18s ease; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--gold); box-shadow: var(--ring); outline: none; background: var(--white); }
.form-row textarea { min-height: 140px; resize: vertical; }
.form-hint { color: var(--muted); font-size: .88rem; margin-top: 14px; }

/* contact info list */
.info-list { display: grid; gap: 16px; }
.info-card { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; cursor: pointer; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-lt); }
.info-card .icon-chip { margin-bottom: 0; width: 46px; height: 46px; }
.info-card .icon-chip svg { width: 21px; height: 21px; }
.info-card h3 { font-size: 1.08rem; margin-bottom: 2px; }
.info-card p, .info-card a { margin: 0; color: var(--muted); font-size: .95rem; word-break: break-word; }
.info-card a { color: var(--green); font-weight: 500; }

/* =====================================================================
   Footer
   ===================================================================== */
.footer { position: relative; overflow: hidden; background: var(--ink2); color: rgba(243,238,221,.82); padding: clamp(48px, 6vw, 68px) 0 28px; }
.footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-gold); background-size: 84px 84px; opacity: .05; }
.footer .container { position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer h4 { color: var(--gold-lt); font-family: var(--body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.footer .bismillah { font-family: var(--arabic); direction: rtl; color: var(--gold-lt); font-size: 1.5rem; margin-bottom: 12px; }
.footer p { color: rgba(243,238,221,.72); font-size: .95rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: rgba(243,238,221,.82); font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.footer ul a svg { width: 15px; height: 15px; opacity: .8; flex: none; }
.footer ul a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(201,162,75,.18); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; color: rgba(243,238,221,.6); font-size: .85rem; }
.footer-bottom .brand-mini { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .brand-mini img, .footer-bottom .brand-mini svg { width: 26px; height: 26px; border-radius: 7px; }

/* =====================================================================
   Scroll reveal
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.grid > .reveal:nth-child(2) { transition-delay: .06s; }
.grid > .reveal:nth-child(3) { transition-delay: .12s; }
.grid > .reveal:nth-child(4) { transition-delay: .18s; }
.grid > .reveal:nth-child(5) { transition-delay: .24s; }
.grid > .reveal:nth-child(6) { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .pw-grid { grid-template-columns: repeat(3, 1fr); }

  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(82vw, 320px);
    background: var(--cream); flex-direction: column; align-items: stretch; gap: 6px;
    padding: 84px 22px 24px; box-shadow: -16px 0 40px rgba(18,21,58,.18);
    transform: translateX(100%); transition: transform .28s ease; z-index: 60; border-left: 1px solid var(--line);
  }
  .nav-links a { padding: 13px 16px; font-size: 1.05rem; }
  body.nav-open .nav-links { transform: translateX(0); }
  body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
  body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(18,21,58,.45); opacity: 0; visibility: hidden; transition: opacity .28s ease; z-index: 55; }
  body.nav-open .nav-overlay { opacity: 1; visibility: visible; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pw-grid { grid-template-columns: repeat(2, 1fr); }
  .event { grid-template-columns: auto 1fr; }
  .event .badge { grid-column: 2; justify-self: start; }
  .cta-band, .quote-band { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .pw-head { flex-direction: column; }
  .pw-dates { text-align: left; }
  .hero .hero-lead { font-size: 1rem; }
}
