/* Pillar Two in the UAE — event site styles
   Shared by /pillar-two-uae/ and /rsvp/ */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --ink: #0F2236;          /* deep Gulf navy — headings, dark bands */
  --gulf: #1D3B57;         /* secondary navy */
  --sand: #C9A66B;         /* dusk gold — rules, accents on dark */
  --sand-deep: #8A6A38;    /* gold for small text on light */
  --stone: #F2F4F6;        /* cool off-white section ground */
  --paper: #FFFFFF;
  --text: #1B2A3A;
  --muted: #4E5C6C;
  --line: #D9DEE4;
  --error: #A3261F;
  --ok: #1E6B47;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--gulf); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Organisers bar ---------- */
.organisers {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.organisers .wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding-top: 26px; padding-bottom: 26px;
}
.organisers__label {
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); margin: 0;
}
.organisers__logos {
  display: flex; align-items: center; justify-content: center;
  list-style: none; margin: 0; padding: 0;
}
.organisers__logos li { padding: 0 clamp(20px, 4vw, 52px); }
.organisers__logos li + li { border-left: 1px solid var(--line); }
.organisers__logos a { display: block; padding: 4px; border-radius: var(--radius); }
/* Fixed height keeps the three marks visually balanced; adjust per logo with
   the --logo-h custom property on the <img> if one mark reads too large. */
.organisers__logos img { height: var(--logo-h, 60px); width: auto; max-width: none; object-fit: contain; }
/* Optical balance: the wide STI wordmark, the emblem-style CBC mark and the solid WTL square
   carry very different visual weight at the same height. */
.logo--sti img { --logo-h: 38px; }
.logo--cbc img { --logo-h: 74px; }
.logo--wtl img { --logo-h: 76px; }

/* ---------- Section nav ---------- */
.section-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav .wrap { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.section-nav ul {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none; flex: 1;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a:not(.btn) {
  display: block; padding: 8px 12px; font-size: .9375rem; color: var(--muted);
  text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
}
.section-nav a:not(.btn):hover, .section-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--sand); }
.section-nav .btn { padding: 10px 18px; font-size: .9375rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1.2 var(--sans); letter-spacing: .01em;
  padding: 15px 28px; border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--sand); color: var(--ink); }
.btn--primary:hover { background: #D8B880; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--gulf); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 78vh, 780px);
  display: flex; align-items: flex-end;
  background: var(--ink); color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 100%; }
.hero__media .hero__photo { position: absolute; inset: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,26,44,.92) 0%, rgba(10,26,44,.72) 38%, rgba(10,26,44,.05) 68%),
    linear-gradient(0deg, rgba(10,26,44,.85) 0%, rgba(10,26,44,0) 45%);
}
.hero .wrap { padding-top: 96px; padding-bottom: 72px; }
.hero__type {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  color: var(--sand); margin: 0 0 18px;
}
.hero h1 {
  color: #fff; font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .98; letter-spacing: .02em;
  font-variation-settings: "opsz" 72;
  max-width: 11ch;
}
.hero__subtitle {
  font-family: var(--serif); font-weight: 300; color: #E8ECF1;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.3; margin: 22px 0 0; max-width: 30ch;
}
.hero__rule { width: 72px; height: 2px; background: var(--sand); border: 0; margin: 36px 0 28px; }
.hero__facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px 40px;
  margin: 0 0 36px; justify-content: start;
}
.hero__facts div { display: flex; gap: 12px; align-items: flex-start; }
.hero__facts svg { width: 20px; height: 20px; color: var(--sand); margin-top: 3px; flex: none; }
.hero__facts dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero__facts dd { margin: 0; color: #F1F3F6; font-size: 1.0625rem; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Main layout ---------- */
.event-body { padding: clamp(56px, 8vw, 104px) 0; }
.event-body .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.content > section + section { margin-top: clamp(56px, 7vw, 88px); }
.content h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 24px;
  padding-top: 20px; border-top: 2px solid var(--sand); display: inline-block;
}
.lede {
  font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.5rem); line-height: 1.5;
  color: var(--ink); font-weight: 400; max-width: 34em;
}
.content p { max-width: 40em; }
.content strong { color: var(--ink); font-weight: 600; }

