/* ═══════════════════════════════════════════════════════════════
   BASE — Body, container, section anatomy, scroll reveal, effects
   ═══════════════════════════════════════════════════════════════ */

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem; /* 17px base */
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Container ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  position: relative;
  z-index: 2;
}

/* ── Section anatomy ── */
section {
  padding: var(--section-pad) 0;
  position: relative;
}

section.surface { background: var(--surface); }
section.dark { background: var(--dark); color: var(--text-on-dark); }
section.dark .section-label { color: var(--accent-light); }
section.dark .section-title { color: var(--white); }
section.dark .body-text { color: rgba(240, 247, 247, 0.7); }

.section-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}

.section-title em {
  font-style: normal;
  color: var(--accent);
}

.section-subtitle {
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 640px;
}

.section-subtitle.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header-centered {
  text-align: center;
  margin-bottom: 48px;
}

.section-header-centered .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ── Body text ── */
.body-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--body);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ── Decorative shapes ── */
.accent-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 20px;
}

.accent-line.centered { margin-left: auto; margin-right: auto; }

/* ═══════════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════════════ */

/* Effect: Geometric grid pattern — applied to white-background sections
   Cards with background:white sit above and stay clean */
.grain-overlay {
  display: none;
}

.has-grain {
  position: relative;
}

.has-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 138, 142, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 138, 142, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  background-attachment: fixed;
}

/* Subtle accent glow spots on the grid */
.has-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 138, 142, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(20, 138, 142, 0.04) 0%, transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(20, 138, 142, 0.03) 0%, transparent 30%);
}

.has-grain + .has-grain::after { display: none; }

@media (max-width: 768px) {
  .grain-overlay { display: none; }
}

/* Effect 3: Bokeh dots — for .surface (light teal) sections */
.bokeh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bokeh-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,138,142,0.12) 0%, transparent 70%);
  animation: bokeh-float 14s ease-in-out infinite alternate;
}

.bokeh-dot:nth-child(1) { width: 180px; height: 180px; top: 10%; left: 5%; animation-delay: 0s; }
.bokeh-dot:nth-child(2) { width: 120px; height: 120px; top: 60%; right: 10%; animation-delay: -3s; }
.bokeh-dot:nth-child(3) { width: 200px; height: 200px; bottom: 15%; left: 40%; animation-delay: -7s; }
.bokeh-dot:nth-child(4) { width: 90px; height: 90px; top: 30%; right: 25%; animation-delay: -5s; }
.bokeh-dot:nth-child(5) { width: 150px; height: 150px; bottom: 40%; left: 15%; animation-delay: -10s; }

@keyframes bokeh-float {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-30px) scale(1.15); opacity: 1; }
}

/* Effect 7: Floating particles — for .dark sections */
.particles-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(20, 138, 142, 0.7);
  box-shadow: 0 0 6px rgba(20, 138, 142, 0.4);
  animation: particle-rise linear infinite;
}

.particle:nth-child(1)  { left: 5%;  animation-duration: 18s; animation-delay: 0s; width: 3px; height: 3px; }
.particle:nth-child(2)  { left: 15%; animation-duration: 22s; animation-delay: -4s; width: 5px; height: 5px; }
.particle:nth-child(3)  { left: 25%; animation-duration: 16s; animation-delay: -8s; }
.particle:nth-child(4)  { left: 35%; animation-duration: 20s; animation-delay: -2s; width: 3px; height: 3px; }
.particle:nth-child(5)  { left: 45%; animation-duration: 24s; animation-delay: -6s; width: 6px; height: 6px; }
.particle:nth-child(6)  { left: 55%; animation-duration: 17s; animation-delay: -10s; width: 5px; height: 5px; }
.particle:nth-child(7)  { left: 65%; animation-duration: 21s; animation-delay: -3s; }
.particle:nth-child(8)  { left: 75%; animation-duration: 19s; animation-delay: -7s; width: 3px; height: 3px; }
.particle:nth-child(9)  { left: 85%; animation-duration: 23s; animation-delay: -1s; width: 5px; height: 5px; }
.particle:nth-child(10) { left: 95%; animation-duration: 15s; animation-delay: -12s; width: 6px; height: 6px; }
.particle:nth-child(odd) { background: rgba(255, 255, 255, 0.25); box-shadow: 0 0 8px rgba(255, 255, 255, 0.15); }

@keyframes particle-rise {
  0%   { bottom: -5%; opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { bottom: 105%; opacity: 0; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
