/* ============================================
   Keys2Reef — modern aquarium maintenance site
   Fixed coral reef background + scrolling panels
   ============================================ */

:root {
  /* Light theme (default) — deeper type for contrast on frosted glass */
  --ink: #08151f;
  --ink-soft: #1a3344;
  --ink-muted: #2c4558;
  --foam: #f7fbfc;
  --teal: #12b8c4;
  --teal-deep: #0a6b78;
  --teal-bright: #1a9aaa;
  --coral: #ff2d95;
  --coral-soft: #ff7ad4;
  --neon-purple: #b44dff;
  --sand: #f0e6d8;
  --line: rgba(12, 31, 46, 0.1);
  --line-light: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(8, 30, 45, 0.18);
  --shadow-soft: 0 8px 32px rgba(8, 30, 45, 0.1);

  /* Shared iOS frosted glass system (light) */
  --glass-bg: rgba(255, 255, 255, 0.36);
  --glass-bg-strong: rgba(255, 255, 255, 0.5);
  --glass-bg-soft: rgba(255, 255, 255, 0.26);
  --glass-border: rgba(255, 255, 255, 0.52);
  --glass-highlight: rgba(255, 255, 255, 0.62);
  --glass-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 12px 40px rgba(15, 35, 50, 0.12),
    0 2px 10px rgba(15, 35, 50, 0.06);
  --glass-shadow-lift:
    0 0 0 0.5px rgba(255, 255, 255, 0.45) inset,
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 16px 48px rgba(15, 35, 50, 0.16),
    0 4px 14px rgba(15, 35, 50, 0.08);
  --glass-blur: 40px;
  --glass-saturate: 1.75;

  --foam-soft: var(--glass-bg);
  --foam-glass: var(--glass-bg-strong);
  --panel-border: var(--glass-border);
  --panel-hero-from: rgba(255, 255, 255, 0.42);
  --panel-hero-to: rgba(255, 255, 255, 0.28);

  --nav-bg: var(--glass-bg);
  --nav-bg-scrolled: var(--glass-bg-strong);
  --nav-border: var(--glass-border);
  --nav-highlight: var(--glass-highlight);
  --nav-shadow: var(--glass-shadow);
  --nav-shadow-scrolled: var(--glass-shadow-lift);
  --nav-blur: var(--glass-blur);

  --card-bg: var(--glass-bg-soft);
  --card-bg-solid: var(--glass-bg-strong);
  --tag-bg: rgba(255, 255, 255, 0.28);
  --tag-border: rgba(255, 255, 255, 0.45);
  --hover-fill: rgba(255, 255, 255, 0.28);
  --footer-bg: var(--glass-bg);
  --footer-border: var(--glass-border);
  --input-bg: rgba(255, 255, 255, 0.32);
  --menu-bg: var(--glass-bg-strong);
  --menu-border: var(--glass-border);
  --carousel-btn: var(--glass-bg-strong);
  --carousel-dot: rgba(12, 31, 46, 0.18);
  --icon-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(18, 184, 196, 0.12));
  --overlay-strength: 1;
  --radius: 28px;
  --radius-sm: 18px;
  --nav-h: 72px;
  --gutter: clamp(1.5rem, 8vw, 4.5rem);
  --panel-max: 880px;
  --coral-scale: 1.18;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* Dark theme — deep glass over neon reef */
