/* ==========================================================================
   IMMERSI.COM — MASTER STYLESHEET
   Built with Claude (Anthropic) — an AI-assisted single-page site.

   TABLE OF CONTENTS:
   1.  Effects & Animations (scroll reveals, progress bar, dividers, drops)
   2.  Reset & CSS Variables
   3.  Navigation
   4.  Hero Section
   5.  Name Origin Section
   6.  Services / Capabilities Section
   7.  Approach Section
   8.  Featured Work Section
   9.  Segments / Industries Section
   10. Contact Section
   11. Footer (aquarium water surface)
   12. Mobile / Responsive
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. EFFECTS & ANIMATIONS
   These styles power the interactive visual effects. They're grouped here
   at the top so you can easily find and tune them.
   -------------------------------------------------------------------------- */

/*
 * SCROLL-TRIGGERED REVEALS
 * Elements with class "reveal" start invisible and slide up when they
 * enter the viewport. JavaScript adds "visible" via IntersectionObserver.
 *
 * HOW TO USE:
 *   <div class="reveal">               — fades/slides up on scroll
 *   <div class="reveal reveal-delay-3"> — same, but waits 0.3s (stagger effect)
 *
 * The easing curve (0.16, 1, 0.3, 1) gives a quick start with a gentle landing.
 */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;     /* GPU compositing during reveal */
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;                   /* Release GPU layer after animation */
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }

/*
 * SCROLL PROGRESS BAR
 * Uses transform: scaleX() instead of width for GPU-accelerated rendering.
 * Width is set to 100% and scaleX controls how much is visible.
 * transform-origin: left ensures it grows from left to right.
 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;               /* Full width — scaleX controls visible amount */
  background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
  z-index: 10001;
  pointer-events: none;
  transform: scaleX(0);               /* 0 = empty, 1 = full */
  transform-origin: left;             /* Grow from left edge */
  will-change: transform;             /* Hint: this changes every scroll event */
}

/*
 * MAGNETIC TILT — FEATURED WORK CARDS
 * JS tracks cursor position over each <details> card and applies a small
 * 3D rotation, giving a "magnetic" tilt-toward-cursor feel.
 * - transform-style: preserve-3d enables the depth effect
 * - will-change: transform tells the browser to GPU-accelerate
 * - Tilt is disabled when card is expanded (open) so it won't fight reading
 *
 * TO ADJUST: The tilt angle is set in JS (tilt.js), currently ±4 degrees.
 */
details.featured-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: default;           /* Only the summary (click target) gets pointer cursor */
}
details.featured-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/*
 * WAVE SECTION DIVIDERS
 * Placed between each major content section. Each holds a <canvas>
 * that JS draws animated sine waves onto using the Immersi color palette.
 *
 * TO ADJUST:
 * - Change height below to make the wave band taller or shorter
 * - Wave colors, speeds, and amplitudes are in JS (waves.js)
 */
.wave-divider {
  position: relative;
  height: 70px;              /* Total height of the wave divider band */
  overflow: visible;         /* Allow waves to extend beyond container */
  margin: 0;
  background: transparent;
  z-index: 2;                /* Float above adjacent sections */
}
.wave-divider.wave-inverted {
  height: 160px;             /* Inverted waves radiate outward and need more room */
  margin-top: -80px;         /* Overlap into section above */
  margin-bottom: -80px;      /* Overlap into section below */
}
.wave-divider canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(0);            /* Own GPU compositing layer */
}

/*
 * AQUARIUM FOOTER — WATER SURFACE CANVAS
 * Canvas behind footer content draws a side-view water surface.
 * A horizontal "water line" sits at 30% from the top of the footer.
 * Below it: water with depth gradient and caustic lines.
 * Above it: air where drops fall through before splashing.
 */
#waterSurface {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;               /* Behind footer text content */
  /* translateZ(0) now applied via JS inline transform alongside scale+rotate */
}

/*
 * DROP ZONE — FALLING DROPS OVERLAY
 * Full-viewport fixed canvas. pointer-events: none so it never blocks clicks.
 * JS only draws drops when cursor is below the Contact section.
 * Drops are spawned at the cursor and fall with gravity, hitting the
 * footer's water surface where they create splashes and ripples.
 *
 * TO ADJUST: Drop sizes, gravity, and spawn rate are in JS (aquarium.js).
 */
