/* ═══════════════════════════════════════════════════════════
   APOPKA MARINE — v5
   Sunny Florida family boat dealer · Since 1972
   
   Palette: Apopka Red × Apopka Blue × Ocean Deep × Wave Foam
   Type:    Bebas Neue (display) × Outfit (body)
   Motion:  v2 kinetic layer — scroll progress, particles,
            staggered reveals, shimmer buttons, pulsing marks
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Brand colors (from Feb build) */
  --apopka-red: #E31E24;
  --apopka-red-2: #c41820;
  --apopka-blue: #0047AB;
  --ocean-deep: #002855;
  --ocean-blue: #0066CC;
  --wave-foam: #7FDBFF;
  --sunset: #FF851B;
  --teal: #39CCCC;
  
  /* Neutrals */
  --sand: #FAFAFA;
  --sand-2: #F3F1EC;
  --paper: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #2d3142;
  --ink-muted: #525769;
  --line: rgba(0, 40, 85, 0.08);
  --line-strong: rgba(0, 40, 85, 0.16);
  
  /* Typography */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  
  /* Shadow system */
  --shadow-sm: 0 4px 12px rgba(0, 40, 85, 0.06);
  --shadow-md: 0 12px 32px rgba(0, 40, 85, 0.12);
  --shadow-lg: 0 24px 48px -8px rgba(0, 40, 85, 0.18);
  --shadow-red: 0 8px 24px rgba(227, 30, 36, 0.32);
  --shadow-red-hover: 0 16px 32px rgba(227, 30, 36, 0.42);
  --shadow-blue: 0 8px 24px rgba(0, 71, 171, 0.28);
  
  /* Motion curves */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

img { max-width: 100%; height: auto; display: block; }

/* Default SVG icon sizing - prevents unconstrained SVGs from filling containers */
svg { width: 1em; height: 1em; flex-shrink: 0; }
.btn svg { width: 16px; height: 16px; }
.card .link svg { width: 14px; height: 14px; }
.kicker svg { width: 14px; height: 14px; }


/* ═══ PARALLEL-RUN BANNER ══════════════════════════════════════ */
.parallel-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(90deg, var(--ocean-deep) 0%, var(--apopka-blue) 100%);
  color: white;
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
}
.parallel-banner strong {
  color: var(--wave-foam);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}
.parallel-banner a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(127, 219, 255, 0.5);
}
.parallel-banner a:hover {
  text-decoration-color: var(--wave-foam);
}
.parallel-banner button {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0 8px;
  opacity: 0.65;
  line-height: 1;
  transition: opacity 0.2s;
}
.parallel-banner button:hover { opacity: 1; }


/* ═══ SCROLL PROGRESS BAR (v2 motion) ═════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 36px; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--apopka-red) 0%, var(--sunset) 100%);
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(227, 30, 36, 0.6);
}
body:not(:has(.parallel-banner)) .scroll-progress { top: 0; }


/* ═══ NAVIGATION ═══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 36px; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}
body:not(:has(.parallel-banner)) .nav { top: 0; }
.nav.scrolled {
  padding: 10px 40px;
  box-shadow: 0 4px 24px rgba(0, 40, 85, 0.08);
  border-bottom-color: var(--line);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand img {
  height: 52px;
  width: auto;
  transition: height 0.4s var(--ease);
}
.nav.scrolled .nav-brand img { height: 42px; }
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}
.nav-brand-text strong {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2.5px;
  color: var(--ocean-deep);
}
.nav-brand-text small {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--apopka-red);
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--apopka-red);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--apopka-red); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--apopka-red); }
.nav-cta {
  background: var(--apopka-red);
  color: white !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-red);
  transition: all 0.3s var(--ease);
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--apopka-red-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-hover);
}
.nav-burger {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-burger span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
}


/* ═══ TYPE & BASE ══════════════════════════════════════════════ */
body { font-size: 18px; line-height: 1.7; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 1.5px;
  line-height: 1.05;
  color: var(--ocean-deep);
}
h1 { font-size: clamp(56px, 8vw, 112px); }
h2 { font-size: clamp(42px, 5vw, 72px); }
h3 { font-size: clamp(28px, 2.8vw, 36px); }
h4 { font-size: 22px; letter-spacing: 2.5px; }

p { font-size: 18px; line-height: 1.75; }
.lead { font-size: 22px; line-height: 1.6; color: var(--ink-muted); font-weight: 400; }

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--apopka-red);
  margin-bottom: 16px;
}
.kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--apopka-red);
  vertical-align: middle;
  margin-right: 10px;
}

.section {
  padding: 100px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-narrow { max-width: 980px; }
.section-header {
  margin-bottom: 60px;
  max-width: 720px;
}
.section-header.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-header.center .kicker::before { display: none; }


/* ═══ BUTTONS (Apopka red + v2 shimmer) ══════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--apopka-red);
  color: white;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  background: var(--apopka-red-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-hover);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover::before { transform: translateX(100%); }

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--apopka-blue);
  border: 2px solid var(--apopka-blue);
}
.btn-outline:hover {
  background: var(--apopka-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn svg { transition: transform 0.3s; }
.btn:hover svg { transform: translateX(3px); }


/* ═══ REVEAL ANIMATIONS (v2 IntersectionObserver) ════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
.reveal[data-delay="6"] { transition-delay: 0.48s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ═══ CARDS ═══════════════════════════════════════════════════ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--apopka-red), var(--sunset));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.card:hover::before { transform: scaleX(1); }

/* SVG icon container */
.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 71, 171, 0.08), rgba(0, 40, 85, 0.12));
  border-radius: 14px;
  color: var(--apopka-blue);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--apopka-red), var(--apopka-red-2));
  opacity: 0;
  transition: opacity 0.3s;
}
.card-icon svg {
  width: 28px !important;
  height: 28px !important;
  position: relative;
  z-index: 1;
  transition: all 0.4s var(--ease);
}
.card:hover .card-icon::before { opacity: 1; }
.card:hover .card-icon { transform: scale(1.06) rotate(-4deg); }
.card:hover .card-icon svg { color: white; stroke: white; }