html[data-theme="dark"] {
  --ink: #e8f4f8;
  --ink-soft: #c5dce6;
  --ink-muted: #8aadb8;
  --foam: #0a1820;
  --teal: #2ef0ff;
  --teal-deep: #5ee8f5;
  --teal-bright: #7af5ff;
  --coral: #ff5aad;
  --coral-soft: #ff9ad0;
  --line: rgba(255, 255, 255, 0.12);
  --line-light: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.3);

  --glass-bg: rgba(18, 30, 42, 0.42);
  --glass-bg-strong: rgba(18, 30, 42, 0.58);
  --glass-bg-soft: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 14px 44px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.2);
  --glass-shadow-lift:
    0 0 0 0.5px rgba(255, 255, 255, 0.14) inset,
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 18px 52px rgba(0, 0, 0, 0.42),
    0 4px 16px rgba(0, 0, 0, 0.28);
  --glass-blur: 44px;
  --glass-saturate: 1.85;

  --foam-soft: var(--glass-bg);
  --foam-glass: var(--glass-bg-strong);
  --panel-border: var(--glass-border);
  --panel-hero-from: rgba(22, 36, 48, 0.5);
  --panel-hero-to: rgba(12, 24, 36, 0.42);

  --nav-bg: var(--glass-bg);
  --nav-bg-scrolled: var(--glass-bg-strong);
  --nav-border: var(--glass-border);
  --nav-highlight: var(--glass-highlight);
  --nav-shadow: var(--glass-shadow);
  --nav-shadow-scrolled: var(--glass-shadow-lift);
  --nav-blur: var(--glass-blur);

  --card-bg: var(--glass-bg-soft);
  --card-bg-solid: var(--glass-bg-strong);
  --tag-bg: rgba(255, 255, 255, 0.08);
  --tag-border: rgba(255, 255, 255, 0.14);
  --hover-fill: rgba(255, 255, 255, 0.1);
  --footer-bg: var(--glass-bg);
  --footer-border: var(--glass-border);
  --input-bg: rgba(255, 255, 255, 0.06);
  --menu-bg: var(--glass-bg-strong);
  --menu-border: var(--glass-border);
  --carousel-btn: var(--glass-bg-strong);
  --carousel-dot: rgba(255, 255, 255, 0.22);
  --icon-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(46, 240, 255, 0.12));
  --overlay-strength: 1.15;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #061820;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ----- Fixed neon reef layers ----- */
/* Back layer: full neon reef photo (behind content) */
.reef-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    #050818 url("assets/coral-neon-bg.jpg") center / cover no-repeat;
  transform: scale(1.04);
  pointer-events: none;
}

/* Soft darkening so white panels stay readable */
.reef-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(2, 8, 20, calc(0.15 * var(--overlay-strength))) 0%, transparent 70%),
    linear-gradient(180deg, rgba(2, 6, 18, calc(0.35 * var(--overlay-strength))) 0%, transparent 22%, transparent 70%, rgba(2, 6, 18, calc(0.45 * var(--overlay-strength))) 100%);
}

html[data-theme="dark"] .reef-overlay {
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(0, 4, 12, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0, 4, 12, 0.5) 0%, transparent 22%, transparent 70%, rgba(0, 4, 12, 0.55) 100%);
}

/*
  Foreground corals — ALWAYS in front of the scrolling body.
  Content appears to move inside the reef tunnel.
*/
.reef-fg {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.reef-fg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Larger = corals reach further onto the page */
  transform: scale(var(--coral-scale));
  /* Punchier neon so the frame reads clearly over content */
  filter:
    saturate(1.35)
    contrast(1.12)
    brightness(1.08)
    drop-shadow(0 0 18px rgba(255, 45, 149, 0.35))
    drop-shadow(0 0 32px rgba(46, 240, 255, 0.2));
}

/* Content between background reef and foreground coral frame */
main {
  position: relative;
  z-index: 2;
}

/* Footer sits above the coral frame so logo/links stay fully visible */
.site-footer {
  position: relative;
  z-index: 45;
}

/* Sticky nav sits above the coral frame so it stays usable */
.site-header .nav {
  position: relative;
  z-index: 1;
}

/* ----- Navigation (above coral frame so links stay clickable) ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem var(--gutter) 0;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  max-width: calc(var(--panel-max) + 2rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem 0.65rem 1.05rem;
  border-radius: 999px;
  isolation: isolate;
  transition:
    box-shadow 0.35s var(--ease),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

/* iPhone-style liquid / frosted glass pill */
.glass-nav {
  position: relative;
  /* Must stay visible so the mobile dropdown can paint outside the pill */
  overflow: visible;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur)) saturate(var(--glass-saturate)) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(var(--glass-saturate)) brightness(1.05);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
}

