/* ── flyadeal 50th Livery Competition ─────────────────────────────
   Brand tokens: purple #522D6D · lime #D7D800 · pink #B33288
   blue #1877B8 · sky #2CB3E2 · error #E74735
------------------------------------------------------------------ */
:root {
  --purple: #522D6D;
  --lime: #D7D800;
  --pink: #B33288;
  --blue: #1877B8;
  --sky: #2CB3E2;
  --error: #E74735;
  --ink: #2b2135;
  --ink-soft: #4a3d58;
  --ink-muted: #6b5a7d;
  --ink-faint: #9a8fa6;
  --lilac: #f6f3f9;
  --lilac-line: #e4dced;
  --white: #ffffff;
  --font-stack: 'Raleway', 'Cairo', Arial, sans-serif;
  --radius: 18px;
  --radius-pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

[dir="rtl"] body, [dir="rtl"] { font-family: 'Cairo', 'Raleway', Arial, sans-serif; }

img { max-width: 100%; }

a { color: var(--purple); }
a:hover { color: var(--pink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 15px 34px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--pink); color: var(--white); }
.btn-lime { background: var(--lime); color: var(--purple); }
.btn-lime:hover { background: var(--white); color: var(--purple); }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-small { font-size: 15px; padding: 10px 22px; }
.btn-block { width: 100%; padding: 16px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ── Header ── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw;
  background: var(--white);
  border-bottom: 4px solid var(--lime);
  position: sticky; top: 0; z-index: 50;
}
.logo { height: 46px; width: auto; display: block; }

/* ── Hero ── */
/* Solid brand purple at every width. The banner artwork was a fixed 1920px
   composition: `cover` cropped it differently on every screen and never fit
   properly, so the hero is a colour block that adapts to any viewport. */
.hero {
  background: var(--purple);
  color: var(--white);
  padding: 64px 5vw 68px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-inner { z-index: 1; }
/* With the banner gone the headline follows normal reading direction: it sits
   on the right in Arabic rather than being pushed left to clear the artwork. */
[dir="rtl"] .hero-inner { text-align: right; }
.hero-watermark {
  position: absolute; top: -60px; inset-inline-end: -40px;
  font-size: 340px; font-weight: 900; line-height: 1;
  color: rgba(215, 216, 0, .14);
  pointer-events: none; user-select: none;
}
.hero-inner { max-width: 560px; position: relative; }
.kicker {
  display: inline-block;
  background: var(--lime); color: var(--purple);
  font-weight: 700; font-size: 14px; letter-spacing: 2px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  text-transform: uppercase;
}
[dir="rtl"] .kicker { letter-spacing: 0; }
.hero h1 {
  font-weight: 900;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.08;
  margin: 0 0 24px;
  text-wrap: pretty;
  text-shadow: 0 2px 14px rgba(8, 40, 90, 0.45);
}
.hero-sub { font-size: 18px; line-height: 1.55; max-width: 640px; margin-bottom: 26px; color: #e8e2ef; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-aircraft {
  margin-top: 40px;
  max-width: 780px;
  position: relative;
  animation: floatY 5s ease-in-out infinite;
}
.aircraft-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 24px rgba(0,0,0,.25)); }
.hero-canvas-note { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.65); }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-aircraft { animation: none; }
}

/* ── Sections ── */
.section { padding: 80px 5vw; }
.section-white { background: var(--white); }
.section-lilac { background: var(--lilac); }
.container { max-width: 1100px; margin: 0 auto; }

.section h2 { font-weight: 900; font-size: 38px; color: var(--purple); margin-bottom: 10px; }
.section h3 { font-weight: 700; font-size: 20px; color: var(--purple); margin-bottom: 12px; }
.lead { font-size: 17px; line-height: 1.7; max-width: 720px; color: var(--ink-soft); margin-bottom: 40px; }
.note { font-size: 14.5px; color: var(--ink-muted); margin: 14px 0 36px; }

