/* JAD Global event invitations (rsvp.jadglobal.ae).
   Every colour/font comes from CSS variables that the admin sets per event (<style id="theme">).
   Logical properties only, so Arabic (RTL) mirrors automatically. */

@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-400-italic.woff2") format("woff2"); font-weight: 300 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/cormorant-500-italic.woff2") format("woff2"); font-weight: 500 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-700.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-300.woff2") format("woff2"); font-weight: 300; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-600.woff2") format("woff2"); font-weight: 500 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --bg: #0b1220;
  --surface: #121b2c;
  --text: #f4f0eb;
  --heading: #f4f0eb;
  --accent: #c5a059;
  --btn: #c5a059;
  --btnfg: #0b1220;
  --overlay: rgba(11, 18, 32, .45);
  --radius: 2px;
  --hscale: 1;
  --serif: "Cormorant", "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--serif);
  --font-body: var(--sans);
  --track: .28em;
  --line: color-mix(in srgb, var(--accent) 55%, transparent);
  --soft: color-mix(in srgb, var(--text) 72%, transparent);
  --page-image: none;
}
:lang(ar) {
  --serif: "Cormorant", "IBM Plex Sans Arabic", serif;
  --sans: "Hanken Grotesk", "IBM Plex Sans Arabic", sans-serif;
  --track: 0;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; background: var(--bg) var(--page-image) center / cover fixed; color: var(--text);
  font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed !important; width: auto; height: auto; clip: auto; inset-inline-start: 12px; top: 12px; z-index: 50; background: var(--accent); color: var(--btnfg); padding: 8px 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: 0 34px;
  background: var(--btn); color: var(--btnfg); border: 1px solid var(--btn); border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: var(--track); text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-line {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 12.5px; font-weight: 700; letter-spacing: calc(var(--track) * .7); text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s;
}
.btn-line:hover { background: var(--accent); color: var(--btnfg); border-color: var(--accent); }
:lang(ar) .btn, :lang(ar) .btn-line { font-size: 15px; font-weight: 600; }

/* ---------- top bar ---------- */
.top {
  position: absolute; inset-inline: 0; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
}
.top-logo img { width: clamp(130px, 14vw, 190px); height: auto; }
.lang { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-decoration: none; padding: 6px 2px; border-bottom: 1px solid transparent; }
.lang:hover { border-color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; min-height: 100svh; overflow: hidden; }
.hero-visual { position: absolute; inset: 0; }
.hero-media { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, var(--overlay) 35%, var(--overlay) 100%), var(--overlay); }
.hero-content {
  position: relative; z-index: 1; align-self: center; justify-self: center; width: min(920px, 100% - 40px);
  padding: 130px 0 90px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
}
.align-start .hero-content { align-items: flex-start; text-align: start; justify-self: start; margin-inline-start: clamp(20px, 7vw, 120px); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--accent); }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 16px; }
.hero-title {
  font-family: var(--font-heading); font-weight: 400; color: var(--heading);
  font-size: calc(clamp(44px, 7.4vw, 104px) * var(--hscale)); line-height: 1.02; letter-spacing: -.01em;
}
:lang(ar) .hero-title { line-height: 1.3; font-weight: 500; }
.hero-sub { font-family: var(--font-heading); font-style: italic; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.35; color: var(--soft); max-width: 760px; }
:lang(ar) .hero-sub { font-style: normal; }
.hero-when { margin-top: 6px; font-size: 14px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero-when::before, .hero-when::after { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--accent); vertical-align: middle; margin: 0 14px; }
.align-start .hero-when::before { display: none; }
:lang(ar) .hero-when { letter-spacing: 0; font-size: 16px; }
.hero-where { font-size: 15px; color: var(--soft); }
.hero-content .btn { margin-top: 18px; }

/* minimal: no picture, framed text on the background colour */
.hero--minimal .hero-frame, .home .hero-frame {
  position: absolute; inset: clamp(14px, 2.4vw, 32px); border: 1px solid var(--line); pointer-events: none;
}
.hero--minimal .hero-frame::before, .home .hero-frame::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
/* split: picture on one side, text on the other */
.hero--split { grid-template-columns: 1fr 1fr; }
.hero--split .hero-visual { position: relative; grid-column: 2; }
.hero--split .hero-content { grid-column: 1; grid-row: 1; }

