/*
Theme Name: Congruentia
Theme URI: https://congruentia.org
Author: Congruentia / Alterna Agency
Author URI: https://alternaagency.com
Description: Official one-page marketing theme for Congruentia. EN/ES bilingual, cinematic ocean design, whale brand motif.
Version: 2.8.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://congruentia.org
Text Domain: congruentia
*/

/* ─────────────────────────────────────────────
   GOOGLE FONTS
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─────────────────────────────────────────────
   CSS CUSTOM PROPERTIES
───────────────────────────────────────────── */
:root {
  --purple:      #5F40FC;
  --accent:      #A62CE7;
  --white:       #FFFFFF;
  --black:       #000000;
  --ocean-deep:  #020E2E;
  --ocean-mid:   #0A2454;
  --ocean-light: #1B4A8A;
  --text-body:   #E8EDF6;
  --text-muted:  rgba(232, 237, 246, 0.65);

  --container: 1080px;
  --radius-bubble: 60px;
  --radius-card: 30px;
  --radius-pill: 9999px;
  --pad-section: 80px;
  --pad-card: 40px 36px;

  --transition: 0.25s ease;
  --ease-rise: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* glass surface tokens — deep blue tint, legible on both light sand and dark depths */
  --glass-bg:     rgba(2, 14, 46, 0.35);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow:
    0 12px 80px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative; /* anchors ::before / ::after to document flow */
  /* Caribbean dive: sandy shore at top scrolling down into the abyss */
  background: linear-gradient(
    to bottom,
    #F2E4C4  0%,   /* warm sand */
    #E8F4EC  3%,   /* foam line */
    #9AE3D8  7%,   /* shallow turquoise */
    #4BC2D6 13%,   /* clear water */
    #1A8FB8 22%,   /* deeper aqua */
    #0B5680 35%,   /* mid-blue */
    #062B52 55%,   /* deep */
    #021533 75%,   /* very deep */
    #010820 90%,   /* abyss */
    #00041A 100%   /* deepest black-blue */
  );
  background-attachment: scroll;
  background-size: 100% 100%;
}

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

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

/* ─────────────────────────────────────────────
   SHORELINE TEXTURE (body::before)
   Warm cream-to-transparent overlay over the
   top 600px — only visible in the sand zone.
───────────────────────────────────────────── */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 600px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background: linear-gradient(
    to bottom,
    rgba(242, 228, 180, 0.55) 0%,
    rgba(242, 228, 180, 0.25) 40%,
    transparent 100%
  );
}

/* ─────────────────────────────────────────────
   CAUSTICS OVERLAY (body::after)
   Animated light caustics — STRONG at top
   (shallow / lots of light), fades to 0 by
   40% of document height. Uses a vertical
   mask-image gradient for the fade.
───────────────────────────────────────────── */
body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* cover the top 40% of document — JS sets actual px via --caustics-height */
  height: 40%;
  min-height: 800px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  opacity: 0.14;
  background:
    radial-gradient(ellipse 30% 20% at 20% 30%, rgba(255,255,255,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 25% 15% at 70% 60%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 20% 25% at 45% 15%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(ellipse 15% 20% at 85% 20%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 35% 18% at 10% 75%, rgba(255,255,255,0.5) 0%, transparent 70%);
  background-size: 400% 400%;
  animation: caustics 30s ease-in-out infinite alternate;
  will-change: background-position;
  /* vertical fade: full opacity at top, gone at bottom edge */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

@keyframes caustics {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 40% 20%; }
  50%  { background-position: 20% 60%; }
  75%  { background-position: 70% 40%; }
  100% { background-position: 100% 100%; }
}

/* ─────────────────────────────────────────────
   BACKGROUND WHALE (swimming layer)
   Hidden at the top (shallow water). Fades in
   when body gains .scrolled-deep (>40% scroll).
───────────────────────────────────────────── */
.whale-bg {
  position: fixed;
  top: 30%;
  left: -20%;
  width: clamp(240px, 28vw, 420px);
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  filter: brightness(1.2);
  will-change: transform, opacity;
  animation: whale-drift 60s linear infinite;
  transition: opacity 1.5s ease;
}

body.scrolled-deep .whale-bg {
  opacity: 0.3;
}

@keyframes whale-drift {
  0%   { transform: translateX(0)       translateY(0px)   rotate(0deg); }
  20%  { transform: translateX(30vw)    translateY(-12px) rotate(1deg); }
  40%  { transform: translateX(65vw)    translateY(8px)   rotate(-0.5deg); }
  60%  { transform: translateX(100vw)   translateY(-6px)  rotate(1deg); }
  60.01% { transform: translateX(-28vw) translateY(0px)   rotate(0deg); }
  80%  { transform: translateX(-5vw)    translateY(10px)  rotate(-1deg); }
  100% { transform: translateX(0)       translateY(0px)   rotate(0deg); }
}

/* CSS fallback shape if whale image missing */
.whale-bg-fallback {
  position: fixed;
  top: 32%;
  left: -15%;
  width: clamp(200px, 22vw, 360px);
  height: clamp(80px, 9vw, 140px);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: transform;
}

/* ─────────────────────────────────────────────
   BUBBLE PARTICLES LAYER (.bubbles container)
   Injected by JS — position: fixed so they scroll
   behind content
───────────────────────────────────────────── */
.bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.55), rgba(255,255,255,0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  will-change: transform;
  animation: bubble-rise linear infinite;
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0) translateX(0px);
    opacity: 0;
  }
  8% {
    opacity: var(--bubble-opacity, 0.4);
  }
  75% {
    opacity: var(--bubble-opacity, 0.4);
  }
  100% {
    transform: translateY(-120vh) translateX(var(--bubble-drift, 20px));
    opacity: 0;
  }
}