/* Topics: unordered — no numbering, each topic as a ruled entry */
.topics { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.topics li { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.topics li:nth-child(-n+2) { border-top: 1px solid var(--line); }
.topics h3 { font-size: 1.35rem; margin-bottom: 8px; font-weight: 500; }
.topics p { margin: 0; color: var(--muted); font-size: 1rem; }

.audience {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.3vw, 1.75rem); line-height: 1.45;
  color: var(--ink); font-weight: 300; max-width: 30em; margin: 0;
}
.notice {
  margin-top: 28px; padding: 22px 26px; background: var(--stone);
  border-left: 3px solid var(--sand); max-width: 40em;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; color: var(--muted); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 92px; }
.card { background: var(--stone); padding: 30px 28px; border-radius: var(--radius); }
.card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.card dl { margin: 0 0 24px; }
.card dt { font-size: .8125rem; color: var(--sand-deep); font-weight: 600; letter-spacing: .02em; margin-top: 14px; }
.card dt:first-child { margin-top: 0; }
.card dd { margin: 2px 0 0; color: var(--ink); line-height: 1.5; }
.card .btn { width: 100%; }
.card .btn + .btn { margin-top: 10px; }
.card small { display: block; margin-top: 14px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.share { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.share p { font-size: .875rem; color: var(--muted); margin: 0 0 10px; }
.share ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.share a, .share button {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--ink); }
.share svg { width: 18px; height: 18px; }
.share__status { font-size: .8125rem; color: var(--ok); min-height: 1.2em; margin-top: 8px; }

/* ---------- Venue ---------- */
.venue { background: var(--stone); padding: clamp(56px, 8vw, 96px) 0; }
.venue .wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: stretch; }
.venue h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 24px; padding-top: 20px; border-top: 2px solid var(--sand); display: inline-block; }
.venue address { font-style: normal; font-size: 1.125rem; line-height: 1.6; margin-bottom: 28px; }
.venue address strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--ink); display: block; margin-bottom: 4px; }
.venue__time { color: var(--muted); margin-bottom: 28px; }
.map { position: relative; min-height: 380px; border-radius: var(--radius); overflow: hidden; background: #DCE2E8; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Closing CTA ---------- */
.closing { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #fff; padding: clamp(64px, 9vw, 112px) 0; }
.closing__media { position: absolute; inset: auto 0 0 0; height: 70%; z-index: -2; opacity: .55; }
.closing__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 100%; }
.closing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--ink) 30%, rgba(15,34,54,.6) 100%); }
.closing .wrap { text-align: center; }
.closing h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; max-width: 20ch; margin: 0 auto 18px; }
.closing p { color: #D5DCE4; max-width: 36em; margin: 0 auto 32px; }
.closing .hero__actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: .9375rem; color: var(--muted); }
.site-footer .organisers__logos { justify-content: flex-start; margin-bottom: 28px; }
.site-footer .organisers__logos li:first-child { padding-left: 0; }
.site-footer .logo--sti img { --logo-h: 28px; }
.site-footer .logo--cbc img { --logo-h: 48px; }
.site-footer .logo--wtl img { --logo-h: 56px; }
.site-footer p { margin: 0 0 6px; }

