/*
 * TACKLE BABA CUSTOM DESIGN SYSTEM (Figma Home Page v2 matching)
 * Brand: Forest Pine Green (#16302C), Warm Sand Cream (#F8F4EA), Rich Gold (#CFA14A)
 * Typography: Fraunces (Headings/Italic), DM Sans (Body), DM Mono (Monospace metadata)
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:ital,wght@0,400;1,400&display=swap');

:root {
  --color-bg-dark: #012b2e;      /* Deep Brand Forest Teal */
  --color-bg-light: #F8F4EA;     /* Soft Warm Sand */
  --color-cream: #F8F4EA;
  
  --color-teal: #027F80;         /* Tackle Baba Brand Teal */
  --color-teal-dark: #014c4f;    /* Medium Dark Brand Teal */
  --color-gold: #ffb703;         /* Tackle Baba Brand Gold */
  --color-stone: rgba(2, 127, 128, 0.65);
  
  --font-headings: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  
  --border-color-light: rgba(2, 127, 128, 0.08);
  --border-color-dark: rgba(248, 244, 234, 0.1);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-teal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

/* 1. GLOBAL LAYOUT AND CUSTOM ELEMENTS */

/* Grain Texture Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('grain-texture.png');
  opacity: 0.045;
  pointer-events: none;
  z-index: 9999;
}

/* Top Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold) 0%, #e8c46a 100%);
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* Trailing Custom Cursor (Desktop Only) */
@media (min-width: 1024px) {
  body {
    cursor: none;
  }
  a, button, select, input {
    cursor: none;
  }
  .custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(207, 161, 74, 0.75);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease-out, width 0.2s, height 0.2s;
  }
  .custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
  }
  /* Magnify Hover State */
  body.hover-interactive .custom-cursor {
    width: 60px;
    height: 60px;
    background-color: rgba(207, 161, 74, 0.05);
    border-color: var(--color-gold);
  }
}

/* Base Headings styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 span, h2 span, h3 span {
  font-family: var(--font-headings);
  font-style: italic;
  font-weight: 300;
}

/* 12-Column Layout Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* 2. NAVIGATION HEADER */
.mock-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 96px;
  z-index: 100;
  display: flex;
  align-items: center;
}

.mock-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo-text {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
}

.mock-nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.mock-nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(248, 244, 234, 0.75);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.mock-nav-links a:hover {
  color: var(--color-gold);
}

.header-btn-solid {
  background-color: var(--color-gold);
  color: var(--color-bg-dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 2px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.header-btn-solid:hover {
  transform: translateY(-2px);
  background-color: #e8c46a;
}

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  transition: transform 0.3s, opacity 0.3s;
}

/* 3. HERO SECTION */
.mock-hero {
  position: relative;
  height: 788px;
  background-color: var(--color-bg-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(22, 48, 44, 0.22) 0%, rgba(22, 48, 44, 0.1) 35%, rgba(22, 48, 44, 0.62) 75%, rgba(22, 48, 44, 0.92) 100%);
  z-index: 2;
}

.hero-editorial-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-left-col {
  max-width: 780px;
  text-align: left;
}

.hero-scroll-indicator {
  position: absolute;
  left: 24px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.hero-scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(248, 244, 234, 0.4);
}

.hero-scroll-indicator .scroll-arrow-line {
  position: relative;
  width: 40px;
  height: 12px;
  overflow: hidden;
}

.hero-scroll-indicator svg {
  fill: rgba(248, 244, 234, 0.4);
}

/* 4. MARQUEE TICKER */
.marquee-ticker {
  background-color: var(--color-bg-dark);
  border-top: 1px solid var(--border-color-dark);
  border-bottom: 1px solid var(--border-color-dark);
  padding: 13px 0;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.marquee-inner {
  display: inline-block;
  animation: marquee 25s linear infinite;
  padding-left: 100%;
}

.marquee-inner span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  text-transform: uppercase;
  display: inline-block;
  margin-right: 48px;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* 5. SECTIONS GENERAL */
.tb-dark-section {
  background-color: var(--color-bg-dark);
  color: #ffffff;
  padding: 120px 0;
}

.tb-light-section {
  background-color: var(--color-bg-light);
  color: var(--color-teal);
  padding: 120px 0;
}

/* 6. DESTINATIONS STICKY SCROLL SECTION */
.destinations-scroll-track {
  position: relative;
  height: 400vh; /* Tracks scroll depth */
  background-color: var(--color-bg-dark);
}

.destinations-sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.destinations-horizontal-track {
  display: flex;
  width: 400vw;
  height: 100%;
  will-change: transform;
  transition: transform 0.15s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.dest-panel-sticky {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 72px;
  box-sizing: border-box;
}

.dest-panel-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.dest-panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(22, 48, 44, 0.88) 0%, rgba(22, 48, 44, 0.35) 55%, rgba(22, 48, 44, 0.12) 100%);
  z-index: 2;
}

.dest-panel-content {
  position: relative;
  z-index: 10;
  max-width: 520px;
  margin-left: 44px; /* matches x: 115px inside container */
}

/* Horizontal scroll indicators */
.carousel-dot-indicators {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(248, 244, 234, 0.25);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background-color: var(--color-gold);
  width: 8px;
  height: 8px;
}

/* 7. OTHER COMPONENTS STYLING */

/* Species Specimen Card */
.species-specimen-card {
  background-color: #ffffff;
  padding: 44px 36px;
  border-radius: 4px;
  border: 1px solid var(--border-color-light);
  box-shadow: 0 4px 20px rgba(22, 48, 44, 0.015);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.species-specimen-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(22, 48, 44, 0.04);
}

/* Standard divider */
.thin-divider-teal {
  border: none;
  border-top: 1px solid rgba(22, 48, 44, 0.1);
  margin: 24px 0;
}

.thin-divider-cream {
  border: none;
  border-top: 1px solid rgba(248, 244, 234, 0.12);
  margin: 24px 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .grid-container {
    padding: 0 32px;
  }
  .dest-panel-sticky {
    padding: 0 48px;
  }
  .carousel-dot-indicators {
    right: 48px;
  }
}

/* Responsive Grid Utilities */
.tb-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(248, 244, 234, 0.1);
  border-top: 1px solid rgba(248, 244, 234, 0.1);
  margin-top: 20px;
}