/* ─────────────────────────────────────────────
   LANGUAGE TOGGLE — hide inactive language
───────────────────────────────────────────── */
body.lang-en .es { display: none !important; }
body.lang-es .en { display: none !important; }

/* default: show EN (set by JS; fallback shows both briefly) */
body:not(.lang-en):not(.lang-es) .es { display: none; }

/* ─────────────────────────────────────────────
   FIXED HEADER
───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  /* Always-on glass — keeps text legible over both sand and deep water */
  background: rgba(2, 14, 46, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition), backdrop-filter var(--transition);
}

.site-header.scrolled {
  background: rgba(2, 14, 46, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

/* top-left: whale logo + slogan stack */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-whale {
  height: 48px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

/* CSS fallback whale for header if image missing */
.header-whale-fallback {
  width: 72px;
  height: 36px;
  background: rgba(255,255,255,0.18);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  display: none;
}

.header-whale-fallback::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 30%;
  width: 16px;
  height: 22px;
  background: rgba(255,255,255,0.18);
  clip-path: polygon(0 50%, 100% 0%, 100% 100%);
}

.header-slogan {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-wordmark {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.header-tagline {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;
}

/* ─────────────────────────────────────────────
   HEADER RIGHT: lang switcher + login button
───────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 101;
}

/* ─────────────────────────────────────────────
   LANG SWITCHER (top-right, inside header)
───────────────────────────────────────────── */
#lang-switcher {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px;
  z-index: 101;
}

/* ─────────────────────────────────────────────
   LOGIN BUTTON (top-right, next to lang switcher)
───────────────────────────────────────────── */
.header-login-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--purple);
  text-decoration: none;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.header-login-btn:hover,
.header-login-btn:focus {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-1px);
  text-decoration: none;
}

.lang-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1;
}

.lang-btn.active {
  background: var(--white);
  color: var(--purple);
}

/* ─────────────────────────────────────────────
   MAIN CONTENT WRAPPER
   Sits above the fixed background layers
───────────────────────────────────────────── */
.page-content {
  position: relative;
  z-index: 2;
  padding-top: 100px; /* clear the fixed header */
}

/* ─────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* When .container is the outer page wrapper for bubble sections,
   we want it to only provide horizontal padding — not restrict max-width
   on the bubble sections themselves (they each declare their own max-width) */
.page-content > .container {
  max-width: 1200px;
  padding: 0 40px;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
h1, h2, h3 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 700; }

p {
  color: var(--text-body);
  max-width: 68ch;
}

