/* ==========================================================================
   SuarezCFI — Shared Daylight Liquid Glass Design System
   Common styling variables, backgrounds, animations, and typography tokens.
   ========================================================================== */

:root {
  --bg: #F4F6FB;
  --ink: #0D1330;
  --ink-muted: #4D5670;
  --navy: #1C2142;
  --navy-600: #141A35;
  --yellow: #FFD000;
  --yellow-bright: #FFDA33;
  --yellow-deep: #F5C400;
  --yellow-ink: #7A5F00;
  --yellow-soft: rgba(255, 208, 0, 0.16);
  --yellow-line: rgba(255, 208, 0, 0.40);
  --sky: #7EC1FF;
  --green: #10B981;
  --availability-green-rgb: 16, 185, 129;

  /* Liquid glass material */
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.42) 100%);
  --glass-bg-strong: linear-gradient(135deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.93) 100%);
  --glass-edge: rgba(255, 255, 255, 0.80);
  --glass-spec: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -1px 0 rgba(255,255,255,0.22);
  --glass-blur: 16px;
  --glass-ring: 0 0 0 1px rgba(13, 19, 48, 0.04);

  --shadow-sm: 0 2px 8px rgba(13, 19, 48, 0.05);
  --shadow-md: 0 14px 40px -12px rgba(13, 19, 48, 0.14);
  --shadow-lg: 0 30px 70px -18px rgba(13, 19, 48, 0.22);
  --shadow-yellow: 0 14px 34px -10px rgba(245, 196, 0, 0.65);

  --r-card: 30px;
  --r-md: 20px;
  --r-pill: 999px;
  --maxw: 1180px;

  /* Borders */
  --border: rgba(13, 19, 48, 0.10);
  --border-strong: rgba(13, 19, 48, 0.18);

  /* Design System v2 — fluid display scale & rhythm */
  --display-xl: clamp(2.9rem, 5.6vw, 4.9rem);
  --display-lg: clamp(2.35rem, 4.4vw, 3.55rem);
  --display-md: clamp(1.95rem, 3.4vw, 2.7rem);
  --text-lede: 1.12rem;
  --tracking-display: -0.035em;
  --space-section: clamp(64px, 9vw, 120px);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav: 60;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-signature: "Pinyon Script", cursive;
}

/* Base body film-grain overlay and color selection */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.028;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection {
  background: rgba(255, 208, 0, 0.45);
  color: var(--ink);
}

/* Aviation backdrop styling */
.aviation-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.aviation-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 33, 66, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 33, 66, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}

.aviation-ambience {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(44% 38% at 84% -6%, rgba(255, 208, 0, 0.55), transparent 70%),
    radial-gradient(38% 34% at 4% 4%, rgba(126, 193, 255, 0.42), transparent 70%),
    radial-gradient(42% 38% at 96% 58%, rgba(255, 184, 0, 0.26), transparent 70%),
    radial-gradient(40% 36% at 0% 86%, rgba(143, 203, 255, 0.30), transparent 70%),
    radial-gradient(34% 28% at 50% 110%, rgba(255, 208, 0, 0.32), transparent 70%);
}

/* Glass Material Utility */
.glass-material {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-material::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 30%);
  z-index: 0;
}

.glass-material > * {
  position: relative;
  z-index: 1;
}

/* Shared Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, background 0.22s ease;
  font-family: var(--font-sans);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: linear-gradient(160deg, var(--yellow-bright) 0%, var(--yellow) 45%, var(--yellow-deep) 100%);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-yellow), inset 0 1px 0 rgba(255,255,255,0.6);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -12px rgba(245, 196, 0, 0.75), inset 0 1px 0 rgba(255,255,255,0.6);
}

.btn--secondary {
  color: var(--ink);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-md);
  border-radius: var(--r-pill);
}

.btn--secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-lg);
}

/* Animations */
.reveal-arm {
  opacity: 0;
  transform: translateY(26px);
}

.reveal-arm.reveal-in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s);
}

@keyframes premium-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(var(--availability-green-rgb), 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(var(--availability-green-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--availability-green-rgb), 0); }
}

/* Reduced Motion media queries */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-arm {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Buttons v2 — hierarchy, press & focus states, mobile stacking
   ========================================================================== */

.btn {
  min-height: 46px;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--yellow-deep);
  outline-offset: 3px;
}

/* Tertiary: quiet text-and-arrow action */
.btn--tertiary {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--navy);
  padding: 15px 8px;
  font-weight: 600;
}
.btn--tertiary:hover {
  color: var(--ink);
  transform: none;
}
.btn--tertiary svg {
  transition: transform 0.22s var(--ease-premium);
}
.btn--tertiary:hover svg {
  transform: translateX(4px);
}