/* Founder Video Cards Styles */
.founder-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(22, 48, 44, 0.06);
  border: 1px solid rgba(22, 48, 44, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.founder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(22, 48, 44, 0.1);
}

.founder-card-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  background: #000000;
  overflow: hidden;
}

.founder-card-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.founder-card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* Community Collage Grid Responsive styling */
.community-collage-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.community-collage-grid-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 991px) {
  .tb-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  body.nav-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
  .hero-bg-media {
    background-position: 85% center !important; /* Focuses the angler and bent rod on mobile */
  }
  .mock-nav-links {
    display: none;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 100%) !important; /* modal fills viewport below header */
    background-color: rgba(1, 43, 46, 0.98) !important; /* dark teal overlay */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 40px 24px !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(248, 244, 234, 0.08) !important;
    gap: 24px !important;
    z-index: 9999 !important;
    overflow-y: auto !important; /* scrollable links block if short viewports */
  }
  .mock-nav-links li {
    width: 100% !important;
    text-align: left !important;
  }
  .mock-nav-links li a {
    font-size: 1.1rem !important; /* slightly larger for premium modal look */
    letter-spacing: 0.12em !important;
    color: #ffffff !important;
    display: block !important;
    padding: 12px 0 !important;
  }
  .mock-nav-links li a:hover {
    color: var(--color-gold) !important;
  }
  
  /* Mobile Navigation layout corrections (prevent overlapping and text wrapping) */
  .mock-header {
    padding: 12px 0 !important;
  }
  .mock-nav {
    padding: 0 16px !important;
    display: flex !important;
    justify-content: flex-end !important; /* aligns grouped actions to the right */
    align-items: center !important;
  }
  .mock-nav .logo-text {
    order: 1 !important;
    margin-right: auto !important; /* pushes CTA and hamburger to the far right */
  }
  .mock-nav .logo-text img {
    height: 56px !important; /* Restore larger logo size */
  }
  .mock-nav > div {
    order: 2 !important; /* CTA button div */
    display: flex !important;
    align-items: center !important;
  }
  .mock-nav .header-btn-solid {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important; /* Hide text */
    border-radius: 4px !important;
  }
  .mock-nav .header-btn-solid::after {
    content: '→' !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--color-bg-dark) !important;
    line-height: 1 !important;
    display: block !important;
  }
  .mobile-nav-toggle {
    order: 3 !important; /* Hamburger on the far right */
    margin-right: 0 !important;
    margin-left: 16px !important; /* gap between CTA arrow button and hamburger */
    display: flex;
  }
  .mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
  }
  .mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0 !important;
  }
  .mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
  }
  
  /* Base Grid Override on Mobile */
  .grid-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 0 20px !important;
  }
  
  .grid-container > div {
    grid-column: span 1 !important;
  }
  
  /* Helper Grid Overrides */
  .tb-grid-2, .tb-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Philosophy Stats Grid stacking */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    background: transparent !important;
    border-top: none !important;
    margin-top: 10px !important;
  }
  
  .stats-grid > div {
    background-color: var(--color-teal-dark) !important;
    padding: 30px 24px !important;
    border-radius: 4px;
  }
  
  /* Experiences Section mobile padding and height adjustments */
  #section-experiences {
    padding: 80px 0 !important;
  }
  #section-experiences .grid-container > div[style*="height: 680px"] {
    height: 440px !important;
    padding: 30px 20px !important;
  }
  #section-experiences a[style*="justify-content: flex-end"] {
    justify-content: flex-start !important;
    padding-bottom: 0 !important;
  }
  
  /* Community Collage responsive layout */
  .community-collage-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .community-collage-grid > div[style*="height: 600px"] {
    height: 360px !important;
  }
  .community-collage-grid-sub {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .community-collage-grid-sub > div {
    height: 200px !important;
  }
  .community-collage-grid > div > div[style*="height: 288px"] {
    height: 220px !important;
  }
  
  /* Stories & Dispatches responsive scaling */
  #section-stories {
    padding: 80px 0 !important;
  }
  #section-stories .grid-container > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
  #section-stories .grid-container > div[style*="display: grid"] > div[style*="padding: 64px"] {
    padding: 32px 20px !important;
  }
  #section-stories .grid-container > div[style*="display: grid"] > div[style*="min-height: 400px"] {
    min-height: 250px !important;
  }

  /* Gear Section responsive layout gap fix */
  #section-gear div[style*="height: 360px"] {
    height: 200px !important; /* Shorter image header on mobile */
  }
  #section-gear .grid-container {
    padding-top: 220px !important; /* Clean 20px gap below the image */
  }

  /* Founder Section responsive video adjustment */
  #section-founder {
    padding: 80px 0 !important;
  }
  .founder-card-video-wrap {
    max-height: 440px !important;
  }
  .founder-card-body {
    padding: 24px 20px !important;
  }

  /* Special treatment for Destinations text overlay on mobile to prevent legibility issues without blocking the image */
  /* Special split-screen layout for Destinations on mobile to prevent text overlapping and focus issues */
  .dest-panel-sticky {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 0 !important;
    height: 100vh !important;
    background-color: #ffffff !important;
  }

  .dest-panel-bg {
    position: relative !important;
    height: 50vh !important; /* Top half is the image */
    width: 100% !important;
    background-position: center center !important;
  }

  #slide-0 .dest-panel-bg {
    background-position: 85% center !important; /* Slides background to focus the fish head */
  }

  .dest-panel-overlay {
    display: none !important; /* Hide dark overlay since text is on a white card block */
  }

  .dest-panel-content {
    height: 50vh !important; /* Bottom half is the content block */
    background: #ffffff !important; /* Crisp white background for maximum readability */
    padding: 32px 24px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    margin: 0 !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Make typography visible on white card background */
  .dest-panel-content h2 {
    color: var(--color-teal) !important;
    font-size: clamp(2rem, 5vw, 2.8rem) !important; /* Scale down heading slightly on mobile */
    margin: 0 0 16px 0 !important;
  }

  .dest-panel-content p {
    color: rgba(22, 48, 44, 0.8) !important; /* Dark teal text */
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin: 0 0 24px 0 !important;
  }

  .dest-panel-content a {
    color: var(--color-teal) !important;
    border-bottom: 2px solid var(--color-gold) !important;
    padding-bottom: 2px !important;
    text-decoration: none !important;
  }

  /* Coordinate details colors on mobile */
  .dest-panel-content span {
    color: rgba(22, 48, 44, 0.5) !important;
  }
  .dest-panel-content span[style*="color: var(--color-gold)"] {
    color: var(--color-gold) !important;
  }

  /* Header title and dots position adjustments on mobile viewport */
  .destinations-mobile-header {
    left: 20px !important;
    top: 24px !important;
  }
  .carousel-dot-indicators {
    right: 20px !important;
    top: 26px !important;
  }
  
  /* Footer responsive grid columns (Explore, Shop, Learn, About in 2x2 grid on mobile) */
  .mock-footer {
    padding: 48px 20px 24px 20px !important;
  }
  .mock-footer .grid-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 36px 20px !important;
  }
  .mock-footer .grid-container > div {
    grid-column: span 1 !important;
    padding-right: 0 !important;
  }
  /* The first branding block and the bottom copyright block span full 2 columns */
  .mock-footer .grid-container > div:first-child,
  .mock-footer .grid-container > div:last-child {
    grid-column: span 2 !important;
  }
  .mock-footer h4 {
    margin-bottom: 12px !important;
  }
}