#dropZone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;      /* Clicks pass through to elements below */
  z-index: 9998;
  transform: translateZ(0);  /* GPU compositing layer */
}

/*
 * ACCESSIBILITY: SKIP-TO-CONTENT LINK
 * Hidden off-screen by default. Appears when a keyboard user presses Tab,
 * allowing them to jump directly to the hero section past the nav.
 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 10000;
  font-size: 0.85rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}


/* --------------------------------------------------------------------------
   2. RESET & CSS VARIABLES
   Color palette, typography defaults, and box-sizing reset.
   Change the accent color here to rebrand the entire site.
   -------------------------------------------------------------------------- */
:root {
  --bg-deep: #ffffff;
  --bg-section: #f8f9fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --accent: #2563eb;
  --accent-soft: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.08);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(30, 41, 59, 0.1);
  --border-accent: rgba(37, 99, 235, 0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* --------------------------------------------------------------------------
   3. NAVIGATION
   Fixed top navbar with scroll-triggered background change.
   Mobile hamburger menu toggled via JS (mobile-menu.js).
   -------------------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
  padding: 0.6rem 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo span {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}


/* --------------------------------------------------------------------------
   4. HERO SECTION
   Full-viewport landing with ripple canvas behind text.
   The rippleCanvas element is positioned absolutely behind the content.
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 3rem;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;         /* Prevent text selection on click (ripple area) */
}

#rippleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);            /* GPU compositing layer */
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.04) 0%, transparent 60%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -3%) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-logo-fallback {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  animation: fadeUp 1s ease-out;
}

.nav-logo-fallback {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-logo {
  width: 280px;
  height: auto;
  margin-bottom: 2.5rem;
  filter: none;
  animation: fadeUp 1s ease-out;
}

.hero-tagline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease-out 0.15s both;
}

.hero-tagline .accent { color: var(--accent); }

.hero-description {
  font-size: 1.0rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 1s ease-out 0.3s both;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeUp 1s ease-out 0.45s both;
}

.hero-cta:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.2);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SCROLL INDICATOR */
.scroll-hint {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 1s ease-out 0.6s both;
}

.scroll-hint .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* SECTIONS */
section {
  padding: 5.4rem 2rem;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.8;
}


/* --------------------------------------------------------------------------
   5. NAME ORIGIN SECTION
   Two-column layout explaining the "Immersi" name and diving icon.
   -------------------------------------------------------------------------- */
.name-section {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  border-bottom: none;       /* Removed — inverted wave divider overlaps here */
}

.name-block {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: center;
}

