/* ============================================
   Tortuga Pools — Design Tokens
   ============================================ */
:root {
  --navy-deep: #0e2a43;
  --navy-mid: #12354f;
  --navy-line: #22496a;
  --teal: #1f7a93;
  --teal-bright: #3fb8d6;
  --sand: #f3ecdc;
  --sand-deep: #e8dcc0;
  --sun: #e2a33b;
  --white: #ffffff;
  --ink: #16242e;
  --ink-soft: #45566316;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 14px;
  --shadow-lift: 0 20px 50px -20px rgba(14, 42, 67, 0.35);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, figure { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-bright);
  color: var(--navy-deep);
  padding: 12px 18px;
  z-index: 999;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Layout helpers
   ============================================ */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-deep { background: var(--sand-deep); }
.section-navy {
  background: var(--navy-deep);
  color: var(--sand);
  position: relative;
}
.section-head { max-width: 620px; margin-bottom: 48px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  font-weight: 600;
}
.eyebrow-light { color: var(--teal-bright); }

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
}
.h2-light { color: var(--white); }

.body-lg {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}
.section-navy .body-lg { color: #d9e6ec; }

.chem-copy p:not(.body-lg),
.about-copy p:not(.body-lg) {
  margin-top: 16px;
  line-height: 1.65;
  color: #3a4a56;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 15px 26px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-icon { width: 18px; height: 18px; color: currentColor; }
.btn-primary {
  background: var(--sun);
  color: var(--navy-deep);
  box-shadow: 0 12px 30px -12px rgba(226, 163, 59, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(226, 163, 59, 0.8); }
.btn-ghost {
  background: transparent;
  color: var(--navy-deep);
  border: 1.5px solid var(--navy-deep);
}
.btn-ghost:hover { background: var(--navy-deep); color: var(--sand); }
.btn-ghost-light {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost-light:hover { background: var(--white); color: var(--navy-deep); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(14, 42, 67, 0.08);
}
/* Frosted background lives on a pseudo-element, not .site-header itself —
   backdrop-filter on the header would create a CSS containing block for any
   position:fixed descendant (the mobile nav panel), scoping it to the header's
   own small box instead of the full viewport and breaking the mobile menu. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(243, 236, 220, 0.92);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { flex-shrink: 0; }
.brand-logo { height: 46px; width: auto; mix-blend-mode: multiply; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}
.main-nav a { color: var(--navy-deep); opacity: 0.82; transition: opacity 0.2s; }
.main-nav a:hover { opacity: 1; }
.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--navy-deep); }

.header-call { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.header-call-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.header-call-number { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 24px;
  height: 2.4px;
  background: var(--navy-deep);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.4px) rotate(-45deg); }

/* ============================================
   Hero + waterline signature
   ============================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-media { position: absolute; inset: 0; }
.hero-video, .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video { opacity: 0; transition: opacity 0.8s ease; }
.hero-poster { transition: opacity 0.8s ease; }
.hero-video.is-active { opacity: 1; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,42,67,0.55) 0%, rgba(14,42,67,0.35) 35%, rgba(14,42,67,0.85) 100%);
}
.hero-inner { position: relative; padding-bottom: 110px; padding-top: 160px; }
.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.hero-sub {
  max-width: 540px;
  font-size: 1.18rem;
  line-height: 1.55;
  margin-top: 22px;
  color: #e4ecef;
}

.waterline { position: relative; line-height: 0; margin-top: -2px; z-index: 2; }
.waterline svg { width: 100%; height: 46px; display: block; }
.waterline .wave { fill: var(--sand); }
.waterline .wave-back { fill: var(--sand-deep); opacity: 0.9; }
.waterline-up svg { transform: scaleY(-1); }
.waterline-up .wave, .waterline-up .wave-back { fill: var(--navy-deep); }
.waterline-up .wave-back { fill: var(--navy-mid); }

@keyframes driftWave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-120px); }
}
.wave-front { animation: driftWave 14s linear infinite alternate; }

/* ============================================
   Trust bar
   ============================================ */
.trust-bar {
  background: var(--navy-deep);
  padding: 20px 0;
  border-bottom: 4px solid var(--teal-bright);
}
.trust-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 40px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #cfe1e8;
  font-weight: 500;
}
.trust-code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--navy-deep);
  background: var(--teal-bright);
  padding: 4px 8px;
  border-radius: 5px;
  letter-spacing: 0.03em;
}

/* ============================================
   About
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.ticket-card {
  position: absolute;
  bottom: -32px;
  left: -28px;
  background: var(--white);
  border-radius: 10px;
  padding: 22px 26px;
  box-shadow: 0 18px 40px -16px rgba(14,42,67,0.3);
  border-left: 4px solid var(--sun);
  max-width: 260px;
}
.ticket-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
  font-weight: 600;
}
.ticket-list li {
  font-size: 0.88rem;
  padding: 5px 0;
  color: var(--ink);
  position: relative;
  padding-left: 18px;
}
.ticket-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 7px;
  height: 7px;
  background: var(--teal-bright);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ============================================
   Services — hexagon icon badges
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(14,42,67,0.08);
  border: 1px solid rgba(14,42,67,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--sand-deep);
  padding: 34px 26px;
  transition: background 0.25s var(--ease);
}
.service-card:hover { background: var(--sand); }
.service-icon {
  width: 56px;
  height: 56px;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0% 50%);
  background: var(--navy-deep);
  color: var(--teal-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 8px;
  line-height: 1.25;
}
.service-card p { font-size: 0.92rem; line-height: 1.5; color: #4a5964; }

/* ============================================
   Gallery / before-after slider
   ============================================ */
.slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.slider-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}
.slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.slider-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
}
.slider-clip .slider-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}
.slider-handle-grip {
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-deep);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.slider-tag {
  position: absolute;
  bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(14,42,67,0.75);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
}
.slider-tag-before { left: 18px; }
.slider-tag-after { right: 18px; }
.slider-caption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-bright);
  padding: 16px 4px 0;
}

