/* Three Buoys Master Design System - Lighter Chesapeake Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Core Colors - Crisp Lighter Chesapeake Palette */
  --tb-blue-main: #0284c7;       /* Lighter Chesapeake Sky Blue */
  --tb-blue-hero: #0369a1;       /* Coastal Water Blue */
  --tb-blue-dark: #0f172a;       /* Deep Navy Charcoal for Contrast */
  --tb-blue-light: #e0f2fe;      /* Light Blue Sand Accent */
  --tb-blue-tint: #f0f9ff;       /* Very Soft Blue Tint */
  --tb-teal-accent: #0d9488;     /* Tidal Teal */
  --tb-rust: #c24127;            /* Chesapeake Rust Accent */
  --tb-rust-hover: #a3331c;
  --tb-gold: #d4af37;            /* Nautical Brass / Star Gold */
  --tb-green: #15803d;           /* In-Stock Green */
  
  /* Neutral Light Palette */
  --tb-sand-bg: #f8fafc;
  --tb-sand-card: #ffffff;
  --tb-sand-alt: #f1f5f9;
  --tb-border-dark: #1e293b;
  --tb-border-subtle: #cbd5e1;
  --tb-text-main: #0f172a;
  --tb-text-muted: #475569;
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Outlines & Shadows */
  --shadow-retro: 3px 3px 0px rgba(30, 41, 59, 0.15);
  --shadow-retro-hover: 6px 6px 0px rgba(30, 41, 59, 0.25);
  --shadow-glow-blue: 0 0 25px rgba(2, 132, 199, 0.3);
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--tb-sand-bg);
  color: var(--tb-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Glassmorphism Header - Lighter Blue Theme */
.header-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--tb-border-dark);
}

.header-glass-blue {
  background: rgba(3, 105, 161, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn-rust {
  background-color: var(--tb-rust);
  color: #ffffff;
  border: 2px solid var(--tb-border-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 4px 0px var(--tb-border-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-rust:hover {
  background-color: var(--tb-rust-hover);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--tb-border-dark);
}

.btn-blue {
  background-color: var(--tb-blue-main);
  color: #ffffff;
  border: 2px solid var(--tb-border-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0px var(--tb-border-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-blue:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--tb-border-dark);
}

.btn-outline-dark {
  background-color: #ffffff;
  color: var(--tb-blue-dark);
  border: 2px solid var(--tb-border-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0px var(--tb-border-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline-dark:hover {
  background-color: var(--tb-blue-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--tb-border-dark);
}

.btn-blueprint {
  background-color: var(--tb-blue-light);
  color: var(--tb-blue-main);
  border: 2px solid var(--tb-blue-main);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-blueprint:hover {
  background-color: var(--tb-blue-main);
  color: #ffffff;
  box-shadow: var(--shadow-glow-blue);
}

/* Cards & Components */
.card-retro {
  background-color: #ffffff;
  border: 2px solid var(--tb-border-dark);
  box-shadow: 4px 4px 0px var(--tb-border-dark);
  transition: all 0.25s ease;
}

.card-retro:hover {
  transform: translateY(-3px);
  box-shadow: 7px 7px 0px var(--tb-border-dark);
}

.card-blueprint {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  border: 2px solid #38bdf8;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.card-blueprint::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.card-logbook {
  background-color: #ffffff;
  border: 2px solid var(--tb-border-dark);
  border-left: 6px solid var(--tb-blue-main);
  box-shadow: 4px 4px 0px rgba(30, 41, 59, 0.1);
}

.card-fieldguide {
  background: #ffffff;
  border: 2px solid var(--tb-border-dark);
  border-top: 6px solid var(--tb-teal-accent);
  box-shadow: 4px 4px 0px rgba(13, 148, 136, 0.2);
  transition: all 0.25s ease;
}

.card-fieldguide:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0px rgba(13, 148, 136, 0.3);
}

/* Badges & Ribbons */
.badge-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: var(--tb-blue-light);
  border: 1px solid var(--tb-blue-main);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tb-blue-main);
  text-transform: uppercase;
}

.badge-tech {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ribbon-wrapper {
  position: absolute;
  top: 12px;
  left: -2px;
  z-index: 10;
}

.ribbon {
  background-color: var(--tb-rust);
  color: white;
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--tb-border-dark);
  border-left: none;
  box-shadow: 2px 2px 0px rgba(30, 41, 59, 0.2);
}

.ribbon-fold {
  position: absolute;
  left: 0;
  bottom: -6px;
  border-top: 6px solid var(--tb-border-dark);
  border-left: 6px solid transparent;
  z-index: -1;
}

/* Mega Menu Styles */
nav {
  position: relative;
}

.mega-menu-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 99;
  pointer-events: none;
}

.nav-item-dropdown:hover .mega-menu-container,
.mega-menu-container:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Standard Dropdown Styles */
.nav-dropdown-item {
  position: relative;
}

.dropdown-subpanel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 99;
  pointer-events: none;
}

.dropdown-subpanel-wide {
  min-width: 660px;
}

@media (max-width: 768px) {
  .dropdown-subpanel-wide {
    min-width: 100%;
  }
}

.nav-dropdown-item:hover .dropdown-subpanel,
.dropdown-subpanel:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--tb-border-dark);
  background-color: white;
  cursor: pointer;
  position: relative;
  border-radius: 2px;
}

.custom-checkbox:checked {
  background-color: var(--tb-blue-main);
}

.custom-checkbox:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
}

/* Accordion Details */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* Animations */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 4s infinite ease-in-out;
}