/* Full-width stacked CTAs on small screens */
@media (max-width: 640px) {
  .cta-stack .btn,
  .hero-ctas .btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    font-size: 16px;
  }
}

/* ==========================================================================
   Canonical site navigation — floating liquid-glass pill
   Used on every page of suarezcfi.com (site-nav.js drives behavior).
   ========================================================================== */

.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  position: relative;
  width: min(var(--maxw), calc(100% - 28px));
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-md);
}

.wordmark {
  font-family: var(--font-signature);
  font-size: 27px;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
  text-decoration: none;
  padding: 6px 0;
}
.wordmark:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink);
}

.nav-links > a,
.nav-drop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--r-pill);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-links > a:hover,
.nav-drop-toggle:hover {
  background: var(--yellow-soft);
  color: var(--navy);
}

.nav-links > a[aria-current="page"] {
  background: var(--yellow-soft);
  color: var(--navy);
  font-weight: 600;
}

.nav-links > a:focus-visible,
.nav-drop-toggle:focus-visible,
.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--yellow-deep);
  outline-offset: 2px;
}

/* Tools dropdown */
.nav-dropdown {
  position: relative;
}

.nav-caret {
  width: 13px;
  height: 13px;
  transition: transform 0.22s var(--ease-premium);
}

.nav-drop-toggle[aria-expanded="true"] .nav-caret,
.nav-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}

.nav-drop-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 264px;
  padding: 8px;
  border-radius: 20px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.24s var(--ease-premium), visibility 0s linear 0.24s;
}

.nav-dropdown.is-open .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

@media (hover: hover) and (min-width: 981px) {
  .nav-dropdown:hover .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
  }
}

.nav-drop-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 13px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease;
}
.nav-drop-panel a:hover { background: var(--yellow-soft); }
.nav-drop-panel a strong { font-size: 14.5px; font-weight: 600; color: var(--navy); }
.nav-drop-panel a span { font-size: 12.5px; color: var(--ink-muted); }

/* Primary CTA */
.nav-cta {
  background: linear-gradient(160deg, var(--yellow-bright), var(--yellow-deep)) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 22px -8px rgba(245, 196, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(245, 196, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

/* Hamburger — morphs to X via aria-expanded */
.nav-menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.5);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  width: 16px;
  height: 12px;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease-premium), top 0.28s var(--ease-premium);
}
.nav-toggle-icon::before { top: 1px; }
.nav-toggle-icon::after { top: 9px; }
.nav-menu-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 5px;
  transform: rotate(45deg);
}
.nav-menu-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 5px;
  transform: rotate(-45deg);
}

/* Mobile sheet */
@media (max-width: 980px) {
  .nav { padding-left: 20px; }
  .nav-menu-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.96) 100%);
    -webkit-backdrop-filter: blur(22px) saturate(1.7);
    backdrop-filter: blur(22px) saturate(1.7);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-spec), var(--glass-ring), var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.24s ease, transform 0.28s var(--ease-premium), visibility 0s linear 0.28s;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .nav-links > a,
  .nav-drop-toggle {
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    font-size: 16px;
    border-radius: 14px;
  }

  /* Staggered entrance */
  .nav-links > * {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-premium);
  }
  .nav.is-open .nav-links > * { opacity: 1; transform: none; }
  .nav.is-open .nav-links > *:nth-child(1) { transition-delay: 0.04s; }
  .nav.is-open .nav-links > *:nth-child(2) { transition-delay: 0.07s; }
  .nav.is-open .nav-links > *:nth-child(3) { transition-delay: 0.10s; }
  .nav.is-open .nav-links > *:nth-child(4) { transition-delay: 0.13s; }
  .nav.is-open .nav-links > *:nth-child(5) { transition-delay: 0.16s; }
  .nav.is-open .nav-links > *:nth-child(6) { transition-delay: 0.19s; }
  .nav.is-open .nav-links > *:nth-child(7) { transition-delay: 0.22s; }

  /* Dropdown becomes an in-flow expandable section */
  .nav-drop-panel {
    position: static;
    transform: none;
    min-width: 0;
    margin: 2px 0 4px 14px;
    padding: 2px 0 2px 12px;
    border: none;
    border-left: 2px solid var(--yellow-line);
    border-radius: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .nav-dropdown.is-open .nav-drop-panel { display: flex; transform: none; }
  .nav-drop-panel a { min-height: 44px; justify-content: center; }

  .nav-cta {
    margin-top: 6px;
    text-align: center;
    justify-content: center;
    min-height: 52px;
  }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .nav { width: calc(100% - 20px); padding-left: 16px; }
  .wordmark { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links > * { transition: none; opacity: 1; transform: none; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { transition: none; }
}