.ba-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.ba-pair {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--navy-mid);
}
.ba-pair img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; }
.ba-pair figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--teal-bright);
  padding: 12px 16px;
}

/* ============================================
   Chemistry
   ============================================ */
.chem-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.readout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  background: var(--navy-deep);
  border-radius: 10px;
  padding: 22px 26px;
}
.readout > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.readout dt { font-size: 0.82rem; color: #a9c2cd; }
.readout dd { margin: 0; font-family: var(--font-mono); font-weight: 600; color: var(--teal-bright); font-size: 0.9rem; }

.chem-media { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chem-media figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lift); }
.chem-media img { aspect-ratio: 3/4; object-fit: cover; }
.chem-media figcaption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-align: center;
  padding: 10px;
  background: var(--white);
  color: var(--navy-deep);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials { position: relative; overflow: hidden; }
.testimonials-media { position: absolute; inset: 0; }
.testimonials-media img { width: 100%; height: 100%; object-fit: cover; }
.testimonials-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,42,67,0.88), rgba(14,42,67,0.94)); }
.testimonials .wrap { position: relative; }
.review-invite {
  max-width: 560px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(6px);
}
.review-invite p { color: #dbe7ec; line-height: 1.6; margin-bottom: 14px; }
.review-invite .btn { margin-top: 10px; }

/* ============================================
   Shop teaser
   ============================================ */
.shop-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow-lift);
}
.shop-icon {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--sand-deep);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-icon svg { width: 40px; height: 40px; }

/* ============================================
   Service area pills
   ============================================ */
.area-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.area-pills li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy-deep);
  background: var(--white);
  border: 1.5px solid var(--navy-deep);
  padding: 12px 24px;
  border-radius: 999px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer { background: var(--navy-deep); color: var(--sand); }
.footer-inner { padding-bottom: 56px; }
.footer-cta { padding-bottom: 64px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 56px; }
.footer-sub { max-width: 480px; margin-top: 14px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-logo-card {
  display: inline-block;
  background: var(--white);
  border-radius: 12px;
  padding: 14px 18px;
}
.footer-logo-card img { height: 40px; width: auto; }
.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 10px;
}
.footer-col p { color: #c7d7de; line-height: 1.7; font-size: 0.94rem; }
.footer-col a:hover { color: var(--teal-bright); }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: #8fa5b0;
}

/* ============================================
   Scroll reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .chem-grid { grid-template-columns: 1fr; gap: 40px; }
  .ticket-card { position: static; margin-top: -40px; margin-left: 20px; margin-right: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 12px; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--sand);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 22px;
    font-size: 1.1rem;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .header-call { display: none; }
  .nav-cta { margin-top: 8px; }

  .hero { min-height: 100vh; }
  .hero-inner { padding-top: 130px; padding-bottom: 80px; }

  .services-grid { grid-template-columns: 1fr; }
  .ba-pair-grid { grid-template-columns: 1fr; }
  .chem-media { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .shop-inner { flex-direction: column; text-align: center; }
  .section { padding: 72px 0; }
}