/* ---------- RSVP page ---------- */
.rsvp-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #fff; padding: 64px 0 120px; }
.rsvp-hero .hero__media img { object-position: 72% 100%; }
.rsvp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,26,44,.94) 0%, rgba(10,26,44,.75) 50%, rgba(10,26,44,.35) 100%); }
.rsvp-hero h1 { color: #fff; font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; letter-spacing: .02em; }
.rsvp-hero .hero__subtitle { margin-top: 12px; }
.rsvp-main { position: relative; z-index: 1; margin-top: -72px; padding-bottom: 96px; }
.rsvp-main .wrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; align-items: start; }
.rsvp-main .card { background: var(--paper); border: 1px solid var(--line); position: sticky; top: 24px; }
.form-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); box-shadow: 0 24px 48px -32px rgba(15,34,54,.45); }
.form-panel h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 8px; }
.form-intro { color: var(--muted); margin-bottom: 30px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { display: block; font-weight: 600; font-size: .9375rem; color: var(--ink); margin-bottom: 6px; padding: 0; }
.field .req { color: var(--sand-deep); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--text);
  padding: 13px 14px; border: 1px solid #B9C2CC; border-radius: var(--radius); background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(201,166,107,.45); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field input[type="radio"][aria-invalid="true"], .field input[type="checkbox"][aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.field__hint { font-size: .875rem; color: var(--muted); margin-top: 6px; }
.field__error { font-size: .875rem; color: var(--error); margin-top: 6px; font-weight: 500; }
.field__error:empty { display: none; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: grid; gap: 10px; }
.field label.choice {
  display: flex; margin: 0; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid #B9C2CC; border-radius: var(--radius); cursor: pointer; font-weight: 400 !important;
}
.field label.choice:has(input:checked) { border-color: var(--ink); background: var(--stone); }
.choice input { margin: 4px 0 0; accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
.field label.consent { margin: 0; display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; font-size: .9375rem; line-height: 1.55; color: var(--text) !important; }
.consent input { margin-top: 3px; accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
.privacy-notice { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.privacy-notice summary { cursor: pointer; color: var(--gulf); font-weight: 600; }
.privacy-notice div { padding: 12px 0 0; }
.privacy-notice p { margin: 0 0 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form-actions .btn[disabled] { opacity: .6; cursor: progress; }
.error-summary { border: 1px solid var(--error); border-left-width: 4px; padding: 16px 20px; margin-bottom: 26px; border-radius: var(--radius); background: #FCF4F3; }
.error-summary h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--error); margin-bottom: 6px; }
.error-summary ul { margin: 0; padding-left: 18px; }
.error-summary a { color: var(--error); }
.confirmation { text-align: left; }
.confirmation__mark { width: 56px; height: 56px; border-radius: 50%; background: var(--stone); display: grid; place-items: center; margin-bottom: 22px; color: var(--ok); }
.confirmation__mark svg { width: 28px; height: 28px; }
.confirmation h2 { margin-bottom: 14px; }
.confirmation p { max-width: 36em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .event-body .wrap, .venue .wrap, .rsvp-main .wrap { grid-template-columns: 1fr; }
  .sidebar, .rsvp-main .card { position: static; }
  .rsvp-main .card { order: 2; }
  .map { min-height: 320px; }
}
@media (max-width: 760px) {
  .organisers .wrap { gap: 10px; padding-top: 18px; padding-bottom: 18px; }
  /* Mobile: STI wordmark across the top, the two square-ish marks side by side below */
  .organisers__logos { width: 100%; flex-wrap: wrap; row-gap: 16px; }
  .organisers__logos li { display: flex; justify-content: center; padding: 0 12px; }
  .organisers__logos .logo--sti { flex: 1 0 100%; border-left: 0; }
  .organisers__logos .logo--cbc { border-left: 0; }
  .organisers__logos img { max-width: 100%; }
  .logo--sti img { --logo-h: 30px; }
  .logo--cbc img { --logo-h: 56px; }
  .logo--wtl img { --logo-h: 62px; }
  .site-footer .organisers__logos { justify-content: flex-start; }
  .site-footer .organisers__logos li { justify-content: flex-start; }
  .site-footer .organisers__logos .logo--sti { padding-left: 0; }
  .site-footer .organisers__logos img { height: 32px; }
  .section-nav .btn { display: none; }
  .hero { min-height: 640px; }
  .hero::after { background: linear-gradient(0deg, rgba(10,26,44,.96) 0%, rgba(10,26,44,.88) 52%, rgba(10,26,44,.15) 78%, rgba(10,26,44,0) 100%); }
  .hero .wrap { padding-top: 220px; padding-bottom: 48px; }
  .hero__media img { object-position: 71% 0%; }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .topics { grid-template-columns: 1fr; }
  .topics li:nth-child(2) { border-top: 0; }
  .fields { grid-template-columns: 1fr; }
  .rsvp-hero { padding: 48px 0 96px; }
}

@media print {
  .section-nav, .share, .map, .closing__media, .hero__media { display: none !important; }
  .hero, .closing { background: #fff; color: #000; min-height: 0; }
  .hero h1, .closing h2 { color: #000; }
}