/* ─────────────────────────────────────────────
   BUBBLE SECTIONS — glass containers
───────────────────────────────────────────── */
.bubble-section {
  max-width: var(--container);
  margin: 0 auto 120px;
  padding: var(--pad-section) 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 60px 80px 70px 50px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

/* alternate border-radius for visual variety */
.bubble-section:nth-child(even) {
  border-radius: 80px 50px 60px 70px;
}

.bubble-section:nth-child(3n) {
  border-radius: 50px 70px 80px 60px;
}

/* inner light shimmer at the top edge of each bubble */
.bubble-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   BUBBLE ENTRY ANIMATION (IntersectionObserver)
───────────────────────────────────────────── */
.bubble-section {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  transition:
    opacity 0.8s var(--ease-rise),
    transform 0.8s var(--ease-rise);
}

.bubble-section.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* stagger children inside each bubble */
.bubble-section.in-view > .container > *,
.bubble-section.in-view > * {
  animation: child-fade-up 0.6s var(--ease-rise) both;
}

.bubble-section.in-view > .container > *:nth-child(1),
.bubble-section.in-view > *:nth-child(1) { animation-delay: 0.1s; }
.bubble-section.in-view > .container > *:nth-child(2),
.bubble-section.in-view > *:nth-child(2) { animation-delay: 0.2s; }
.bubble-section.in-view > .container > *:nth-child(3),
.bubble-section.in-view > *:nth-child(3) { animation-delay: 0.3s; }
.bubble-section.in-view > .container > *:nth-child(4),
.bubble-section.in-view > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes child-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 16px 40px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 0 30px rgba(95, 64, 252, 0.5);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(95, 64, 252, 0.75);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 0 30px rgba(166, 44, 231, 0.5);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(166, 44, 231, 0.75);
}

/* ─────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────── */
.hero.bubble-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 80px 60px;
  margin-top: 40px;
  border-radius: 60px 80px 70px 50px;
}

.hero h1 {
  margin-bottom: 4px;
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* whale illustration in hero */
.whale-wrap {
  position: relative;
  width: clamp(200px, 36vw, 380px);
  aspect-ratio: 2 / 1;
  margin: 8px auto;
}

.whale-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(95, 64, 252, 0.4)) brightness(1.1);
}