.card h3 {
  font-size: 28px;
  margin-bottom: 14px;
  color: var(--ocean-deep);
}
.card p {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.7;
}
.card .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--apopka-red);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: gap 0.2s;
  letter-spacing: 0.5px;
}
.card .link:hover { gap: 10px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.card-grid.tight { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card-grid.wide { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 32px; }


/* ═══ FOOTER ═══════════════════════════════════════════════════ */
.footer {
  background: linear-gradient(180deg, var(--ocean-deep) 0%, #001830 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 80px 40px 40px;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--apopka-red), var(--apopka-blue), var(--wave-foam));
}
.footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover { color: var(--wave-foam); }
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 340px;
}
.footer-brand img {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.footer-brand-tag {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--wave-foam);
  letter-spacing: 2.5px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}
.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.footer-socials a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}
.footer-socials a:hover {
  background: var(--apopka-red);
  color: white;
  border-color: var(--apopka-red);
  transform: translateY(-2px);
}
.footer h4 {
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--wave-foam);
  margin-bottom: 18px;
}
.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer ul a { font-size: 14px; }
.footer-contact {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.footer-copy {
  max-width: 1400px;
  margin: 32px auto 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy a { color: var(--wave-foam); }

.staff-portal-link {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: rgba(127, 219, 255, 0.3);
  transition: all 0.3s;
}
.staff-portal-link:hover {
  background: var(--apopka-red);
  color: white;
}


/* ═══ PAGE HERO (interior pages) ══════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--apopka-blue) 100%);
  color: white;
  padding: 200px 40px 100px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 20% 30%, rgba(127, 219, 255, 0.15), transparent),
    radial-gradient(ellipse 600px 400px at 80% 70%, rgba(227, 30, 36, 0.12), transparent);
}
.page-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-hero .kicker {
  color: var(--wave-foam);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}
.page-hero .kicker::before { background: var(--wave-foam); }
.page-hero h1 {
  color: white;
  font-size: clamp(56px, 8vw, 104px);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.4s forwards;
}
.page-hero h1 .accent {
  color: var(--wave-foam);
  position: relative;
}
.page-hero h1 .accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: 10px;
  width: 100%; height: 6px;
  background: var(--apopka-red);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineGrow 0.8s var(--ease) 1s forwards;
}
@keyframes underlineGrow {
  to { transform: scaleX(1); }
}
.page-hero-sub {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.6s forwards;
}


/* ═══ UTILITIES ════════════════════════════════════════════════ */
.bg-sand { background: var(--sand); }
.bg-sand-2 { background: var(--sand-2); }
.bg-paper { background: var(--paper); }
.bg-deep { background: var(--ocean-deep); color: white; }
.bg-deep h2, .bg-deep h3 { color: white; }
.bg-deep .kicker { color: var(--wave-foam); }
.bg-deep .kicker::before { background: var(--wave-foam); }
.bg-deep p { color: rgba(255, 255, 255, 0.8); }

/* Story highlight pill (used on home + about) */
.story-highlight {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(227, 30, 36, 0.08);
  border: 1px solid rgba(227, 30, 36, 0.25);
  padding: 14px 22px;
  border-radius: 999px;
}
.story-highlight svg {
  width: 20px !important;
  height: 20px !important;
  color: var(--apopka-red);
  stroke: var(--apopka-red);
}
.story-highlight span {
  font-size: 14px;
  font-weight: 600;
  color: var(--apopka-red);
  letter-spacing: 1px;
}


/* ═══ CTA BAND ═════════════════════════════════════════════════ */
.cta-band {
  background: linear-gradient(135deg, var(--apopka-blue) 0%, var(--ocean-deep) 100%);
  color: white;
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%; left: -10%;
  width: 120%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(227, 30, 36, 0.18) 0%, transparent 55%);
  animation: ctaPulse 10s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.12); }
}
.cta-band-inner {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
}
.cta-band h2 {
  color: white;
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 16px;
}
.cta-band p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}


/* ═══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding: 10px 20px; }
  .nav-brand img { height: 42px; }
  .nav.scrolled .nav-brand img { height: 36px; }
  .nav-brand-text strong { font-size: 18px; letter-spacing: 2px; }
  .nav-brand-text small { font-size: 9px; }
  
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    padding: 28px;
    gap: 22px;
    background: white;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
    height: calc(100vh - 72px);
    align-items: flex-start;
  }
  body:has(.parallel-banner) .nav-links { top: calc(72px + 36px); }
  .nav-links.open { transform: translateY(0); }
  .nav-burger { display: flex; }
  
  .section { padding: 60px 20px; }
  .page-hero { padding: 160px 20px 70px; }
  
  .footer { padding: 60px 20px 30px; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  
  .parallel-banner { font-size: 11px; padding: 0 12px; }
}
