/* =====================================================
   Path: public/assets/css/style.css
   Purpose: Base stylesheet for JETOWN Phase 3 public site.
   Semantic, accessible, no animation/motion libraries.
   Tokens derived from the Phase 3 brand brief: navy/gold
   corporate-aviation palette, system-font typography.
   ===================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Color — brief tokens */
  --color-navy: #0b0f19;          /* Primary */
  --color-navy-deep: #1a2238;     /* Secondary */
  --color-gold: #c9a14a;          /* Gold Accent */
  --color-white: #ffffff;         /* Text (on dark) / Background */
  --color-muted: #b8b8b8;         /* Muted Text — dark surfaces only, AA-safe there */
  --color-light: #f7f7f7;         /* Light Background */

  /* Color — small, deliberate additions to make a 6-token brief work as a
     full two-tone site. The brief defines text/muted colors that only meet
     WCAG AA contrast on dark surfaces; these cover light-surface text and
     visible borders without introducing any new hue. */
  --color-ink: var(--color-navy);     /* body text on light/white surfaces */
  --color-muted-on-light: #4b5468;    /* secondary text on light surfaces, ~8.8:1 on white */
  --color-border: #e3e6ec;            /* visible hairline borders on light surfaces */
  --color-on-gold: var(--color-navy); /* text/icon color when sitting on a gold fill */

  /* Type — system fonts only, per brand brief */
  --font-family-base: Arial, Helvetica, sans-serif;
  --font-size-sm: 12px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 42px;
  --line-height-base: 24px;

  /* Space */
  --space-1: 6.4px;
  --space-2: 7px;
  --space-3: 10px;
  --space-4: 11px;
  --space-5: 12px;
  --space-6: 14px;
  --space-7: 16px;
  --space-8: 20px;
  --space-9: 32px;
  --space-10: 48px;
  --space-11: 72px;

  /* Radius / shadow / motion */
  --radius-xs: 6px;
  --radius-sm: 7px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 9999px;
  --shadow-1: rgba(11, 15, 25, 0.12) 0px 4px 16px 0px;
  --motion-fast: 150ms ease;
  --motion-normal: 250ms ease;

  /* Breakpoints (reference only — media queries below use the literal
     values so they stay readable): Desktop 1200px+, Tablet 768px, Mobile 480px */
  --content-max-width: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-base);
  color: var(--color-ink);
  background: var(--color-white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 var(--space-6); line-height: 1.15; font-weight: 600; }
h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
p { margin: 0 0 var(--space-7); color: var(--color-muted-on-light); }
table { border-collapse: collapse; width: 100%; }

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-5) var(--space-7);
  z-index: 100;
}
.skip-link:focus-visible { left: var(--space-5); top: var(--space-5); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}
.section { padding: var(--space-11) 0; }
.section--muted { background: var(--color-light); }
.section--dark { background: var(--color-navy); color: var(--color-white); }
.section--dark p { color: var(--color-muted); }
.section__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted-on-light);
  margin-bottom: var(--space-5);
}
.hero .section__eyebrow,
.section--dark .section__eyebrow {
  color: var(--color-gold);
}
.grid {
  display: grid;
  gap: var(--space-9);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- Site header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--motion-fast);
}
.site-header.is-scrolled { box-shadow: var(--shadow-1); }
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-7) var(--space-8);
  max-width: var(--content-max-width);
  margin: 0 auto;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.site-header__brand img { height: 32px; width: auto; }

/* Wrapper that holds desktop nav + hamburger button side-by-side.
   On desktop: nav is visible, hamburger hidden.
   On mobile:  nav is hidden, hamburger visible. */
