/* =============================================================================
   CARSON COLD STORAGE & PACKING — SHARED STYLES
   Applies to every page. Page-specific overrides live in their own CSS files.
   ============================================================================= */


/* -----------------------------------------------------------------------------
   1. DESIGN TOKENS
----------------------------------------------------------------------------- */
:root {
  /* Brand colours */
  --color-navy:       #0B1C36;
  --color-teal:       #4CC9F0;
  --color-teal-dark:  #1F6E91;
  --color-gold:       #F4C430;

  /* Neutrals */
  --color-white:      #FFFFFF;
  --color-gray-bg:    #EEF2F6;
  --color-gray-light: #E5E7EB;
  --color-gray-mid:   #9CA3AF;
  --color-gray-text:  #6B7280;

  /* Semantic */
  --color-text: var(--color-navy);
  --color-bg:   var(--color-white);

  /* Short-form aliases — point to primary tokens to avoid duplication */
  --navy:       var(--color-navy);
  --teal:       var(--color-teal);
  --teal-dark:  var(--color-teal-dark);
  --white:      var(--color-white);
  --gray-bg:    var(--color-gray-bg);
  --gray-light: var(--color-gray-light);
  --gray-mid:   var(--color-gray-mid);
  --gray-text:  var(--color-gray-text);

  /* Typography */
  --font-base: 'Inter', sans-serif;

  /* Typography Scale — 7 sizes for consistent hierarchy */
  --text-xs:   11px;   /* Small labels, badges, timestamps, icons */
  --text-sm:   12px;   /* Captions, fine print, legal text, tooltips */
  --text-base: 14px;   /* Body text, navigation, buttons (site standard) */
  --text-md:   16px;   /* Emphasized body, large buttons, subheadings */
  --text-lg:   20px;   /* Card titles, small section headings */
  --text-xl:   28px;   /* Section headings, page titles */
  --text-2xl:  40px;   /* Hero titles, major headings */

  /* Line heights to match typography scale */
  --leading-tight:  1.2;   /* Headings, labels */
  --leading-normal: 1.5;   /* Body text */
  --leading-loose:  1.75;  /* Large text, paragraphs */

  /* Layout */
  --container-max: 1200px;
  --container-pad: 28px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows — consistent elevation system */
  --shadow-sm: 0 2px 8px rgba(11, 28, 54, 0.08);
  --shadow-md: 0 4px 16px rgba(11, 28, 54, 0.12);
  --shadow-lg: 0 8px 28px rgba(11, 28, 54, 0.18);
  --shadow-xl: 0 16px 48px rgba(11, 28, 54, 0.25);
  --shadow-teal: 0 8px 20px rgba(76, 201, 240, 0.30);

  /* Transitions — standardized timing */
  --t-fast: 0.2s ease;
  --t-normal: 0.3s ease;
  --t-slow: 0.5s ease;
}


/* -----------------------------------------------------------------------------
   2. ACCESSIBILITY — skip link
----------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-teal);
  color: var(--color-navy);
  font-weight: 700;
  font-size: var(--text-base);
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* -----------------------------------------------------------------------------
   3. RESET & BASE
----------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Smooth scroll offset for sticky navbar (78px navbar + 20px padding) */
section[id],
div[id],
article[id] {
  scroll-margin-top: 100px;
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

img,
video {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Keyboard navigation focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove default focus outline when using mouse */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}


/* -----------------------------------------------------------------------------
   4. LAYOUT
----------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* -----------------------------------------------------------------------------
   5. NAVIGATION
----------------------------------------------------------------------------- */
.navbar {
  background: var(--color-navy);
  height: 58px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1100; /* must exceed Leaflet's highest pane (tooltip = 650) */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid var(--color-teal);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-logo-img {
  height: 54px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(76, 201, 240, 0.45));
  border-radius: var(--radius-sm);
}

/* Navbar tagline — sits between logo and nav links */
.navbar-tagline {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  font-weight: 600;
  color: var(--color-teal);
  letter-spacing: 0.4px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.90;
}

/* Primary nav links */
.navbar-nav {
  display: flex;
  align-items: center;
}

.navbar-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-base);
  font-weight: 400;
  padding: 0 10px;
  transition: color var(--t-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active { color: var(--color-teal); }

.navbar-nav .sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: var(--text-base);
  user-select: none;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-base);
  font-weight: 400;
  padding: 0 10px;
  height: 42px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--t-fast);
  white-space: nowrap;
}

.nav-dropdown-toggle:hover  { color: var(--color-teal); }
.nav-dropdown-toggle.active { color: var(--color-white); }

