/* ==========================================================================
   Z&Z TRAVELS & TOURS — "Departures" concept
   Split-flap kinetic typography + live radar-sweep atmosphere
   Palette: Primary Blue #0059A8 · Dark Navy #0A2B52 · signal-blue glow
   Type: Saira Extra Bold (display) + Saira SemiCondensed Medium (body)
   ========================================================================== */

:root {
  --navy-950: #050f1c;
  --navy-900: #0a2b52;
  --navy-800: #123a63;
  --navy-700: #1a4a78;
  --blue-500: #0059a8;
  --blue-400: #2f7ec4;
  --glow-400: #3e9bff;
  --glow-300: #7dc0ff;
  --cream-50: #eef2f7;
  --cream-100: #d7e0ea;
  --board-panel: #0c2544;
  --board-panel-dark: #081b34;
  --flap-ink: #eef2f7;

  --bg: var(--navy-950);
  --text-primary: var(--cream-50);
  --text-secondary: rgba(238, 242, 247, 0.6);
  --accent: var(--glow-400);
  --accent-soft: rgba(62, 155, 255, 0.16);
  --surface: rgba(238, 242, 247, 0.05);
  --surface-border: rgba(125, 192, 255, 0.22);
  --shadow-color: rgba(2, 8, 16, 0.6);

  --font-display: 'Saira', -apple-system, sans-serif;
  --font-display-weight: 800;
  --font-body: 'Saira SemiCondensed', -apple-system, sans-serif;
  --font-body-weight: 500;

  --max-width: 1080px;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --ease-snap: cubic-bezier(0.5, 0, 0.2, 1);
}

[data-theme='light'] {
  --bg: #eef2f7;
  --text-primary: var(--navy-900);
  --text-secondary: rgba(10, 43, 82, 0.62);
  --accent: var(--blue-500);
  --accent-soft: rgba(0, 89, 168, 0.12);
  --surface: rgba(10, 43, 82, 0.04);
  --surface-border: rgba(0, 89, 168, 0.25);
  --shadow-color: rgba(10, 43, 82, 0.14);
  --board-panel: #0c2544;
  --board-panel-dark: #081b34;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Preloader — radar sweep
   ========================================================================== */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-950);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

.radar-scope {
  position: relative;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(125, 192, 255, 0.25);
  background:
    repeating-radial-gradient(circle, rgba(125,192,255,0.08) 0 1px, transparent 1px 26px);
  overflow: hidden;
}
.radar-scope::before {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(62,155,255,0.55), transparent 30%);
  animation: radar-spin 1.8s linear infinite;
}
.radar-scope::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px;
  background: var(--glow-400);
  border-radius: 50%;
  box-shadow: 0 0 12px 4px rgba(62,155,255,0.7);
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

.preloader-label {
  position: absolute;
  bottom: 34%;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cream-100);
  opacity: 0.75;
}

/* ==========================================================================
   Ambient: radar sweep backdrop + grain
   ========================================================================== */
.radar-backdrop {
  position: fixed; inset: -10%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 89, 168, 0.28), transparent 55%),
    conic-gradient(from 0deg at 50% 20%, rgba(62,155,255,0.08), transparent 25%);
  animation: sweep-rotate 22s linear infinite;
  pointer-events: none;
}
@keyframes sweep-rotate { to { transform: rotate(360deg); } }

.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.stars span {
  position: absolute;
  width: 2px; height: 2px;
  background: rgba(238, 242, 247, 0.5);
  border-radius: 50%;
  animation: twinkle 3.5s ease-in-out infinite;
}
[data-theme='light'] .stars span { background: rgba(10, 43, 82, 0.2); }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }

/* ==========================================================================
   Theme toggle
   ========================================================================== */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 100;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s var(--ease-snap);
}
.theme-toggle:hover { transform: scale(1.08) rotate(-8deg); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 20px; height: 20px; color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
[data-theme='light'] .theme-toggle .icon-sun { display: none; }
[data-theme='light'] .theme-toggle .icon-moon { display: block; }

/* ==========================================================================
   Layout shell
   ========================================================================== */
.page {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 20px 56px;
}
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; }

.board-header {
  display: flex; justify-content: center;
  margin-bottom: 36px;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.2s forwards;
}
.brand-logo { width: min(300px, 58vw); height: auto; }

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

/* ==========================================================================
   Split-flap mechanism
   ========================================================================== */