/* Nav Item Hover Line */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--tb-rust);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Drawers */
#mobile-nav-drawer {
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-nav-drawer.open {
  transform: translateX(0);
}


/* Closed drawers must leave the tab order.
 *
 * Every drawer on this site is hidden by transform alone, which moves it out of
 * sight but leaves it focusable and in the accessibility tree. On all 180 pages
 * a keyboard user could tab off the header and land inside an invisible cart —
 * quantity steppers, then the Stripe and PayPal checkout buttons — with no
 * visual indication of where focus had gone.
 *
 * visibility:hidden removes an element from both the tab order and the a11y
 * tree. Delaying its transition until the slide-out has finished (and applying
 * it instantly on open) keeps the animation exactly as it was. The `inert`
 * attribute is toggled in JS as well, for browsers that predate this behaviour
 * and to cover programmatic focus() calls, which visibility does not block. */
#cart-drawer-panel,
#mobile-nav-drawer {
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
}

#cart-drawer-panel:not(.translate-x-full),
#mobile-nav-drawer.open {
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--tb-sand-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--tb-blue-main);
  border-radius: 4px;
}

/* Database-authored CMS page and article typography */
.cms-public-content {
  font-size: 1.05rem;
}

.cms-public-content > * + * {
  margin-top: 1.25rem;
}

.cms-public-content h2,
.cms-public-content h3,
.cms-public-content h4 {
  color: var(--tb-blue-dark);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.cms-public-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--tb-border-subtle);
}

.cms-public-content h3 { font-size: 1.5rem; }
.cms-public-content h4 { font-size: 1.2rem; }
.cms-public-content p { margin: 0 0 1.15rem; }
.cms-public-content ul,
.cms-public-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.cms-public-content li + li { margin-top: 0.45rem; }
.cms-public-content a { color: var(--tb-blue-main); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cms-public-content blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--tb-blue-tint); border-left: 5px solid var(--tb-blue-main); color: var(--tb-text-muted); }
.cms-public-content img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; border: 2px solid var(--tb-border-dark); }
.cms-public-content figure { margin: 1.75rem 0; }
.cms-public-content figcaption { margin-top: 0.55rem; color: var(--tb-text-muted); font-size: 0.85rem; text-align: center; }
.cms-public-content pre,
.cms-public-content code { font-family: var(--font-mono); }
.cms-public-content pre { overflow-x: auto; padding: 1rem; color: #e2e8f0; background: var(--tb-blue-dark); border-radius: 4px; }
.cms-public-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.cms-public-content th,
.cms-public-content td { padding: 0.75rem; border: 1px solid var(--tb-border-subtle); text-align: left; }
.cms-public-content th { background: var(--tb-blue-tint); color: var(--tb-blue-dark); }