/* Soft specular highlight across the top (iOS material sheen) */
.glass-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--nav-highlight) 0%,
    rgba(255, 255, 255, 0.08) 28%,
    transparent 55%
  );
  opacity: 0.85;
  /* Clip sheen to pill without clipping the dropdown menu */
  clip-path: inset(0 round 999px);
}

/* Keep nav content above glass sheen */
.glass-nav > * {
  position: relative;
  z-index: 1;
}

.glass-nav .nav-actions {
  z-index: 5;
}

.glass-nav .nav-links {
  z-index: 6;
}

.glass-nav.is-scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--nav-shadow-scrolled);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  background: var(--hover-fill);
  color: var(--teal-deep);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
  width: 20px;
  height: 20px;
}

/* Light mode shows moon (switch to dark); dark shows sun (switch to light) */
html:not([data-theme="dark"]) .theme-toggle .icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  line-height: 0;
  transition: transform 0.2s var(--ease), filter 0.2s;
}

.logo-header {
  border-radius: 0;
}

.logo:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.45));
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Horizontal wordmark for header pill */
.logo-img-horizontal {
  width: auto;
  height: 60px;
  max-width: min(320px, 58vw);
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
  box-shadow: none;
  background: transparent;
}

.logo-img-sm {
  width: 56px;
  height: 56px;
}

.logo-img-lg {
  width: 72px;
  height: 72px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

@media (max-width: 720px) {
  .logo-img-horizontal {
    height: 48px;
    max-width: min(230px, 62vw);
  }
}

.logo-text {
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--teal-deep);
  background: var(--hover-fill);
}

.nav-cta {
  background: var(--teal) !important;
  color: #fff !important;
  margin-left: 0.35rem;
}

html[data-theme="dark"] .nav-cta {
  color: #041820 !important;
}

html[data-theme="dark"] .nav-cta:hover {
  color: #041820 !important;
}

.nav-cta:hover {
  background: var(--teal-deep) !important;
  color: white !important;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  padding: 6px;
  position: relative;
  overflow: visible;
  transition: background 0.2s, transform 0.2s;
}

.nav-fish-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  /* Match text color on light/dark glass */
  filter: brightness(0) saturate(100%);
  opacity: 0.9;
  transform-origin: 50% 50%;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
    filter 0.25s ease,
    opacity 0.2s ease;
}

html[data-theme="dark"] .nav-fish-icon {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Idle: gentle swim bob */
@keyframes fish-idle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-4deg); }
}

.nav-toggle:not([aria-expanded="true"]) .nav-fish-icon {
  animation: fish-idle 2.4s ease-in-out infinite;
}

/* Open: fish flips / swims into “close” pose */
.nav-toggle[aria-expanded="true"] .nav-fish-icon {
  animation: none;
  transform: scaleX(-1) rotate(-18deg) scale(1.08);
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(48%) sepia(72%) saturate(500%) hue-rotate(145deg);
}

html[data-theme="dark"] .nav-toggle[aria-expanded="true"] .nav-fish-icon {
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(145deg);
}

/* Click pop */
.nav-toggle.is-animating .nav-fish-icon {
  animation: fish-tap 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes fish-tap {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.2) rotate(12deg) translateX(3px); }
  70% { transform: scaleX(-1) scale(0.95) rotate(-22deg); }
  100% { transform: scaleX(-1) rotate(-18deg) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle:not([aria-expanded="true"]) .nav-fish-icon,
  .nav-toggle.is-animating .nav-fish-icon {
    animation: none;
  }
}

/* ----- Layout sections — body scrolls inside coral tunnel ----- */
.section {
  padding: 1.1rem var(--gutter);
}

.section:first-of-type {
  padding-top: 2rem;
}

.section-close {
  padding-bottom: 0.75rem;
}

