/* =========================================================
   FLY JUNCTION — Design System & Premium UI Layer
   Visual upgrade only. Does not alter site content.
   ========================================================= */

:root {
  /* Brand tokens */
  --fj-navy: #0b1f3a;
  --fj-navy-deep: #071526;
  --fj-blue: #1261a0;
  --fj-sky: #38bdf8;
  --fj-orange: #f59e0b;
  --fj-orange-hover: #d97706;
  --fj-bg: #f8fafc;
  --fj-bg-soft: #eff6ff;
  --fj-text: #0f172a;
  --fj-muted: #64748b;
  --fj-white: #ffffff;
  --fj-border: rgba(15, 23, 42, 0.08);
  --fj-border-strong: rgba(15, 23, 42, 0.14);

  /* Radii */
  --fj-radius-sm: 0.5rem;
  --fj-radius: 0.875rem;
  --fj-radius-lg: 1.25rem;
  --fj-radius-xl: 1.5rem;

  /* Shadows */
  --fj-shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.05);
  --fj-shadow: 0 10px 30px -18px rgba(11, 31, 58, 0.28);
  --fj-shadow-lg: 0 28px 60px -28px rgba(11, 31, 58, 0.42);
  --fj-shadow-orange: 0 14px 28px -12px rgba(245, 158, 11, 0.45);

  /* Map onto existing app CSS variables (no content change) */
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 213 69% 14%;
  --primary-foreground: 210 40% 98%;
  --secondary: 214 100% 97%;
  --secondary-foreground: 213 69% 14%;
  --muted: 214 32% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 199 89% 60%;
  --accent-foreground: 213 69% 14%;
  --border: 214 24% 90%;
  --input: 214 24% 90%;
  --ring: 199 89% 48%;
  --azure: 204 80% 35%;
  --midnight: 213 69% 14%;
  --radius: 0.875rem;

  --font-heading: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--fj-bg);
}

body {
  font-family: var(--font-body) !important;
  color: var(--fj-text);
  background: var(--fj-bg) !important;
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  overflow-x: hidden;
  line-height: 1.6;
}

#root,
#root > div,
#root > div.bg-background {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background-color: var(--fj-bg) !important;
  background-image:
    radial-gradient(900px 420px at 85% -5%, rgba(18, 97, 160, 0.07), transparent 60%),
    radial-gradient(700px 360px at 10% 8%, rgba(56, 189, 248, 0.05), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: var(--font-heading) !important;
  letter-spacing: -0.03em;
  color: inherit;
}

