/* ═══════════════════════════════════════════════════════════════
   CW London Summer Event — Chelsea Waterfront
   Brand: KI navy #1C2D44 · cream #FCF9F1 · steel teal #5A8190
   Type:  Cairo (Arabic display + body everywhere) · Cormorant Garamond (EN display)
   RTL-first: logical properties throughout; [dir] does the flipping.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy:       #1C2D44;
  --navy-deep:  #131F30;
  --cream:      #FCF9F1;
  --cream-dim:  #F3EEE1;
  --teal:       #5A8190;
  --teal-light: #A3BCC6;
  --ink:        #33415A;
  --line:       rgba(28, 45, 68, 0.14);
  --line-dark:  rgba(252, 249, 241, 0.16);
  --radius:     4px;
  --pad-x:      clamp(1.25rem, 5vw, 4.5rem);
  --font-body:  'Cairo', 'Segoe UI', sans-serif;
  --font-display: 'Cairo', sans-serif;
}
html[lang="en"] { --font-display: 'Cormorant Garamond', serif; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}
html[lang="en"] h1, html[lang="en"] h2 { line-height: 1.15; }

h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 30ch; }

/* ─────────────── Buttons ─────────────── */
.btn {
  display: inline-block;
  padding: 0.85rem 2.1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  background: var(--teal);
  color: var(--cream);
}
.btn-primary:hover { background: #4A6E7C; }
.btn-ghost {
  color: var(--cream);
  border-color: rgba(252, 249, 241, 0.45);
}
.btn-ghost:hover { border-color: var(--cream); background: rgba(252, 249, 241, 0.08); }
.btn-outline {
  color: var(--cream);
  border-color: rgba(252, 249, 241, 0.45);
  padding: 0.5rem 1.3rem;
  font-size: 0.85rem;
}
.btn-outline:hover { border-color: var(--cream); }
.btn-block { display: block; width: 100%; }

/* ─────────────── Header ─────────────── */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad-x);
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-header.scrolled {
  background: var(--navy-deep);
  box-shadow: 0 1px 0 var(--line-dark);
  padding-block: 0.6rem;
}
.site-logo { height: 44px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
  background: none;
  border: none;
  color: var(--teal-light);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}
.lang-toggle:hover { color: var(--cream); }

/* ─────────────── Hero ─────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background: url('assets/images/hero-vision.jpg') center / cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(19, 31, 48, 0.92) 0%, rgba(19, 31, 48, 0.38) 45%, rgba(19, 31, 48, 0.55) 100%);
}
.hero-content {
  position: relative;
  padding: 0 var(--pad-x);
  max-width: 62rem;
  margin-block-end: 3rem;
}
.hero-title {
  color: var(--cream);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  margin-block: 0.75rem 1rem;
}
html[lang="en"] .hero-title { font-weight: 700; }
.hero-subtitle {
  max-width: 46ch;
  font-weight: 400;
  font-size: 1.08rem;
  color: rgba(252, 249, 241, 0.88);
  margin-block-end: 1.75rem;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.eyebrow.teal { color: var(--teal); }
.eyebrow.teal-light { color: var(--teal-light); }

/* Invitation strip — the signature element */
.invite-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border-block-start: 1px solid var(--line-dark);
}
.invite-item {
  background: rgba(19, 31, 48, 0.72);
  backdrop-filter: blur(8px);
  padding: 1.3rem var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.invite-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.invite-value { font-weight: 700; font-size: 1.02rem; color: var(--cream); }

/* The veiled venue: deliberately unreadable until the invitation */
.veiled {
  filter: blur(7px);
  opacity: 0.75;
  user-select: none;
  pointer-events: none;
  width: fit-content;
}
.invite-note { font-size: 0.8rem; font-weight: 400; color: rgba(252, 249, 241, 0.65); }

/* ─────────────── Sections ─────────────── */
.section { padding: clamp(4rem, 9vw, 7rem) var(--pad-x); }
.section-cream { background: var(--cream); }
.section-navy { background: var(--navy-deep); color: rgba(252, 249, 241, 0.85); }
.section-navy .on-dark { color: var(--cream); }

.section > .eyebrow { margin-block-end: 0.8rem; }
.section h2 { margin-block-end: 1.4rem; }
.section-intro { max-width: 60ch; margin-block-end: 2.5rem; }

/* Split (development) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-text .eyebrow { margin-block-end: 0.8rem; }
.split-text p { max-width: 58ch; margin-block-end: 1.1rem; }
.split-media img { border-radius: var(--radius); }
.split-media figcaption {
  font-size: 0.85rem;
  color: var(--teal);
  margin-block-start: 0.7rem;
}

/* Stats band */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-block-start: clamp(3rem, 6vw, 5rem);
  padding-block-start: clamp(2rem, 4vw, 3rem);
  border-block-start: 1px solid var(--line);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: var(--navy);
  line-height: 1;
}
.stat-number small {
  font-size: 0.42em;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--teal);
  margin-inline-start: 0.25rem;
}
.stat-label {
  display: block;
  font-size: 0.9rem;
  margin-block-start: 0.6rem;
  max-width: 24ch;
}