.site-header__end {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav { display: flex; align-items: center; }
.site-nav__list { display: flex; align-items: center; gap: var(--space-9); flex-wrap: wrap; }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-4) 0;
  font-size: var(--font-size-md);
  color: var(--color-muted-on-light);
  transition: color var(--motion-fast);
}
.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link[aria-current="page"] {
  color: var(--color-navy);
}
/* ---------- Nav dropdowns (mega menu) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: transparent;
  border: none;
  margin: 0;
  padding: var(--space-4) 0;
  font-family: inherit;
  font-size: var(--font-size-md);
  color: var(--color-muted-on-light);
  cursor: pointer;
  transition: color var(--motion-fast);
}
.nav-dropdown__trigger:hover,
.nav-dropdown__trigger:focus-visible,
.nav-dropdown.is-open .nav-dropdown__trigger,
.nav-dropdown.is-active .nav-dropdown__trigger {
  color: var(--color-navy);
}
.nav-dropdown__chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform var(--motion-normal);
}
.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: rotate(225deg);
  margin-top: 3px;
}

.nav-dropdown__panel {
  position: absolute;
  top: calc(100% + var(--space-5));
  left: 50%;
  min-width: 230px;
  margin: 0;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity var(--motion-normal), transform var(--motion-normal), visibility var(--motion-normal);
  z-index: 30;
}
.nav-dropdown.is-open .nav-dropdown__panel,
.nav-dropdown__trigger:focus-visible + .nav-dropdown__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
  .nav-dropdown:hover .nav-dropdown__chevron {
    transform: rotate(225deg);
    margin-top: 3px;
  }
}

.nav-dropdown__item {
  display: block;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-md);
  color: var(--color-muted-on-light);
  white-space: nowrap;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.nav-dropdown__item--standard:hover,
.nav-dropdown__item--standard:focus-visible,
.nav-dropdown__item--standard[aria-current="page"] {
  background: var(--color-light);
  color: var(--color-navy);
}
.nav-dropdown__item--primary {
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  text-align: center;
}
.nav-dropdown__item--primary:hover,
.nav-dropdown__item--primary:focus-visible {
  background: var(--color-white) !important;
  color: var(--color-navy) !important;
}
.nav-dropdown__item--primary[aria-current="page"] {
  background: var(--color-white) !important;
  color: var(--color-navy) !important;
  text-decoration: none !important;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  border-width: 2px;
  border-style: solid;
  border-color: var(--color-navy);
}
.nav-dropdown__item--secondary {
  border: 1px solid var(--color-gold);
  color: var(--color-navy);
  font-weight: 600;
  text-align: center;
}
.nav-dropdown__item--secondary:hover,
.nav-dropdown__item--secondary:focus-visible {
  background: var(--color-light);
  border-color: var(--color-navy);
}
.nav-dropdown__item--secondary[aria-current="page"] {
  background: var(--color-navy);
  color: var(--color-gold) !important;
  text-decoration: none !important;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
  border-width: 2px;
  border-style: solid;
  border-color: var(--color-light);
}
.nav-dropdown__item[aria-current="page"] {
  color: var(--color-navy);
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 2px;
}

/* Desktop (>=1024px): show nav, hide hamburger.
   Mobile (<1024px): hide nav, show hamburger.
   CRITICAL: only hide .site-nav — never .site-header__end or
   .mobile-menu-toggle — so the hamburger is always reachable. */
@media (max-width: 1023px) {
  .site-nav { display: none; }
}

/* ---------- Mobile menu toggle (hamburger, opens the full-screen drawer) ---------- */
.mobile-menu-toggle {
  /* Hidden on desktop by default; shown on mobile via the media query below */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.mobile-menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 1px;
  transition: transform var(--motion-fast), opacity var(--motion-fast);
}
@media (max-width: 1023px) {
  /* Show hamburger; keep .site-header__end (the parent) visible. */
  .mobile-menu-toggle { display: flex; }
}