h1.font-heading {
  text-wrap: balance;
  text-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

body, button, input, textarea, select {
  font-family: var(--font-body) !important;
}

::selection {
  background: rgba(56, 189, 248, 0.28);
  color: var(--fj-navy);
}

/* Subtle travel route motif (decorative only) */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M10 90 C40 40, 80 40, 110 20' fill='none' stroke='%230B1F3A' stroke-width='1.2' stroke-dasharray='3 6'/%3E%3Ccircle cx='110' cy='20' r='2.5' fill='%23F59E0B'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

#root {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
header,
header.sticky,
header.glass-dark,
[class*="sticky top-0"] {
  width: 100% !important;
  max-width: none !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(11, 31, 58, 0.92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  box-shadow: 0 10px 40px -24px rgba(7, 21, 38, 0.65);
}

header .bg-\[\#000000\],
header [class*="bg-[#000000]"] {
  background: transparent !important;
  width: 100% !important;
}

header > .max-w-7xl,
header > div.max-w-7xl {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

header .h-16 {
  min-height: 6.5rem !important;
  height: auto !important;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

header nav button,
header nav a {
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.86) !important;
  transition: color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease !important;
  border-radius: 999px;
}

header nav button:hover,
header nav a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06);
}

header a[href].bg-white,
header button.bg-white {
  background: var(--fj-orange) !important;
  color: #fff !important;
  border-radius: 0.75rem !important;
  box-shadow: var(--fj-shadow-orange);
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
}

header a[href].bg-white:hover,
header button.bg-white:hover {
  background: var(--fj-orange-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px rgba(245, 158, 11, 0.55);
}

/* Logo */
img.fj-logo-full,
a[href="/"] img[alt="FLYJUNCTION"] {
  height: 5.5rem;
  width: auto;
  max-width: min(360px, 70vw);
  object-fit: contain;
  border-radius: 0.55rem;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

footer a[href="/"] img[alt="FLYJUNCTION"],
footer img.fj-logo-full {
  height: 7rem;
  max-width: 380px;
}

a[href="/"]:hover img[alt="FLYJUNCTION"] {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06);
}

/* ---------- Buttons ---------- */
.btn-azure,
button.btn-azure,
a.btn-azure {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--fj-radius) !important;
  box-shadow: var(--fj-shadow-orange) !important;
  letter-spacing: -0.01em;
  font-weight: 600 !important;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-azure:hover,
button.btn-azure:hover,
a.btn-azure:hover {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  filter: none !important;
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -14px rgba(217, 119, 6, 0.55) !important;
}

.btn-azure:active {
  transform: translateY(0);
}

.btn-azure:focus-visible {
  outline: 2px solid var(--fj-sky);
  outline-offset: 2px;
}

.btn-azure:disabled,
.btn-azure[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Secondary-style links that look like CTAs */
a.text-azure,
.text-azure {
  color: var(--fj-blue) !important;
}

.text-\[\#5b9bf5\],
.text-\[\#6ea8ff\] {
  color: var(--fj-sky) !important;
}

.hover\:text-\[\#1558c4\]:hover,
.hover\:text-\[\#5b9bf5\]:hover {
  color: var(--fj-blue) !important;
}

/* ---------- Search / glass ---------- */
.glass-tray {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: var(--fj-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  border-radius: var(--fj-radius-xl) !important;
}

.glass-dark {
  background: rgba(11, 31, 58, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.tt-input {
  border-color: var(--fj-border-strong) !important;
  border-radius: var(--fj-radius) !important;
  box-shadow: var(--fj-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.tt-input:focus {
  border-color: var(--fj-blue) !important;
  box-shadow: 0 0 0 4px rgba(18, 97, 160, 0.14) !important;
}

/* ---------- Cards / surfaces ---------- */
.premium-shadow {
  box-shadow: var(--fj-shadow) !important;
}

.premium-shadow-lg,
.hover\:premium-shadow-lg:hover {
  box-shadow: var(--fj-shadow-lg) !important;
}

a[href^="/destinations/"],
a[href^="/deals/"] {
  border-radius: var(--fj-radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

a[href^="/destinations/"]:hover,
a[href^="/deals/"]:hover {
  transform: translateY(-3px);
  box-shadow: var(--fj-shadow-lg);
}

a[href^="/destinations/"] img,
a[href^="/deals/"] img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

a[href^="/destinations/"]:hover img,
a[href^="/deals/"]:hover img {
  transform: scale(1.05);
}

/* Section labels */
.text-azure.uppercase {
  letter-spacing: 0.14em !important;
  font-size: 0.72rem !important;
  color: var(--fj-blue) !important;
}

/* Accent dots / trust pulse */
.bg-green-400.animate-pulse {
  background-color: #22c55e !important;
}

.bg-azure,
.bg-azure\/10,
.bg-azure\/5 {
  /* keep utility opacity variants working via color remap where solid */
}

.bg-azure {
  background-color: var(--fj-blue) !important;
}

.border-azure {
  border-color: var(--fj-blue) !important;
}

/* ---------- Hero overlays ---------- */
section [class*="from-midnight"],
div[class*="from-midnight"] {
  /* preserve existing overlays; deepen contrast slightly via parent */
}

/* Soft orange CTA glow near search */
.glass-tray .btn-azure {
  min-height: 2.85rem;
}

/* ---------- Footer ---------- */
footer {
  width: 100% !important;
  max-width: none !important;
  background: linear-gradient(180deg, var(--fj-navy) 0%, var(--fj-navy-deep) 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer a {
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--fj-sky) !important;
}

/* Full-bleed dark sections */
section.bg-midnight,
section[class*="bg-midnight"],
section[class*="from-midnight"],
div.bg-midnight {
  width: 100% !important;
  max-width: none !important;
}

.bg-midnight {
  background-color: var(--fj-navy) !important;
}

.text-midnight {
  color: var(--fj-navy) !important;
}

/* ---------- Micro-interactions ---------- */
a, button {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

@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;
  }
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--fj-sky);
  outline-offset: 2px;
}

/* ---------- Responsive polish ---------- */
@media (max-width: 768px) {
  img.fj-logo-full,
  a[href="/"] img[alt="FLYJUNCTION"] {
    height: 4.25rem;
    max-width: min(240px, 62vw);
  }

  header .h-16 {
    min-height: 5.25rem !important;
  }

  h1.font-heading {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