/* ---------- blocks ---------- */
.block { background: var(--bg); color: var(--text); }
.block:nth-of-type(even) { background: var(--surface); }
.block > .inner { width: min(1080px, 100% - 40px); margin-inline: auto; padding-block: clamp(64px, 9vw, 120px); text-align: center; }
.h2 {
  font-family: var(--font-heading); font-weight: 400; color: var(--heading);
  font-size: calc(clamp(32px, 4.2vw, 56px) * var(--hscale)); line-height: 1.12;
}
.h2::after { content: ""; display: block; width: 46px; height: 1px; background: var(--accent); margin: 22px auto 0; }
:lang(ar) .h2 { line-height: 1.4; font-weight: 500; }
.body { max-width: 680px; margin: 26px auto 0; font-size: 17px; line-height: 1.75; color: var(--soft); }
.body p + p { margin-top: 1em; }
:lang(ar) .body { font-size: 18px; line-height: 1.9; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; border-block: 1px solid var(--line); }
.h2 + .facts { margin-top: 40px; }
.fact { display: flex; flex-direction: column; gap: 10px; padding: 34px 20px; }
.fact + .fact { border-inline-start: 1px solid var(--line); }
.fact-label { font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
:lang(ar) .fact-label { letter-spacing: 0; font-size: 14px; }
.fact-value { font-family: var(--font-heading); font-size: clamp(20px, 2vw, 26px); line-height: 1.35; color: var(--heading); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

.split-text { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: center; text-align: start; }
.split-text .h2::after { margin-inline: 0; }
.split-text .body { margin-inline: 0; }
.split-text .btn-line { margin-top: 28px; }
.block-img { width: 100%; height: auto; border-radius: var(--radius); }
.block-img.wide { width: 100%; }
.figure { margin-top: 36px; }
.figure figcaption, .gallery figcaption { margin-top: 12px; font-size: 14px; color: var(--soft); }
.block--text .inner > .btn-line, .block--button .btn { margin-top: 30px; }
.venue-name { margin-top: 26px; font-family: var(--font-heading); font-size: 26px; color: var(--heading); }
.venue-addr { margin-top: 6px; color: var(--soft); }
.venue-pic { display: block; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 40px; }
.gal-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.agenda { max-width: 680px; margin: 40px auto 0; text-align: start; border-top: 1px solid var(--line); }
.agenda li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ag-time { font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.ag-what strong { display: block; font-family: var(--font-heading); font-size: 22px; font-weight: 500; color: var(--heading); }
.ag-what span { display: block; margin-top: 4px; color: var(--soft); }

.divider { background: var(--bg); padding: 10px 0; }
.divider span { display: block; width: min(320px, 60%); height: 1px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

/* ---------- RSVP form ---------- */
.block--form .inner { max-width: 760px; }
.form-intro { margin-bottom: 0; }
.deadline { margin-top: 14px; font-size: 14px; letter-spacing: .08em; color: var(--accent); }
.rsvp-form { margin-top: 40px; text-align: start; }
.rsvp-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.field.half { grid-column: auto; }
.field label, .field legend { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
:lang(ar) .field label, :lang(ar) .field legend { letter-spacing: 0; font-size: 14px; }
.req { color: var(--accent); margin-inline-start: 3px; }
.rsvp-form input:not([type=radio]):not([type=checkbox]), .rsvp-form select, .rsvp-form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: var(--radius); color: var(--text); font-size: 16px;
}
.rsvp-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 38px; }
[dir=rtl] .rsvp-form select { background-position: 20px 22px, 15px 22px; }
.rsvp-form select option { color: #0b1220; }
.rsvp-form textarea { min-height: 110px; resize: vertical; }
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { outline: none; border-color: var(--accent); }
.rsvp-form .invalid { border-color: #e07a6b !important; }
.phone { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.attend { margin-bottom: 28px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.choice { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.choices .choice { padding: 11px 16px; border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: var(--radius); }
.choices.big { display: grid; grid-template-columns: 1fr 1fr; }
.choices.big .choice { justify-content: center; min-height: 56px; font-family: var(--font-heading); font-size: 20px; }
.choices .choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.choice input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.choices.big .choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.single { align-items: flex-start; }
.choice.single input { margin-top: 3px; flex: none; }
.consent { margin-top: 22px; font-size: 14px; color: var(--soft); }
.cf-turnstile { margin-top: 22px; }
.form-error { margin-top: 18px; color: #f0a597; font-size: 15px; }
.submit { width: 100%; margin-top: 30px; min-height: 58px; font-size: 14px; }
.submit[disabled] { opacity: .65; cursor: wait; }
.rsvp-done, .rsvp-closed { margin-top: 36px; padding: 40px 24px; border: 1px solid var(--line); }
.rsvp-done p:first-child, .rsvp-closed p { font-family: var(--font-heading); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; color: var(--heading); }
.rsvp-done .actions { margin-top: 24px; }
[data-preview] .rsvp-form { pointer-events: none; }

/* ---------- footer ---------- */
.foot { padding: 46px 20px 52px; text-align: center; border-top: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: var(--bg); }
.foot-logo { width: 150px; height: auto; margin: 0 auto 14px; opacity: .9; }
.foot p { font-size: 13px; color: var(--soft); }

/* ---------- home ---------- */
.home-main { position: relative; min-height: calc(100svh - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 140px 20px 80px; text-align: center; }
.event-list { width: min(680px, 100%); margin-top: 30px; border-top: 1px solid var(--line); }
.event-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 22px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s; }
.event-list a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.el-title { font-family: var(--font-heading); font-size: 26px; color: var(--heading); text-align: start; }
.el-date { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.empty { margin-top: 20px; color: var(--soft); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .hero--split { grid-template-columns: 1fr; }
  .hero--split .hero-visual { grid-column: 1; grid-row: 1; height: 46svh; }
  .hero--split .hero-content { grid-row: 2; padding-top: 50px; }
  .hero--split { min-height: 0; }
  .hero-content { padding: 110px 0 70px; }
  .hero-when::before, .hero-when::after { width: 18px; margin: 0 8px; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { border-inline-start: 0; border-top: 1px solid var(--line); }
  .fact { padding: 24px 12px; }
  .split-text { grid-template-columns: 1fr; text-align: center; }
  .split-text .h2::after { margin-inline: auto; }
  .split-text .body { margin-inline: auto; }
  .rsvp-form .grid { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .choices.big { grid-template-columns: 1fr; }
  .agenda li { grid-template-columns: 76px 1fr; gap: 12px; }
  .event-list a { flex-direction: column; gap: 6px; }
}

/* answers inside a question keep normal case (beats ".field label") */
.field .choice { font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text); }
.field .choices.big .choice { font-family: var(--font-heading); font-size: 21px; }
:lang(ar) .field .choices.big .choice { font-family: var(--font-body); font-size: 18px; }
/* the phone row is always left-to-right, so its arrow stays on the right */
.rsvp-form .phone select { background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; }