/* ---------- Mobile navigation drawer (full-screen, XO Jets-inspired) ----------
   Scoped tokens: the brief specifies exact pixel values (32px headings,
   20px menu items, 18px sub-items, 24px/32px spacing, #1E1E1E text,
   #E5E7EB dividers) that don't map onto the existing site-wide scale.
   Rather than bend the global scale to fit one component, these are
   kept local to .mobile-drawer so the rest of the site is unaffected. */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--color-white);
  color: #1e1e1e;
  line-height: 1.5;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* Slide-up from bottom: start below viewport, animate to natural position */
  transform: translateY(100%);
  transition: transform 250ms ease-in;
}
.mobile-drawer[hidden] { display: none; }
.mobile-drawer.is-open {
  transform: translateY(0);
  transition: transform 300ms ease-out;
}
.mobile-drawer.is-closing { transition: transform 250ms ease-in; }

.mobile-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 15, 25, 0.45);
  opacity: 0;
  transition: opacity 250ms ease-in;
}
.mobile-drawer-scrim[hidden] { display: none; }
.mobile-drawer-scrim.is-open { opacity: 1; transition: opacity 300ms ease-out; }

body.drawer-open { overflow: hidden; }

.mobile-drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.mobile-drawer__brand img { height: 28px; width: auto; }
.mobile-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 28px;
  line-height: 1;
  color: #1e1e1e;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.mobile-drawer__close:hover, .mobile-drawer__close:focus-visible { background: var(--color-light); }

.mobile-drawer__nav { flex: 1; }
.mobile-accordion { display: flex; flex-direction: column; }
.mobile-accordion__item,
.mobile-accordion__item--flat {
  border-bottom: 1px solid #e5e7eb;
}
.mobile-accordion__link,
.mobile-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  margin: 0;
  padding: 24px 32px;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.mobile-accordion__link:hover,
.mobile-accordion__link:focus-visible,
.mobile-accordion__link[aria-current="page"],
.mobile-accordion__trigger:hover,
.mobile-accordion__trigger:focus-visible {
  background: var(--color-light);
}
.mobile-accordion__chevron {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 250ms ease;
}
.mobile-accordion__trigger[aria-expanded="true"] .mobile-accordion__chevron {
  transform: rotate(225deg);
  margin-top: 3px;
}

.mobile-accordion__panel {
  max-height: 0;
  overflow: hidden;
  background: var(--color-light);
  transition: max-height 250ms ease;
}
.mobile-accordion__trigger[aria-expanded="true"] + .mobile-accordion__panel {
  max-height: 600px;
}
.mobile-accordion__sublink {
  display: block;
  padding: 16px 32px 16px 48px;
  font-size: 18px;
  color: #1e1e1e;
  transition: background var(--motion-fast);
}
.mobile-accordion__sublink--standard:hover,
.mobile-accordion__sublink--standard:focus-visible,
.mobile-accordion__sublink--standard[aria-current="page"] {
  background: #e5e7eb;
}
.mobile-accordion__sublink--primary {
  margin: 8px 32px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  text-align: center;
}
.mobile-accordion__sublink--primary:hover,
.mobile-accordion__sublink--primary:focus-visible {
  background: var(--color-muted-on-light);
}
.mobile-accordion__sublink--secondary {
  margin: 8px 32px 16px;
  padding: 14px 24px;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-pill);
  color: var(--color-navy);
  font-weight: 600;
  text-align: center;
}
.mobile-accordion__sublink--secondary:hover,
.mobile-accordion__sublink--secondary:focus-visible {
  background: #fbf6ea;
}

.mobile-drawer__section {
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.mobile-drawer__heading {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-navy);
}
.mobile-support .mobile-drawer__heading {
  font-size: 20px;
  margin-bottom: 8px;
}