.nav-dropdown-toggle .chevron {
  font-size: var(--text-xs);
  display: inline-block;
  transition: transform 0.25s;
}

.nav-dropdown:hover .chevron,
.nav-dropdown.open  .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-navy);
  border-top: 2px solid var(--color-teal);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open  .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-base);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}

.nav-dropdown-menu a:last-child { border-bottom: none; }

.nav-dropdown-menu a:hover {
  background: rgba(76, 201, 240, 0.12);
  color: var(--color-teal);
}

.nav-dropdown-menu a i {
  width: 14px;
  margin-right: 6px;
  color: var(--color-teal);
  font-size: var(--text-xs);
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s;
}




/* -----------------------------------------------------------------------------
   6. BUTTONS
----------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  white-space: nowrap;
}

.btn-teal {
  background: var(--color-teal);
  color: var(--color-white);
}

.btn-teal:hover {
  background: var(--color-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 184, 232, 0.35);
}


/* -----------------------------------------------------------------------------
   7. FOOTER
----------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
}

.footer-top {
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top .container {
  display: flex;
  align-items: flex-start;
}

/* Left: wordmark + contact */
.footer-brand {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-wordmark {
  display: flex;
  align-items: center;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
  /* invert to white so it shows on the dark navy footer */
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-teal);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 6px 0 0;
  opacity: 0.90;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.70);
  font-size: var(--text-base);
  line-height: 1.45;
  white-space: nowrap;
}

.footer-contact-list li i {
  color: var(--color-teal);
  font-size: var(--text-xs);
  margin-top: 1px;
  flex-shrink: 0;
}

.footer-contact-list a {
  color: rgba(255, 255, 255, 0.70);
  transition: color var(--t-fast);
}