/* Floating iOS glass panels */
.panel {
  position: relative;
  isolation: isolate;
  /* visible so badges/menus that poke out aren't clipped */
  overflow: visible;
  max-width: var(--panel-max);
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(1.04);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(1.04);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  animation: panel-in 0.8s var(--ease) both;
  width: 100%;
  color: var(--ink);
  transition: background 0.3s var(--ease), border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* Specular sheen (iOS material) */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    165deg,
    var(--glass-highlight) 0%,
    rgba(255, 255, 255, 0.06) 32%,
    transparent 58%
  );
  opacity: 0.9;
  clip-path: inset(0 round var(--radius));
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-hero {
  padding: clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
  background: linear-gradient(
    165deg,
    var(--panel-hero-from) 0%,
    var(--panel-hero-to) 100%
  );
}

/* Dark glass variant (steps / closing strip) — stays dark + light type */
.panel-dark {
  background: linear-gradient(
    160deg,
    rgba(8, 28, 38, 0.55) 0%,
    rgba(6, 20, 30, 0.62) 55%,
    rgba(8, 26, 36, 0.58) 100%
  );
  color: #f0f7fa;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 14px 44px rgba(0, 0, 0, 0.28);
}

.panel-dark::before {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 30%,
    transparent 55%
  );
}

.panel-dark h2,
.panel-dark h3,
.panel-dark p,
.panel-dark .section-sub {
  color: inherit;
}

.panel-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.panel-center h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
  color: #f0f7fa;
}

.panel-center p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.close-mark {
  margin-bottom: 0.75rem;
  line-height: 0;
  display: grid;
  place-items: center;
}

.close-icon {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  /* Light icon on dark glass panel */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Typography ----- */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.85rem;
}

/* Light mode: darker teal for readability on frosted glass */
html:not([data-theme="dark"]) .eyebrow {
  color: #06515c;
}

html[data-theme="dark"] .eyebrow {
  color: var(--teal);
}

/* Dark panels always keep soft coral eyebrows */
.panel-dark .eyebrow,
.section-head.light .eyebrow,
html:not([data-theme="dark"]) .panel-dark .eyebrow,
html[data-theme="dark"] .panel-dark .eyebrow {
  color: var(--coral-soft);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

h1 em {
  font-style: italic;
  color: var(--teal);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.panel-dark h3 {
  color: white;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
  font-weight: 500;
}

/* Light mode: slightly darker hero copy for glass readability */
html:not([data-theme="dark"]) .lead {
  color: #152f40;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.section-head.light {
  color: white;
}

.section-sub {
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.section-head.light .section-sub,
.panel-dark .section-sub {
  color: rgba(255, 255, 255, 0.65);
}

/* ----- Buttons & tags ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 110, 122, 0.3);
}

html[data-theme="dark"] .btn-primary {
  color: #041820;
  box-shadow: 0 8px 28px rgba(46, 240, 255, 0.22);
}

.btn-primary:hover {
  background: var(--teal-deep);
  box-shadow: 0 10px 28px rgba(13, 110, 122, 0.38);
}

.btn-ghost {
  background: var(--glass-bg-soft);
  color: var(--ink-soft);
  border-color: var(--glass-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
  background: var(--hover-fill);
}

.btn-outline {
  background: var(--glass-bg-soft);
  color: var(--teal-deep);
  border-color: var(--glass-border);
  width: 100%;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.btn-outline:hover {
  background: var(--hover-fill);
  border-color: var(--teal);
}

.btn-full {
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--teal-deep);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

/* ----- Services ----- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(28px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(28px) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s, background 0.3s;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(165deg, var(--glass-highlight) 0%, transparent 45%);
  opacity: 0.55;
  z-index: 0;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-lift);
  border-color: rgba(46, 240, 255, 0.35);
  background: var(--glass-bg);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--icon-bg);
  color: var(--teal);
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ----- Steps ----- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
}

.step-num {
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--teal-bright);
  line-height: 1;
  opacity: 0.9;
}

.step p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

/* ----- Plans ----- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  /* room for the “Most popular” badge above the card */
  padding-top: 0.85rem;
}

.plan-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(32px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(32px) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius-sm) + 4px);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.3s, border-color 0.3s;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(165deg, var(--glass-highlight) 0%, transparent 48%);
  opacity: 0.55;
  z-index: 0;
  clip-path: inset(0 round calc(var(--radius-sm) + 4px));
}