.mobile-apps__row {
  display: flex;
  gap: 12px;
}
.mobile-apps__badge {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: transparent;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.mobile-apps__badge:hover { background: var(--color-light); }
.mobile-apps__badge:active { background: #e5e7eb; border-color: var(--color-gold); }
.mobile-apps__badge img { height: 28px; width: auto; }

.mobile-support__phone {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-gold);
}
.mobile-support__phone:hover, .mobile-support__phone:focus-visible { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-9);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.btn:disabled { cursor: not-allowed; opacity: 0.6; }
.btn--primary { background: var(--color-navy); color: var(--color-white); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--color-muted-on-light); }
.btn--secondary { background: transparent; color: var(--color-navy); border-color: var(--color-muted-on-light); }
.btn--secondary:hover, .btn--secondary:focus-visible { border-color: var(--color-navy); }
.btn--gold { background: var(--color-gold); color: var(--color-on-gold); }
.btn--gold:hover, .btn--gold:focus-visible { background: #b8913f; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-11) 0;
}
.hero p { color: var(--color-muted); }
.hero__content { max-width: 720px; }
.hero__actions { display: flex; gap: var(--space-7); margin-top: var(--space-9); flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-9);
  box-shadow: var(--shadow-1);
}
.card h3 { margin-bottom: var(--space-5); }
.contact-card__address { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-7); font-style: normal; }
.contact-card__address a { width: fit-content; }
.card--media { padding: 0; overflow: hidden; }
.card--media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card__body { padding: var(--space-9); }
.card__eyebrow {
  display: block;
  color: var(--color-gold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}
.card__link { display: inline-flex; margin-top: var(--space-5); font-weight: 600; color: var(--color-navy); }
.card__link:hover, .card__link:focus-visible { color: var(--color-gold); }
.faq-item { margin-bottom: var(--space-6); }
.faq-item summary { cursor: pointer; }
.faq-item p { margin-top: var(--space-6); color: var(--color-muted-on-light); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: var(--space-8); }
.form-field label {
  display: block;
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: var(--space-6) var(--space-7);
  border: 1px solid var(--color-muted-on-light);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-ink);
  transition: border-color var(--motion-fast);
}
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--color-navy);
}
.form-field--error input,
.form-field--error textarea { border-color: #8a2c2c; }
.form-field__error { color: #8a2c2c; font-size: var(--font-size-sm); margin-top: var(--space-3); }
.form-field--checkbox { display: flex; align-items: center; gap: var(--space-4); }
.form-field--checkbox input { width: auto; }
.alert {
  padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-8);
  font-size: var(--font-size-md);
}
.alert--error { background: #fbeaea; color: #8a2c2c; }
.alert--success { background: #e9f3ec; color: #1e5b3a; }

/* ---------- Tables (admin placeholder data) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.data-table th, .data-table td {
  text-align: left;
  padding: var(--space-6) var(--space-7);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-md);
}
.data-table th { background: var(--color-light); font-weight: 600; }
.data-table tbody tr:last-child td { border-bottom: none; }
.empty-state { padding: var(--space-10) var(--space-8); text-align: center; color: var(--color-muted-on-light); }
.mt-stack { margin-top: var(--space-9); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  z-index: 50;
}
.modal-overlay.is-open { display: flex; }
.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-9);
  box-shadow: var(--shadow-1);
  position: relative;
}
.modal__close {
  position: absolute;
  top: var(--space-7);
  right: var(--space-7);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-lg);
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover, .modal__close:focus-visible { border-color: var(--color-navy); }
.modal__title { margin-bottom: var(--space-7); padding-right: var(--space-10); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-navy); color: var(--color-muted); padding: var(--space-10) 0 var(--space-8); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-9); }
.site-footer h4 { color: var(--color-white); font-size: var(--font-size-md); margin-bottom: var(--space-6); }
.site-footer a { color: var(--color-muted); font-size: var(--font-size-md); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--color-white); }
.site-footer__contact { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-6); font-style: normal; }
.site-footer__contact a { width: fit-content; }
.site-footer__social { display: flex; gap: var(--space-6); margin-top: var(--space-7); }
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-muted-on-light);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  transition: border-color var(--motion-fast), color var(--motion-fast);
}
.site-footer__social a:hover, .site-footer__social a:focus-visible {
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.site-footer__social svg { width: 16px; height: 16px; fill: currentColor; }
.site-footer__bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-muted-on-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-size: var(--font-size-sm);
}
@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-9) var(--space-7);
}
.admin-sidebar__brand { font-size: var(--font-size-xl); font-weight: 700; margin-bottom: var(--space-10); }
.admin-sidebar nav ul { display: flex; flex-direction: column; gap: var(--space-4); }
.admin-sidebar nav a {
  display: block;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  font-size: var(--font-size-md);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.admin-sidebar nav a:hover, .admin-sidebar nav a:focus-visible { background: var(--color-muted-on-light); color: var(--color-white); }
.admin-sidebar nav a[aria-current="page"] { background: var(--color-white); color: var(--color-navy); }
.admin-main { flex: 1; background: var(--color-light); padding: var(--space-9) var(--space-10); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-9); }
.admin-topbar__user { font-size: var(--font-size-md); color: var(--color-muted-on-light); }
.admin-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy);
  padding: var(--space-8);
}
.admin-login-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-1);
}
.admin-login-brand {
  text-align: center;
  margin-bottom: var(--space-9);
}
.admin-login-logo {
  max-width: 160px;
  height: auto;
  display: inline-block;
}
.admin-login-tagline {
  margin: var(--space-4) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-muted-on-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-login-links {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--font-size-sm);
}
.admin-login-links a {
  color: var(--color-muted-on-light);
  text-decoration: underline;
}
.admin-login-links a:hover, .admin-login-links a:focus-visible { color: var(--color-ink); }

/* ---------- Admin CMS (Phase 6) ---------- */
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

.admin-stat-card { display: flex; flex-direction: column; gap: var(--space-4); }
.admin-stat-card__label {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted-on-light);
}
.admin-stat-card__value { font-size: var(--font-size-4xl); font-weight: 700; color: var(--color-navy); line-height: 1; }

.admin-search {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.admin-search input[type="search"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: var(--space-5) var(--space-7);
  border: 1px solid var(--color-muted-on-light);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-ink);
}
.admin-search input[type="search"]:focus-visible { border-color: var(--color-navy); }
.admin-search .btn { padding: var(--space-5) var(--space-7); }
.admin-search__clear { font-size: var(--font-size-sm); color: var(--color-muted-on-light); text-decoration: underline; }
.admin-search__clear:hover, .admin-search__clear:focus-visible { color: var(--color-ink); }

.admin-result-count { font-size: var(--font-size-sm); color: var(--color-muted-on-light); margin-bottom: var(--space-6); }

.admin-table__truncate { max-width: 240px; }

.status-update-form { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.status-update-form select {
  font: inherit;
  font-size: var(--font-size-sm);
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--color-muted-on-light);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-ink);
}
.status-update-form select:focus-visible { border-color: var(--color-navy); }
.btn--sm { padding: var(--space-4) var(--space-6); font-size: var(--font-size-sm); }

.status-badge {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
}
.status-badge--new { background: var(--color-light); color: var(--color-muted-on-light); border: 1px solid var(--color-border); }
.status-badge--contacted { background: #f6efdc; color: var(--color-navy); }
.status-badge--qualified { background: #e3e6f0; color: var(--color-navy); }
.status-badge--proposal { background: #ead9af; color: var(--color-navy); }
.status-badge--converted { background: #e9f3ec; color: #1e5b3a; }
.status-badge--closed { background: var(--color-border); color: var(--color-muted-on-light); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  margin-top: var(--space-8);
  font-size: var(--font-size-md);
}
.pagination__link {
  padding: var(--space-5) var(--space-7);
  border: 1px solid var(--color-muted-on-light);
  border-radius: var(--radius-pill);
  color: var(--color-navy);
}
.pagination__link:hover, .pagination__link:focus-visible { border-color: var(--color-navy); background: var(--color-light); }
.pagination__link--disabled { color: var(--color-border); border-color: var(--color-border); cursor: not-allowed; }
.pagination__status { color: var(--color-muted-on-light); font-size: var(--font-size-sm); }

.admin-settings__note { font-size: var(--font-size-sm); }
.admin-settings-list__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.admin-settings-list__row:last-child { border-bottom: none; }
.admin-settings-list__row dt { font-weight: 600; color: var(--color-ink); }
.admin-settings-list__row dd { margin: 0; color: var(--color-muted-on-light); text-align: right; word-break: break-word; }

/* ==========================================================================
   Tablet layout optimisation — 768px to 1366px
   Covers: iPad mini (768px), iPad Air (820px), iPad Pro 11" (1024px),
   iPad Pro 12.9" (1366px), and common landscape tablet resolutions.
   Scope: spacing, container width, typography scaling, grid behaviour,
   footer columns, and hero proportions.
   CONSTRAINTS: no color/branding changes, no desktop (>1366px) changes,
   no mobile (<768px) changes.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1366px) {

  /* --- Container: wider horizontal padding for tablet gutters --- */
  /* 20px (--space-8) is too cramped; 40px reads as intentional breathing room */
  .container {
    padding: 0 40px;
  }

  /* --- Section vertical rhythm: reduce 72px (--space-11) to a tighter tablet cadence --- */
  /* 72px top+bottom = 144px per section. 4 sections on one viewport = 576px lost to padding.
     56px top+bottom = 112px — still generous, feels connected rather than adrift. */
  .section {
    padding: 56px 0;
  }

  /* --- Hero: taller and more premium on tablet; max-content width expanded --- */
  /* 72px padding gives a stumpy hero on iPad portrait. 80px adds presence. */
  .hero {
    padding: 80px 0;
  }
  /* Let hero text breathe across the available tablet width */
  .hero__content {
    max-width: 100%;
  }
  /* Scale down h1 slightly on narrower tablets (768–900px) to reduce wrapping */
  h1 {
    font-size: 36px;
  }

  /* --- 3-column grid: collapse to 2 columns on narrower tablets (<960px)
     to prevent card text from wrapping awkwardly at ~240px wide --- */
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* --- Grid gap: reduce from 32px to 24px on tablet for tighter card rhythm --- */
  .grid {
    gap: 24px;
  }

  /* --- Card padding: reduce from 32px to 24px to recover width for content --- */
  .card {
    padding: 24px;
  }

  /* --- Footer: 4-column is too tight below 1023px; use 2+2 layout on portrait tablet --- */
  /* The "2fr 1fr 1fr 1fr" collapses to 2+2 for a comfortable read on iPad portrait */
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  /* --- Header bar: tighter vertical padding on tablet --- */
  .site-header__bar {
    padding: 14px 40px;
  }

}

/* On larger tablets (iPad Pro 11" landscape, 1024px+) restore the 4-col footer */
@media (min-width: 1024px) and (max-width: 1366px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Narrower tablets only (768–959px): collapse 3-col grids to 2-col
   to avoid overcrowded cards at ~240px width */
@media (min-width: 768px) and (max-width: 959px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Scale h1 more aggressively at smallest tablet to avoid 3-line wrapping */
  h1 {
    font-size: 32px;
  }
  /* Hero: slightly less padding on the smallest tablet target */
  .hero {
    padding: 64px 0;
  }
}

/* ---------- Mobile fine-tuning (Mobile breakpoint: 480px) ---------- */
@media (max-width: 480px) {
  .container { padding: 0 var(--space-7); }
  .section { padding: var(--space-10) 0; }
  h1 { font-size: 32px; }
  h2 { font-size: var(--font-size-2xl); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .modal { padding: var(--space-7); }
  .grid--4 { grid-template-columns: 1fr; }
  .admin-settings-list__row { flex-direction: column; gap: var(--space-2); }
  .admin-settings-list__row dd { text-align: left; }
  .pagination { flex-direction: column; align-items: stretch; text-align: center; }
}