.flap-row {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.flap-cell {
  position: relative;
  width: clamp(24px, 6vw, 46px);
  height: clamp(34px, 8.4vw, 64px);
  perspective: 200px;
}

.flap-face {
  position: absolute; inset: 0;
  border-radius: 4px;
  background: linear-gradient(to bottom, var(--board-panel) 0%, var(--board-panel) 49%, var(--board-panel-dark) 51%, var(--board-panel-dark) 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(125,192,255,0.12);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.flap-face::after {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.55);
  transform: translateY(-0.5px);
}

.flap-char {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(1rem, 3.6vw, 2rem);
  color: var(--flap-ink);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.flap-cell.is-empty .flap-face { background: transparent; box-shadow: none; }
.flap-cell.is-empty .flap-face::after { display: none; }

.flap-anim .flap-face {
  animation: flapTurn 0.22s var(--ease-snap);
  transform-style: preserve-3d;
}

@keyframes flapTurn {
  0%   { transform: rotateX(0deg); filter: brightness(1); }
  48%  { transform: rotateX(-90deg); filter: brightness(0.55); }
  52%  { transform: rotateX(90deg); filter: brightness(0.55); }
  100% { transform: rotateX(0deg); filter: brightness(1); }
}

/* Hero flap headline */
.flap-hero {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 40px;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.35s forwards;
}

.hero-sub {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-align: center;
  max-width: 40ch;
}

/* ==========================================================================
   Departure board table
   ========================================================================== */
.departure-board {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 40px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 60px var(--shadow-color);
  padding: 22px clamp(14px, 4vw, 30px) 26px;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.5s forwards;
}

.board-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--surface-border);
}

.board-title {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.board-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.board-live::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

.board-columns {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1.6fr 1fr;
  gap: 8px;
  padding: 0 4px 8px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.board-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1.6fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border-top: 1px solid var(--surface-border);
}

.board-row:first-of-type { border-top: none; }

.board-cell-flaps { display: flex; gap: 3px; flex-wrap: nowrap; }
.board-cell-flaps .flap-cell { width: clamp(13px, 2.6vw, 19px); height: clamp(19px, 3.8vw, 27px); }
.board-cell-flaps .flap-char { font-size: clamp(0.62rem, 1.7vw, 0.85rem); }

.board-clock {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(0.78rem, 2vw, 0.95rem);
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Notify panel — boarding call CTA
   ========================================================================== */
.notify-panel {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.65s forwards;
}

.notify-panel h2 {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.notify-panel p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.notify-form {
  display: flex; gap: 10px;
}

.notify-form input[type="email"] {
  flex: 1; min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
}
[data-theme='light'] .notify-form input[type="email"] { background: rgba(10,43,82,0.03); }
.notify-form input[type="email"]::placeholder { color: var(--text-secondary); }
.notify-form input[type="email"]:focus { border-color: var(--accent); outline: none; }

.btn-board {
  --mx: 50%; --my: 50%;
  position: relative;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, var(--blue-500), var(--glow-400));
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 89, 168, 0.4);
  transition: transform 0.25s var(--ease-snap), box-shadow 0.25s ease;
}
.btn-board::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120px circle at var(--mx) var(--my), rgba(255,255,255,0.35), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn-board:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 89, 168, 0.5); }
.btn-board:hover::before { opacity: 1; }
.btn-board:active { transform: translateY(0) scale(0.98); }

.form-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-height: 1em;
}
.form-note.success { color: var(--glow-300); }

/* ==========================================================================
   Mini route strip
   ========================================================================== */
.mini-route {
  width: 100%; max-width: 640px;
  margin: 0 auto 40px;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.8s forwards;
}
.mini-route svg { width: 100%; height: auto; overflow: visible; }
.mini-route .route-path {
  fill: none; stroke: var(--surface-border);
  stroke-width: 1.6; stroke-dasharray: 5 7; stroke-linecap: round;
  animation: dash-flow 2.2s linear infinite;
}
@keyframes dash-flow { to { stroke-dashoffset: -24; } }
.mini-route .route-marker circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.mini-route .route-marker.active circle { fill: var(--accent); }
.mini-route .route-city {
  font-family: var(--font-body); font-size: 10px;
  letter-spacing: 0.08em; fill: var(--text-secondary); text-transform: uppercase;
}
.mini-route .route-plane {
  color: var(--accent);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  animation: fly-route 6s var(--ease-snap) infinite;
}
@keyframes fly-route {
  0% { offset-distance: 0%; opacity: 0; }
  4% { opacity: 1; }
  92% { opacity: 1; }
  96% { opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* ==========================================================================
   Social + WhatsApp
   ========================================================================== */
.social-row {
  display: flex; gap: 12px; justify-content: center;
  margin-bottom: 32px;
  opacity: 0; animation: rise 0.8s var(--ease-snap) 0.92s forwards;
}
.social-row a {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--surface-border);
  color: var(--text-primary);
  transition: transform 0.3s var(--ease-snap), color 0.25s ease, border-color 0.25s ease;
}
.social-row a:hover { transform: translateY(-4px); color: var(--accent); border-color: var(--accent); }

.whatsapp-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s var(--ease-snap);
}
.whatsapp-fab::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; animation: whatsapp-pulse 2.2s ease-out infinite; z-index: -1;
}
@keyframes whatsapp-pulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
.whatsapp-fab:hover { transform: scale(1.08); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
  opacity: 0; animation: rise 0.8s var(--ease-snap) 1.05s forwards;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .page { padding: 52px 14px 44px; }
  .board-columns, .board-row { grid-template-columns: 0.9fr 1.3fr 1.3fr 0.8fr; }
  .notify-form { flex-direction: column; }
  .theme-toggle { top: 14px; right: 14px; width: 44px; height: 44px; }
  .whatsapp-fab { bottom: 16px; right: 16px; width: 50px; height: 50px; }
}

@media (max-width: 420px) {
  .board-columns span:nth-child(4), .board-row .board-clock { display: none; }
  .board-columns, .board-row { grid-template-columns: 0.9fr 1.3fr 1.3fr; }
}