.name-etymology {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

.name-etymology em {
  color: var(--accent);
  font-style: normal;
}

.name-explanation {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* --------------------------------------------------------------------------
   6. SERVICES / CAPABILITIES SECTION
   2x2 grid of the four core service areas. The particleCanvas sits
   behind this section (positioned absolute, z-index 0) showing the
   interactive connected-node network.
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.service-card h3 {
  font-size: 1.0rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* --------------------------------------------------------------------------
   7. APPROACH SECTION
   Two-column layout describing Immersi's consulting philosophy.
   -------------------------------------------------------------------------- */
.approach-section {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

#approachLightningCanvas {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 100vw;             /* Full viewport width, not just section-inner */
  height: 100%;
  pointer-events: none;
  z-index: 10;              /* Above sibling content within .section-inner */
}

.approach-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 2.5rem;
}

.approach-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.approach-values {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.value-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.value-marker {
  display: none;          /* Card borders provide enough visual separation */
}

.value-item h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.value-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* --------------------------------------------------------------------------
   8. FEATURED WORK SECTION
   Expandable <details> cards, each telling a project story.
   Uses dark gradient headers with light text, expandable bodies.
   The magnetic tilt effect (tilt.js) applies to closed cards.
   -------------------------------------------------------------------------- */
.featured-section {
  background: rgba(0, 0, 0, 0.10);
  border-top: none;          /* Removed — inverted wave divider overlaps here */
}

.featured-card {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2.5rem;
}

details.featured-card summary {
  cursor: pointer;
  list-style: none;
  position: relative;
}

details.featured-card summary::-webkit-details-marker {
  display: none;
}

details.featured-card summary::marker {
  display: none;
  content: '';
}

.expand-hint {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #93c5fd;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.expand-hint::after {
  content: ' \25BC';
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

details[open] .expand-hint {
  display: none;
}

details.featured-card summary:hover .expand-hint {
  color: #bfdbfe;
}

details.featured-card .featured-body,
details.featured-card .featured-footer-note {
  animation: expandIn 0.4s ease-out;
}

@keyframes expandIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.collapse-bar {
  padding: 1rem 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.collapse-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.collapse-btn:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

.featured-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 2.5rem 3rem;
  color: #fff;
}

.featured-client {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 0.5rem;
}

.featured-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.featured-result {
  font-size: 0.9rem;
  color: #cbd5e1;
  font-style: italic;
}

.featured-body {
  padding: 2.5rem 3rem;
}

.featured-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-phase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.timeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.timeline-location {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.featured-footer-note {
  padding: 1.5rem 3rem 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
}

.featured-footer-note a,
.timeline-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.featured-footer-note a:hover,
.timeline-content a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}

.press-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
  font-style: normal;
}

.press-links a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.press-links a:hover {
  background: rgba(37, 99, 235, 0.15);
  text-decoration: none;
}

@media (max-width: 768px) {
  .featured-header { padding: 2rem 1.5rem; }
  .featured-body { padding: 1.5rem; }
  .featured-footer-note { padding: 1.25rem 1.5rem 2rem; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}


/* --------------------------------------------------------------------------
   9. SEGMENTS / INDUSTRIES SECTION
   Tag cloud of industries served. Each tag uses reveal animation
   with staggered delays for a cascade effect on scroll.
   Lightning bolts fire toward the cursor from behind the cloud dividers.
   The falling drops effect begins at the Contact section below.
   -------------------------------------------------------------------------- */
.segments-section {
  background: rgba(0, 0, 0, 0.30);
  border-top: none;          /* Removed — inverted wave divider overlaps here */
  border-bottom: none;       /* Removed — inverted wave divider overlaps here */
  position: relative;
  overflow: hidden;
}

#lightningCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
}

.segments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.segment-tag {
  padding: 0.5rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.segment-tag:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-glow);
}


/* --------------------------------------------------------------------------
   10. CONTACT SECTION
   Two-column layout: left side info, right side Formspark form.
   Form submits via fetch() to Formspark endpoint (contact-form.js).
   -------------------------------------------------------------------------- */
.contact-section {
  background: var(--bg-section);
  border-top: none;          /* Removed — inverted wave divider overlaps here */
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  margin-top: 2.5rem;
  align-items: start;
}

.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.contact-detail .icon {
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  align-self: flex-start;
}

.form-submit:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.form-status {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

/* --------------------------------------------------------------------------
   11. FOOTER
   The footer uses a gradient background that transitions from the page
   color into a subtle blue, creating the "underwater" feel for the
   aquarium water surface effect. The waterSurface canvas sits behind
   the content (z-index: 0) while footer-inner sits above (z-index: 2).
   -------------------------------------------------------------------------- */
footer {
  position: relative;
  padding: 2.5rem 2rem;
  border-top: none;
  text-align: center;
  overflow: hidden;
  /* Gradient: page white → soft blue → deeper blue (simulates water depth) */
  background: linear-gradient(180deg, var(--bg-deep) 0%, #eaf1fb 40%, #d6e4f5 100%);
}

#footerCanvas {
  display: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  height: 24px;
}

.footer-brand span {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--text-muted);
}

footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}


/* --------------------------------------------------------------------------
   12. MOBILE / RESPONSIVE
   Breakpoint: 768px. Collapses grids to single column,
   shows hamburger menu, adjusts typography and spacing.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .name-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .approach-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .scroll-hint { display: none; }
}

/* Respect user motion preferences — disable all animations */
@media (prefers-reduced-motion: reduce) {
  .wave-divider, .wave-divider canvas,
  #rippleCanvas, #particleCanvas, #dropCanvas, #waterCanvas { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  details.featured-card { transition: none; }
  .scroll-progress { display: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* Focus-visible outlines for keyboard navigation accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