/* ── About / stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.stat {
  background: var(--lilac);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.stat-value { font-weight: 900; font-size: 34px; color: var(--purple); }
.stat-label { font-weight: 600; font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

.equal-banner {
  margin-top: 34px;
  background: var(--purple);
  border-radius: var(--radius);
  padding: 26px 30px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.equal-mark { font-weight: 900; font-size: 30px; color: var(--lime); }
.equal-banner p { color: var(--white); font-size: 16px; line-height: 1.6; flex: 1; min-width: 260px; }

/* ── Steps / cards ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.step { background: var(--white); border-radius: var(--radius); padding: 28px 24px; }
.step-num {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  background: var(--lime); color: var(--purple);
  font-weight: 900; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 18px 0 8px; font-size: 18px; }
.step p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

.two-col { display: flex; gap: 24px; flex-wrap: wrap; }
.card { flex: 1; min-width: 280px; background: var(--white); border-radius: var(--radius); padding: 26px 28px; }
.card-lilac { background: var(--lilac); }
.card ul { padding-inline-start: 20px; font-size: 15px; line-height: 1.9; color: var(--ink-soft); }
.card p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 14px; }

/* ── Brand colors ── */
.colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.swatch { border-radius: 14px; overflow: hidden; border: 1px solid #ece6f2; background: var(--white); }
.swatch-chip { height: 74px; }
.swatch-meta { padding: 10px 12px; }
.swatch-name { font-weight: 700; font-size: 13.5px; color: var(--purple); }
.swatch-hex { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink-muted); }

.type-specimen { font-weight: 900; font-size: 26px; color: var(--purple); }
.type-cairo { font-family: 'Cairo', sans-serif; }

.download-banner {
  margin-top: 36px;
  background: var(--purple);
  border-radius: var(--radius);
  padding: 30px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.download-banner h3 { color: var(--white); margin-bottom: 6px; }
.download-banner p { font-size: 15px; color: #cfc3dd; }
.download-banner .btn { white-space: nowrap; font-size: 16px; padding: 14px 30px; }

/* ── Entry form ── */
.form-wrap { max-width: 640px; margin: 0 auto; }
.entry-card {
  background: var(--white);
  border-radius: 22px;
  padding: 40px 38px;
  border-top: 6px solid var(--lime);
}
.entry-card h2 { font-weight: 900; font-size: 32px; color: var(--purple); margin-bottom: 8px; }
.form-sub { font-size: 15.5px; color: var(--ink-muted); margin-bottom: 30px; line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field label, .field-label { font-weight: 700; font-size: 14px; color: var(--purple); }
.req { color: var(--error); font-weight: 700; margin-inline-start: 2px; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  border: 2px solid var(--lilac-line);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 16px;
  font-family: var(--font-stack);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: end; }
/* Mobile field: country dial code + national number on one row. The row is
   forced LTR in both languages because a phone number always reads left to
   right, so the dial code stays in front of the number under RTL too. */
.phone-row { display: flex; gap: 10px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
.dial-select {
  flex: 0 0 40%;
  max-width: 210px;
  border: 2px solid var(--lilac-line);
  border-radius: 12px;
  padding: 13px 12px;
  font-size: 15px;
  font-family: var(--font-stack);
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .15s ease;
}
.dial-select:focus { border-color: var(--purple); }
@media (max-width: 640px) {
  /* Stack on narrow screens so neither control becomes unusably small. */
  .phone-row { flex-direction: column; }
  .dial-select { flex: 1 1 auto; max-width: none; }
}
.field input:focus { border-color: var(--purple); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); }
input::placeholder { color: var(--ink-faint); }

.dropzone {
  border: 2px dashed #c9bcd8;
  border-radius: 12px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  background: #faf8fc;
  display: block;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--purple); background: var(--lilac); }
.dropzone-title { display: block; font-weight: 700; font-size: 15px; color: var(--purple); overflow-wrap: anywhere; }
.dropzone-hint { display: block; font-size: 13px; color: var(--ink-faint); margin-top: 5px; }

.terms {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink-soft); line-height: 1.5;
  cursor: pointer; margin-bottom: 20px;
}
.terms input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--purple); flex-shrink: 0; }

.alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.alert-error { background: #fdeceb; color: var(--error); }

.success-card { text-align: center; padding: 56px 38px; }
/* flyadeal mark. The source artwork is a square app icon, so it is masked to a
   circle here — iOS rounds it automatically, browsers do not. */
.success-mark {
  width: 80px; height: 80px;
  border-radius: var(--radius-pill);
  display: block;
  margin: 0 auto 22px;
}
.success-card p { font-size: 16px; color: var(--ink-soft); line-height: 1.7; }

/* ── Downloadable resources (brand guidelines, aircraft template) ── */
.dl-card {
  background: var(--purple);
  border-radius: 18px;
  padding: 28px 32px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
/* Aircraft preview inside the download card. `.dl-card` is a flex row (heading
   left, button right), so the figure and caption claim a full-width line of
   their own rather than becoming items in that row. */
.dl-figure {
  flex: 0 0 100%;
  margin-top: 20px;
  background: var(--white);
  border-radius: 12px;
  padding: 14px;
}
.dl-figure img { display: block; width: 100%; height: auto; }
.dl-text h3 { font-size: 20px; color: var(--white); margin: 0 0 6px; }
.dl-text p { margin: 0; font-size: 15px; color: #cfc3dd; }
.dl-btn {
  background: var(--lime); color: var(--purple);
  text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 14px 30px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.dl-btn:hover { filter: brightness(1.06); }
/* On a phone the row would squeeze the button against the text, so stack. */
@media (max-width: 640px) {
  .dl-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .dl-btn { width: 100%; text-align: center; }
  /* The card is a column here, so flex-basis sizes height, not width — stretch
     the figure so the preview fills the card's width. */
  .dl-figure { align-self: stretch; }
}

/* ── Footer ── */
.site-footer {
  background: var(--purple);
  color: #cfc3dd;
  padding: 34px 5vw;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { font-weight: 900; font-size: 20px; color: var(--white); }
.footer-tag { font-weight: 700; color: var(--lime); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #cfc3dd; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--lime); }
.footer-copy { font-size: 13.5px; }

/* ── Terms & Privacy popup ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 12, 30, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--white);
  border-radius: 18px;
  width: 100%; max-width: 720px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  border-top: 6px solid var(--lime);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 28px 16px;
  border-bottom: 1px solid var(--lilac-line);
}
.modal-head h2 { font-weight: 900; font-size: 22px; color: var(--purple); }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--ink-muted);
  padding: 0 4px;
}
.modal-close:hover { color: var(--pink); }
.modal-body { padding: 20px 28px; overflow-y: auto; }
/* Full legal T&C: numbered sections with nested lists. */
.tc-body .tc-lead { font-weight: 700; color: var(--purple); margin-bottom: 14px; }
.tc-body h3 { font-weight: 800; font-size: 15px; color: var(--purple); margin: 18px 0 6px; }
.tc-body h3:first-of-type { margin-top: 4px; }
.tc-body p { font-size: 14px; line-height: 1.7; margin-bottom: 8px; }
.tc-body ul { margin: 0 0 8px; padding-inline-start: 20px; }
.tc-body li { font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.tc-body ul ul { margin-top: 6px; }
.modal-body h3 { font-weight: 900; font-size: 17px; color: var(--purple); margin-bottom: 4px; }
.modal-body .modal-sub { font-size: 13px; color: var(--ink-muted); margin-bottom: 18px; }
.modal-body h4 { font-weight: 700; font-size: 15px; color: var(--purple); margin: 18px 0 6px; }
.modal-body p { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 8px; }
.modal-body ul { margin: 0 0 8px; padding-inline-start: 20px; }
.modal-body li { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 5px; }
.modal-foot {
  padding: 14px 28px 20px; border-top: 1px solid var(--lilac-line);
  display: flex; justify-content: flex-end;
}
body.modal-open { overflow: hidden; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .modal { max-height: 92vh; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 18px; }
  .section { padding: 56px 6vw; }
  .section h2 { font-size: 30px; }
  .entry-card { padding: 30px 22px; }
  /* Tighter side padding on phones; the purple hero already scales. */
  .hero { padding: 48px 6vw 52px; }
  /* Give the aircraft preview as much width as possible on a narrow screen. */
  .dl-figure { padding: 9px; }
}