.plan-card > * {
  position: relative;
  z-index: 1;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-lift);
  background: var(--glass-bg);
}

.plan-featured {
  background: linear-gradient(
    165deg,
    rgba(10, 50, 58, 0.62) 0%,
    rgba(6, 32, 42, 0.7) 100%
  );
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 16px 44px rgba(0, 0, 0, 0.28);
}

.plan-featured::before {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(46, 240, 255, 0.06) 35%,
    transparent 60%
  );
  opacity: 0.9;
}

.plan-featured .plan-name,
.plan-featured .plan-price,
.plan-featured h3 {
  color: white;
}

.plan-featured .plan-desc,
.plan-featured .plan-features li {
  color: rgba(255, 255, 255, 0.72);
}

.plan-featured .plan-features li::before {
  color: var(--coral-soft);
}

.plan-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 45, 149, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(255, 45, 149, 0.3);
  line-height: 1.2;
}

.plan-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.plan-price {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.plan-price span {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.plan-featured .plan-price span {
  color: rgba(255, 255, 255, 0.55);
}

.plan-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  min-height: 2.6em;
}

.plan-features {
  flex: 1;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.plan-features li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 1.35rem;
  position: relative;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-bright);
  opacity: 0.7;
}

/* ----- About split ----- */
.panel-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.split-copy p {
  color: var(--ink-muted);
  margin-bottom: 1rem;
  max-width: 38ch;
}

.about-stats {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.about-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.about-stats strong {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--teal);
  letter-spacing: -0.02em;
  line-height: 1;
}

.about-stats span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.split-visual {
  min-height: 260px;
}

.visual-card {
  height: 100%;
  min-height: 280px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 70% 30%, rgba(46, 240, 255, 0.22), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 90, 173, 0.18), transparent 45%),
    linear-gradient(145deg, rgba(8, 28, 38, 0.55) 0%, rgba(10, 40, 50, 0.6) 100%);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.1) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 14px 40px rgba(0, 0, 0, 0.22);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  color: white;
}