/* CSS fallback placeholder */
.whale-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whale-placeholder-shape {
  width: 80%;
  height: 55%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(95, 64, 252, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
}

.whale-placeholder-shape::after {
  content: '';
  position: absolute;
  right: -14%;
  bottom: 15%;
  width: 22%;
  height: 45%;
  background: rgba(255, 255, 255, 0.12);
  clip-path: polygon(0 50%, 100% 0%, 100% 100%);
  border-radius: 4px;
}

.whale-wrap.has-image .whale-placeholder {
  display: none;
}

.hero-subhead {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  max-width: 660px;
  text-align: center;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   SECTION 1 — DEPTH OVER SURFACE
───────────────────────────────────────────── */
.depth-section .depth-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.depth-text h2 {
  margin-bottom: 32px;
}

.depth-text p {
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 20px;
  max-width: 100%;
}

.depth-text .depth-kicker {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  max-width: 100%;
  margin-bottom: 0;
}

.depth-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.depth-circle {
  width: min(300px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(95, 64, 252, 0.15) 0%, rgba(166, 44, 231, 0.08) 100%);
  border: 2px solid rgba(166, 44, 231, 0.4);
  box-shadow: 0 0 60px rgba(95, 64, 252, 0.2), inset 0 0 40px rgba(166, 44, 231, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.depth-circle::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(166, 44, 231, 0.25);
}

.depth-whale-icon {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.7;
  filter: brightness(1.2);
}

.depth-whale-fallback {
  font-size: 72px;
  line-height: 1;
  user-select: none;
  opacity: 0.6;
}

/* ─────────────────────────────────────────────
   SECTION 2 — HOW IT WORKS (glass cards)
───────────────────────────────────────────── */
.how-section .section-header {
  text-align: center;
  margin-bottom: 52px;
}

.how-section .section-header h2 {
  margin-bottom: 0;
}

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

/* glass card shared style */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(166, 44, 231, 0.12);
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--accent); /* how-section uses accent */
  transition: filter var(--transition);
}

.glass-card:hover .card-icon {
  filter: drop-shadow(0 0 12px rgba(166, 44, 231, 0.7));
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.glass-card h3 {
  margin-bottom: 12px;
}

.card-title-accent {
  color: var(--accent);
}

.glass-card p {
  font-size: 0.97rem;
  color: var(--text-muted);
  max-width: 100%;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   SECTION 3 — WHO IT'S FOR
   Industry cards: icons in --purple
───────────────────────────────────────────── */
.for-section .section-header {
  text-align: center;
  margin-bottom: 52px;
}

.for-section .section-header h2 {
  margin-bottom: 0;
}

.for-section .glass-card .card-icon {
  color: var(--purple);
}

.for-section .glass-card h3 {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 10px;
}

.for-section .glass-card:hover .card-icon {
  filter: drop-shadow(0 0 12px rgba(95, 64, 252, 0.7));
}

.for-closing {
  text-align: center;
  margin-top: 48px;
}

.for-closing p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  max-width: 72ch;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────
   SECTION 4 — WHY IT MATTERS
───────────────────────────────────────────── */
.why-section {
  max-width: 820px;
}

.why-section h2 {
  margin-bottom: 32px;
}

.why-section p {
  font-size: 1.05rem;
  margin-bottom: 20px;
  max-width: 100%;
  color: var(--text-body);
}

.why-section p:last-child {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   FINAL CTA SECTION
   Purple-tinted bubble, accent button
───────────────────────────────────────────── */
.cta-section {
  background: rgba(95, 64, 252, 0.15) !important;
  border-color: rgba(95, 64, 252, 0.25) !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.cta-subhead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 580px;
  text-align: center;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   FOOTER
   Below the bubble system, on deepest blue
───────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 52px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-whale-icon {
  height: 32px;
  width: auto;
  opacity: 0.55;
  filter: brightness(2);
}

/* fallback if image missing */
.footer-whale-fallback {
  width: 44px;
  height: 22px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: none;
}

.footer-brand-text .footer-wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  line-height: 1.1;
}

.footer-brand-text .footer-tagline {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.42);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.footer-extra-logo {
  height: 80px;
  width: auto;
  opacity: 0.9;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.1);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::after,
  .whale-bg,
  .bubble {
    animation: none !important;
  }

  .whale-bg {
    transition: none !important;
  }

  .bubble { display: none; }

  .bubble-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .bubble-section.in-view > .container > *,
  .bubble-section.in-view > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — 1024px
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .depth-section .depth-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .depth-visual {
    order: -1;
  }

  .depth-circle {
    width: 200px;
  }

  .bubble-section {
    padding: 60px 40px;
    margin-bottom: 80px;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — 768px
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    padding: 14px 20px;
  }

  .header-tagline {
    display: none;
  }

  .bubble-section {
    padding: 40px 28px;
    margin-bottom: 48px;
    border-radius: 32px !important;
  }

  .hero.bubble-section {
    margin-top: 20px;
    padding: 48px 28px;
  }

  .container {
    padding: 0 20px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .depth-visual {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    gap: 16px;
  }

  .cta-section h2 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .whale-bg {
    width: clamp(160px, 50vw, 260px);
    opacity: 0.18;
  }
}

/* ─────────────────────────────────────────────
   CONTACT ANCHOR PLACEHOLDER
───────────────────────────────────────────── */
#contact-anchor {
  display: block;
  height: 0;
  visibility: hidden;
}

/* ─────────────────────────────────────────────
   SCREEN-READER ONLY UTILITY
───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ─────────────────────────────────────────────
   BUBBLE SECTIONS — layout fixes
   when sections sit directly inside .container
   (no extra inner wrapper)
───────────────────────────────────────────── */

/* depth-section uses its own .depth-inner grid */
.depth-section {
  padding: var(--pad-section) 60px;
}

/* why-section: constrained max-width centered */
.why-section {
  margin-left: auto;
  margin-right: auto;
}

/* how-section and for-section: full-width bubble with inner content */
.how-section,
.for-section {
  max-width: var(--container);
}

/* section headers inside bubble sections */
.section-header {
  margin-bottom: 52px;
}

.section-header h2 {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   SIDE AD RAILS
   Fixed skyscraper columns, vertically centered.
   Visible only on screens >= 1400px so they
   sit in the margins outside the 1200px content
   area without overlapping copy.
   Z-index 10: above bubbles (z 1) and background
   whale (z 1), below the fixed header (z 100).
───────────────────────────────────────────── */
.ad-rail {
  position: fixed;
  top: 120px;               /* anchors below the fixed header */
  bottom: 40px;             /* floats above footer */
  transform: none;
  z-index: 50;              /* above content (z 1–2) but below header (z 100) */
  display: none;            /* hidden by default; shown at 1400px+ */
  flex-direction: column;
  gap: 0;                   /* gap comes from .ad-slot margin-bottom */
  width: max-content;       /* grows to fit widest slot */
  max-width: 420px;         /* cap so it never intrudes into content */
  max-height: calc(100vh - 160px); /* header height + bottom padding */
  overflow: hidden;
  pointer-events: none;     /* rail itself is not clickable — slots are */
}

.ad-rail-left  { left: 20px; }
.ad-rail-right { right: 20px; }

/* ── Individual slot ── */
/* width / height / aspect-ratio are set via inline style per slot */
.ad-slot {
  display: block;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  pointer-events: auto;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.ad-slot:last-child {
  margin-bottom: 0;
}

/* Hover lift + purple glow */
.ad-slot:hover {
  transform: translateY(-4px);
  border-color: rgba(95, 64, 252, 0.45);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(95, 64, 252, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.ad-slot a {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* fills slot, crops overflow — zoom via transform */
  display: block;
  transform-origin: center center;
}

/* ── Show rails only when there is enough screen width ── */
@media (min-width: 1400px) {
  .ad-rail {
    display: flex;
  }
}

/* ── Between 1024px and 1399px: rails hidden, inline ads hidden too ── */
@media (min-width: 1024px) and (max-width: 1399px) {
  .ad-rail   { display: none; }
  .inline-ad { display: none; }
}

/* ─────────────────────────────────────────────
   INLINE (MOBILE) ADS
   Rendered by congruentia_render_inline_ads().
   Hidden on desktop — shown only below 1024px.
───────────────────────────────────────────── */
.inline-ad {
  display: none;           /* hidden on desktop; overridden below 1024px */
  width: 100%;
  margin: 0 auto 40px;
  max-width: 480px;
  overflow: hidden;        /* clip zoomed images that scale beyond the boundary */
  border-radius: 12px;
}

.inline-ad__link {
  display: block;
  width: 100%;
}

.inline-ad__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;     /* flexible banner; adapts to square or wide ads */
  object-fit: cover;        /* fills slot, crops overflow — zoom via transform */
  transform-origin: center center;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Show inline ads only on mobile */
@media (max-width: 1023px) {
  .inline-ad {
    display: block;
  }
}

/* ─────────────────────────────────────────────
   REDUCED MOTION — ad rails
───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ad-slot,
  .ad-slot:hover {
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   LP LANDING PAGE TEMPLATE
   Quieter, focused version of the site. Same ocean atmosphere,
   stripped header, centred glass card, minimal footer.
   Classes: .lp-header  .lp-main  .lp-card-wrap  .lp-card  .lp-footer
═══════════════════════════════════════════════════════════ */

/* ─ Header override: hide the lang-switcher + login slot area on LP pages.
   LP pages are stripped landing pages — no nav, no auth links. ─ */
.lp-page .site-header #lang-switcher,
.lp-page .site-header .header-right,
.lp-page .site-header .header-login-btn {
  display: none;
}

/* ─ LP stripped header ─ */
.lp-header {
  /* inherits .site-header glass — no extra overrides needed for structure.
     The brand link stays left-aligned; there's nothing on the right.
     Add a subtle centre-balance so the logo doesn't feel orphaned. */
  justify-content: center;
}

/* ─ LP main: vertically centres the card on short viewports ─ */
.lp-main {
  min-height: calc(100vh - 80px - 100px); /* minus header (~80px) and footer (~100px) */
  display: flex;
  align-items: flex-start;   /* top-aligned for tall forms; flex-start feels more natural */
  justify-content: center;
  padding: 48px 20px 60px;
}

/* ─ Card wrapper: constrains width ─ */
.lp-card-wrap {
  width: 100%;
  max-width: 640px;
}

/* ─ The glass card ─ */
.lp-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);           /* 30px — matches bubble-section style */
  box-shadow: var(--glass-shadow);
  padding: 52px 44px 52px;
  position: relative;
  overflow: hidden;
  /* Inner top-edge shimmer (matches .bubble-section::before) */
}

.lp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

/* ─ Page title inside the card ─ */
.lp-card__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 32px;
  text-align: center;
}

/* ─ Content area: reset max-width so Fluent Forms fills the card ─ */
.lp-card__content {
  color: var(--text-body);
}

.lp-card__content p {
  max-width: 100%;
  margin-bottom: 16px;
}

/* ─ Fluent Forms integration — match the ocean glass palette ─ */
.lp-card__content .ff-el-input--label label,
.lp-card__content .ff-el-form-control label {
  color: var(--text-body) !important;
}

.lp-card__content .ff-el-form-control input,
.lp-card__content .ff-el-form-control select,
.lp-card__content .ff-el-form-control textarea {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  color: var(--white) !important;
  font-family: var(--font) !important;
  padding: 12px 16px !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}

.lp-card__content .ff-el-form-control input:focus,
.lp-card__content .ff-el-form-control select:focus,
.lp-card__content .ff-el-form-control textarea:focus {
  outline: none !important;
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(95, 64, 252, 0.25) !important;
}

.lp-card__content .ff_submit_btn_container .ff-btn-submit,
.lp-card__content input[type="submit"],
.lp-card__content button[type="submit"] {
  background: var(--purple) !important;
  border: none !important;
  border-radius: var(--radius-pill) !important;
  color: var(--white) !important;
  font-family: var(--font) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 14px 36px !important;
  cursor: pointer !important;
  box-shadow: 0 0 30px rgba(95, 64, 252, 0.5) !important;
  transition: transform var(--transition), box-shadow var(--transition) !important;
}

.lp-card__content .ff_submit_btn_container .ff-btn-submit:hover,
.lp-card__content input[type="submit"]:hover,
.lp-card__content button[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 48px rgba(95, 64, 252, 0.75) !important;
}

/* ─ LP minimal footer ─ */
.lp-footer {
  position: relative;
  z-index: 2;
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-footer__copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.32);
  max-width: 100%;           /* override the global p max-width: 68ch */
}

/* ─ Mobile tweaks ─ */
@media (max-width: 768px) {
  .lp-card {
    padding: 36px 24px 40px;
    border-radius: 24px;
  }

  .lp-card__title {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    margin-bottom: 24px;
  }

  .lp-main {
    padding: 32px 16px 48px;
  }
}

/* ─ Reduced motion ─ */
@media (prefers-reduced-motion: reduce) {
  .lp-card {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   LP BRAND VARIANT — Caribbean University (.lp-cu)
   Applied to /lp/form/ via slug check in landing-page.php.
   Strips Congruentia chrome; full-bleed CU artwork as backdrop.
═══════════════════════════════════════════════════════════ */
body.lp-cu {
  /* Replace the ocean gradient with the CU artwork */
  background: #FFD400 url('assets/img/lp-bg-caribbean-university.png') center top / cover no-repeat fixed;
}

/* Kill Congruentia atmosphere on the CU LP */
body.lp-cu::before,
body.lp-cu::after,
body.lp-cu .bubbles,
body.lp-cu .whale-bg,
body.lp-cu .lp-header,
body.lp-cu .lp-footer {
  display: none !important;
}

/* PNG already carries the headline — hide the WP page title */
body.lp-cu .lp-card__title {
  display: none;
}

/* No header to clear; pin the form lower so the bus + headline stay visible */
body.lp-cu .lp-main {
  padding-top: clamp(380px, 52vh, 620px);
  padding-bottom: 60px;
  min-height: 100vh;
}

/* Slightly darker glass so the form reads clearly over the bright PNG */
body.lp-cu .lp-card {
  background: rgba(2, 14, 46, 0.55);
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

/* Mobile: scroll-attached bg (fixed bg is jittery on iOS), tighter top padding */
@media (max-width: 768px) {
  body.lp-cu {
    background-attachment: scroll;
    background-size: 100% auto;
    background-position: center top;
    background-color: #FFD400;
  }

  body.lp-cu .lp-main {
    padding-top: clamp(220px, 56vw, 380px);
  }
}

/* ─ Floating audio toggle (bottom-right, glass pill) ─ */
.lp-cu-audio-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(2, 14, 46, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(95, 64, 252, 0.6);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  animation: lp-cu-audio-pulse 2.2s ease-in-out infinite;
}

.lp-cu-audio-toggle:hover,
.lp-cu-audio-toggle:focus-visible {
  transform: translateY(-2px) scale(1.04);
  background: var(--purple);
  outline: none;
}

/* When playing, stop the attention pulse and swap icons */
.lp-cu-audio-toggle[aria-pressed="true"] {
  animation: none;
}

.lp-cu-audio-toggle .icon-pause { display: none; }
.lp-cu-audio-toggle[aria-pressed="true"] .icon-play { display: none; }
.lp-cu-audio-toggle[aria-pressed="true"] .icon-pause { display: inline-block; }

@keyframes lp-cu-audio-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 0 rgba(95, 64, 252, 0.55); }
  50%      { box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 14px rgba(95, 64, 252, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-cu-audio-toggle { animation: none; transition: none; }
}

@media print {
  .lp-cu-audio-toggle { display: none !important; }
}