.footer-contact-list a:hover { color: #fff; }

/* Right: nav columns */
.footer-nav-columns {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  padding-left: 32px;
  padding-top: 10px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.footer-nav-col a {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.70);
  white-space: nowrap;
  transition: color var(--t-fast);
}

.footer-nav-col a:hover         { color: #fff; }
.footer-nav-col a.footer-active { color: var(--color-teal); font-weight: 700; }

/* Bottom bar */
.footer-bottom { padding: 6px 0; }

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-legal {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-sm);
}

/* Footer social icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none;
  overflow: hidden;
  line-height: 1;
  flex-shrink: 0;
}

.footer-social a.x-icon {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.footer-social a:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

/* Utility link */
.learn-more {
  color: var(--color-teal);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 11px;
  transition: gap var(--t-fast);
}

.learn-more:hover { gap: 8px; }


/* -----------------------------------------------------------------------------
   8. RESPONSIVE
----------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .navbar-tagline { display: none; }

  .navbar-nav {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1099;
  }

  .navbar-nav.open { display: flex; }

  .navbar-nav a {
    padding: 8px 18px;
    width: 100%;
  }

  .navbar-nav .sep { display: none; }
}

/* -----------------------------------------------------------------------------
   9. REDUCED MOTION — respect user accessibility preference
----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


@media (max-width: 768px) {
  .container { padding-inline: 20px; }

  /* Mobile dropdown */
  .nav-dropdown {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav-dropdown-toggle {
    padding: 8px 18px;
    height: auto;
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    border-left: 3px solid var(--color-teal);
    margin-left: 24px;
    min-width: unset;
    width: calc(100% - 24px);
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open  .nav-dropdown-menu { display: block; }

  /* Footer */
  .footer-top .container {
    flex-direction: column;
    gap: 28px;
  }

  .footer-brand { flex: unset; }

  .footer-nav-columns {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 28px;
  }

  .footer-bottom .container {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* -----------------------------------------------------------------------------
   10. PAGE TRANSITIONS
----------------------------------------------------------------------------- */

/* Page fade-in on load */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

body {
  animation: pageFadeIn 0.45s ease forwards;
}

/* Page fade-out class added by JS before navigation */
body.page-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
   10b. HERO PHOTO TRANSITIONS
   Fade + gentle zoom on all split-hero photo panels
----------------------------------------------------------------------------- */

/* The keyframe: starts slightly zoomed + invisible, settles to normal */
@keyframes heroImgReveal {
  from {
    opacity: 0;
    transform: scale(1.06) translateZ(0);
  }
  to {
    opacity: 1;
    transform: scale(1) translateZ(0);
  }
}

/* Shimmer placeholder while image loads */
@keyframes heroShimmer {
  0%   { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}

/* Applied to all four split-hero bg containers */
.about-hero-bg,
.svc-hero-bg,
.fs-hero-bg,
.contact-hero-bg {
  background: linear-gradient(
    90deg,
    rgba(11,28,54,0.9) 0px,
    rgba(11,28,54,0.6) 200px,
    rgba(11,28,54,0.9) 400px
  );
  background-size: 800px 100%;
  animation: heroShimmer 1.4s ease infinite;
}

/* Once the img inside loads, it covers the shimmer */
.about-hero-bg img,
.svc-hero-bg img,
.fs-hero-bg img,
.contact-hero-bg img {
  animation: heroImgReveal 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  will-change: transform, opacity;
}

/* Stop shimmer once image is loaded (class added by JS) */
.about-hero-bg.hero-loaded,
.svc-hero-bg.hero-loaded,
.fs-hero-bg.hero-loaded,
.contact-hero-bg.hero-loaded {
  background: none;
  animation: none;
}


/* -----------------------------------------------------------------------------
   11. SCROLL-REVEAL
   Add .reveal to any element — JS uses IntersectionObserver to add .revealed
----------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
   12. HERO NAVY PANEL — SNOWFLAKE WATERMARK
   Subtle outline snowflake on the navy side of the split hero on all 4 inner pages.
   Lives on ::before of each overlay div so it stays clipped inside the navy panel
   and never bleeds into the photo side.
----------------------------------------------------------------------------- */
/* Snowflake watermark — disabled for now */


/* -----------------------------------------------------------------------------
   12. NAVBAR SCROLL EFFECT
   .navbar--scrolled added by JS when user scrolls down
----------------------------------------------------------------------------- */

/* =============================================================================
   13. KINETIC ANIMATIONS
   Hero text stagger, scroll reveals, stat counters, split slide-ins.
============================================================================= */

/* ── Hero text entrance — shared keyframes ── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroScaleUp {
  from { opacity: 0; transform: scale(0.97) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Base — all hero-anim children start invisible */
.hero-anim > * { opacity: 0; }

/* Staggered entrance for eyebrow → h1 → sub → cta */
.hero-anim > *:nth-child(1) { animation: heroFadeUp  0.65s cubic-bezier(0.22,0.61,0.36,1) 0.15s forwards; }
.hero-anim > *:nth-child(2) { animation: heroScaleUp 0.70s cubic-bezier(0.22,0.61,0.36,1) 0.30s forwards; }
.hero-anim > *:nth-child(3) { animation: heroFadeUp  0.60s cubic-bezier(0.22,0.61,0.36,1) 0.48s forwards; }
.hero-anim > *:nth-child(4) { animation: heroFadeUp  0.55s cubic-bezier(0.22,0.61,0.36,1) 0.62s forwards; }
.hero-anim > *:nth-child(5) { animation: heroFadeUp  0.55s cubic-bezier(0.22,0.61,0.36,1) 0.74s forwards; }

/* Home hero — each heading span animates individually */
.hero-heading-white { display: block; opacity: 0; animation: heroFadeUp 0.65s cubic-bezier(0.22,0.61,0.36,1) 0.20s forwards; }
.hero-heading-teal  { display: block; opacity: 0; animation: heroFadeUp 0.65s cubic-bezier(0.22,0.61,0.36,1) 0.38s forwards; }
.hero-body-anim     { opacity: 0; animation: heroFadeUp 0.60s cubic-bezier(0.22,0.61,0.36,1) 0.55s forwards; }
.hero-cta-anim      { opacity: 0; animation: heroFadeUp 0.55s cubic-bezier(0.22,0.61,0.36,1) 0.72s forwards; }
.hero-badge-anim    { opacity: 0; animation: heroFadeIn 0.60s ease 0.90s forwards; }

/* ── Scroll reveal — enhanced stagger delays ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.60s ease, transform 0.60s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.55s; }
.reveal-stagger.revealed > * { opacity: 1; transform: translateY(0); }

/* ── Slide in from left / right for split sections ── */
.reveal-left  { opacity: 0; transform: translateX(-36px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal-right { opacity: 0; transform: translateX(36px);  transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal-left.revealed, .reveal-right.revealed { opacity: 1; transform: translateX(0); }

/* ── Stat pop on counter completion ── */
@keyframes statPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.stat-pop { animation: statPop 0.35s ease forwards; }

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-anim > *, .hero-heading-white, .hero-heading-teal,
  .hero-body-anim, .hero-cta-anim, .hero-badge-anim,
  .reveal, .reveal-left, .reveal-right, .reveal-stagger > * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}