/* Gallery */
.gallery-section h2 { margin-block-end: 2.2rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.gallery-item {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
}
.gallery-item.wide { grid-column: span 4; }
.gallery-item img {
  width: 100%;
  flex: 1;
  min-height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
}
.gallery-item figcaption {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(252, 249, 241, 0.7);
  margin-block-start: 0.6rem;
}

/* Amenities */
.amenities {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-block-start: 2.8rem;
  padding-block-start: 2.2rem;
  border-block-start: 1px solid var(--line-dark);
}
.amenities li {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--cream);
  border: 1px solid var(--line-dark);
  border-radius: 100px;
  padding: 0.45rem 1.15rem;
}

/* Event cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.8rem;
}
.card-mark, .card-mark-en {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal);
  display: inline-block;
  margin-block-end: 0.6rem;
}
/* Arabic-Indic numerals by default; Latin numerals in English */
.card-mark-en { display: none; }
html[lang="en"] .card-mark { display: none; }
html[lang="en"] .card-mark-en { display: inline-block; }

.card h3 { font-size: 1.25rem; margin-block-end: 0.5rem; }
.card p { font-size: 0.95rem; }

/* ─────────────── Form ─────────────── */
.form-section { display: flex; justify-content: center; }
.form-wrap { width: 100%; max-width: 620px; text-align: center; }
.form-wrap .eyebrow { margin-block-end: 0.8rem; }
.form-wrap h2 { margin-inline: auto; }
.form-intro {
  font-weight: 400;
  max-width: 48ch;
  margin: 0 auto 2.4rem;
}

.lead-form { text-align: start; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-block-end: 1.15rem; }
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cream);
  margin-block-end: 0.45rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(90, 129, 144, 0.35);
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235A8190' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-inline-start: 1rem;
  padding-inline-end: 2.4rem;
}
html[dir="ltr"] select.form-control { background-position: right 1rem center; }

/* Radio pills */
.radio-group { display: flex; gap: 0.7rem; }
.radio-pill { flex: 1; cursor: pointer; position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--cream);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.radio-pill input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream);
}
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(90, 129, 144, 0.5); }

/* intl-tel-input inside the RTL form (widget itself stays LTR) */
.iti { width: 100%; direction: ltr; }

.submit-btn { margin-block-start: 0.6rem; font-size: 1.05rem; padding-block: 1rem; }
.form-privacy {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(252, 249, 241, 0.6);
  margin-block-start: 1rem;
  text-align: center;
}

.form-success {
  background: rgba(90, 129, 144, 0.15);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}
.form-success h3 { color: var(--cream); margin-block-end: 0.5rem; }

/* Field-level error states (ki-form.js adds/removes these) */
.form-control.error { border-color: #C4574E; }
.field-error { color: #E8A49E; font-size: 0.8rem; margin-block-start: 0.3rem; }

/* ─────────────── Footer ─────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(252, 249, 241, 0.7);
  text-align: center;
  padding: 3rem var(--pad-x) 2.5rem;
  border-block-start: 1px solid var(--line-dark);
}
.footer-logo { height: 40px; width: auto; margin: 0 auto 1.2rem; }
.footer-line { font-size: 0.85rem; font-weight: 400; max-width: 60ch; margin: 0 auto 0.8rem; }
.footer-copy { font-size: 0.78rem; font-weight: 400; opacity: 0.7; }

/* ─────────────── Motion ─────────────── */
.reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.reveal-2 { animation-delay: 0.12s; }
.reveal-3 { animation-delay: 0.24s; }
.reveal-4 { animation-delay: 0.36s; }
.reveal-5 { animation-delay: 0.55s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.will-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.will-reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 { animation: none; }
  .will-reveal { opacity: 1; transform: none; transition: none; }
}

/* ─────────────── Responsive ─────────────── */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item, .gallery-item.wide { grid-column: span 2; }
  .cards { grid-template-columns: 1fr; }
  .invite-strip { grid-template-columns: 1fr; }
  .invite-item { padding-block: 0.9rem; }
  .header-cta { display: none; }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .site-logo { height: 36px; }
  .hero-content { margin-block-end: 2rem; }
}