.visual-orb {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  top: 20%;
  right: 15%;
  background: radial-gradient(circle, rgba(26, 154, 170, 0.5), transparent 70%);
  filter: blur(2px);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.visual-quote {
  font-family: var(--display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.35;
  position: relative;
  z-index: 1;
  margin-bottom: 0.75rem;
}

.visual-cite {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

/* ----- Contact ----- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  width: 100%;
  min-width: 0;
}

.contact-copy {
  min-width: 0;
}

.contact-copy .section-sub {
  margin-bottom: 1.75rem;
  max-width: 32ch;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-details a {
  color: var(--teal-deep);
  font-weight: 500;
  transition: color 0.2s;
}

.contact-details a:hover {
  color: var(--teal-bright);
}

.contact-form {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(32px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(32px) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--glass-shadow);
  transition: background 0.3s, box-shadow 0.3s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.contact-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(165deg, var(--glass-highlight) 0%, transparent 50%);
  opacity: 0.5;
  z-index: 0;
}

.contact-form > * {
  position: relative;
  z-index: 1;
}

/* Keep the tank dropdown above later form fields / submit button */
.contact-form > .field-select,
.contact-form > .field:has(.pill-select) {
  z-index: 8;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
  min-width: 0;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: var(--input-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
  outline: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ----- Custom pill dropdown (tank type) ----- */
.pill-select {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 1;
}

.pill-select.is-open {
  z-index: 30;
}

.pill-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  padding: 0.8rem 1.15rem 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--input-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pill-select-trigger:hover,
.pill-select.is-open .pill-select-trigger {
  border-color: rgba(46, 240, 255, 0.45);
  box-shadow:
    0 0 0 3px rgba(18, 184, 196, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.pill-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-select-trigger.is-placeholder .pill-select-value {
  color: var(--ink-muted);
}

.pill-select-chevron {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  transition: transform 0.22s var(--ease);
}

.pill-select.is-open .pill-select-chevron {
  transform: rotate(180deg);
  color: var(--teal-deep);
}

.pill-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 40;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  /* Solid so the form underneath never shows through */
  background: #ffffff;
  box-shadow:
    0 16px 40px rgba(8, 30, 45, 0.22),
    0 2px 8px rgba(8, 30, 45, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: min(240px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

html[data-theme="dark"] .pill-select-menu {
  background: #12202c;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.pill-select-menu[hidden] {
  display: none;
}

.pill-select-menu li {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.pill-select-menu li.is-placeholder {
  color: var(--ink-muted);
}

.pill-select-menu li:hover,
.pill-select-menu li:focus-visible {
  background: rgba(18, 184, 196, 0.14);
  color: var(--teal-deep);
  outline: none;
}

html[data-theme="dark"] .pill-select-menu li:hover,
html[data-theme="dark"] .pill-select-menu li:focus-visible {
  background: rgba(46, 240, 255, 0.12);
  color: #7af5ff;
}

.pill-select-menu li.is-selected:not(.is-placeholder) {
  background: rgba(18, 184, 196, 0.18);
  color: var(--teal-deep);
  font-weight: 600;
}

html[data-theme="dark"] .pill-select-menu li.is-selected:not(.is-placeholder) {
  background: rgba(46, 240, 255, 0.16);
  color: #7af5ff;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-muted);
  opacity: 0.85;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(46, 240, 255, 0.45);
  box-shadow:
    0 0 0 3px rgba(18, 184, 196, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
  background: var(--glass-bg-soft);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-note {
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.2em;
  color: var(--teal);
}

.form-note.error {
  color: #c0392b;
}

/* ----- Gallery carousel ----- */
.gallery-status {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.98rem;
  padding: 1.5rem 1rem 0.5rem;
}

.gallery-status.is-empty {
  padding: 2rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--glass-shadow);
  line-height: 1.55;
}

.gallery-status.is-empty strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.gallery-status.is-error {
  color: #c0392b;
}

.carousel {
  margin-top: 0.25rem;
  width: 100%;
}

.carousel-frame {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(7, 24, 32, 0.45) 0%, rgba(12, 36, 48, 0.5) 100%);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  touch-action: pan-y;
  aspect-ratio: 16 / 10;
  max-height: min(520px, 62vh);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}

.carousel-track.is-dragging {
  transition: none;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.carousel-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(1.7);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  color: var(--ink);
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
}

.carousel-btn:hover {
  background: var(--glass-bg);
  transform: scale(1.06);
  box-shadow: var(--glass-shadow-lift);
}

.carousel-btn:active {
  transform: scale(0.97);
}

.carousel-btn:focus-visible {
  outline: 3px solid rgba(18, 184, 196, 0.45);
  outline-offset: 2px;
}

.carousel-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  text-align: center;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--carousel-dot);
  cursor: pointer;
  transition: width 0.25s var(--ease), background 0.2s, transform 0.2s;
}

.carousel-dot:hover {
  background: rgba(18, 184, 196, 0.45);
}

.carousel-dot.is-active {
  width: 22px;
  background: var(--teal);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .carousel-frame {
    display: block;
    position: relative;
  }

  .carousel-viewport {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .carousel-btn {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 1.55rem;
    background: rgba(255, 255, 255, 0.92);
  }

  .carousel-btn:hover {
    transform: translateY(-50%) scale(1.05);
  }

  .carousel-prev {
    left: 0.55rem;
  }

  .carousel-next {
    right: 0.55rem;
  }
}

/* ----- Footer ----- */
.site-footer {
  padding: 0.5rem var(--gutter) 2.25rem;
}

.footer-inner {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: 100%;
  max-width: var(--panel-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  padding: 1.15rem 1.5rem 1.15rem;
  border-radius: 28px;
  /* Match page iOS glass system */
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(1.05);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

html[data-theme="dark"] .footer-inner {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

.footer-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, var(--glass-highlight) 0%, transparent 50%);
  opacity: 0.65;
  z-index: 0;
  clip-path: inset(0 round 28px);
}

.footer-inner > * {
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 220px;
}

.footer-brand .logo-img,
.footer-brand .logo-img-sm {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(0, 0, 0, 0.25);
  background: #061820;
}

html[data-theme="dark"] .footer-brand .logo-img,
html[data-theme="dark"] .footer-brand .logo-img-sm {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.45);
}

.footer-brand p {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 26ch;
  line-height: 1.4;
  margin: 0;
}

html:not([data-theme="dark"]) .footer-brand p {
  color: #1a3344;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-muted);
  width: 100%;
  text-align: center;
  padding-top: 0.55rem;
  margin: 0;
  border-top: 1px solid var(--line);
}

.footer-credit {
  width: 100%;
  text-align: center;
  margin: 0.3rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.footer-sep {
  margin: 0 0.45rem;
  opacity: 0.6;
}

.footer-credit a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-credit a:hover {
  color: var(--teal-deep);
}

/* ----- Reveal on scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Contact: stack form before it gets squeezed by the coral frame */
@media (max-width: 1100px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .contact-copy .section-sub {
    max-width: none;
  }
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
  .service-grid,
  .steps,
  .plans-grid {
    grid-template-columns: 1fr 1fr;
  }

  .panel-split {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-visual {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: clamp(0.9rem, 5vw, 1.4rem);
    --panel-max: 100%;
    --coral-scale: 1.42;
  }

  .reef-fg-img {
    object-position: center bottom;
  }

  .section-close {
    padding-bottom: 1.25rem;
  }

  .site-footer {
    padding-bottom: 3.5rem;
  }

  .nav-toggle {
    display: grid;
    z-index: 5;
    position: relative;
  }

  .nav-toggle:hover {
    background: var(--hover-fill);
  }

  .nav-toggle:hover .nav-fish-icon {
    opacity: 1;
  }

  .carousel-btn {
    background: var(--carousel-btn);
  }

  /* Mobile menu: solid frosted panel so links stay readable over the page */
  .nav-links {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-left: 0;
    /* Much less transparent than page glass panels */
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border-radius: 20px;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
      0 0 0 0.5px rgba(255, 255, 255, 0.5) inset,
      0 16px 48px rgba(8, 30, 45, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
    overflow: hidden;
    z-index: 200;
  }

  html[data-theme="dark"] .nav-links {
    background: rgba(10, 22, 32, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 0 0 0.5px rgba(255, 255, 255, 0.1) inset,
      0 16px 48px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: flex;
  }

  /* Hide inline desktop layout when closed; absolute menu handles open state */
  .glass-nav {
    overflow: visible;
  }

  .nav-links li {
    width: 100%;
    display: block;
  }

  .nav-links a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1.05rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    background: transparent;
    color: #0c1f2e !important;
  }

  html[data-theme="dark"] .nav-links a {
    color: #eef7fb !important;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: rgba(18, 184, 196, 0.14) !important;
    color: #06515c !important;
  }

  html[data-theme="dark"] .nav-links a:hover,
  html[data-theme="dark"] .nav-links a:active {
    background: rgba(46, 240, 255, 0.12) !important;
    color: #7af5ff !important;
  }

  /* CTA: full-width bar inside the menu, not a floating pill */
  .nav-links .nav-cta {
    margin: 0.35rem 0 0 !important;
    padding: 0.95rem 1.05rem !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-weight: 600;
    background: var(--teal) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(18, 184, 196, 0.28);
  }

  .nav-links .nav-cta:hover,
  .nav-links .nav-cta:active {
    background: var(--teal-deep) !important;
    color: #fff !important;
  }

  html[data-theme="dark"] .nav-links .nav-cta {
    color: #041820 !important;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    overflow: visible;
  }

  .nav,
  .glass-nav {
    position: relative;
    z-index: 200;
    overflow: visible;
  }

  .nav-toggle {
    pointer-events: auto;
    touch-action: manipulation;
  }

  .service-grid,
  .steps,
  .plans-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    border-radius: 24px;
  }

  .footer-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 100%;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-inner {
    border-radius: 24px;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
