/* ── Home theme: AQUA ──────────────────────────────────
   Glazier = Ice (grey-blue, hex rain)
   Pawn'IT = Aqua (electric teal, CSS caustics + snorkel micro-bubbles)
   Angerboda = Fire (ember orange, sparks)
   Earth reserved for a future product.
   ───────────────────────────────────────────────────── */

:root {
  --bg:        #001220;
  --bg-deep:   #001828;
  --panel:     #002030;
  --border:    #004858;
  --border2:   #006878;
  --accent:    #00FFCC;
  --accent2:   #00CCAA;
  --accent-rgb: 0,255,204;
  --accent-b:  #00D4FF;
  --accent-b2: #00A8D4;
  --accent-b-rgb: 0,212,255;
  --text:      #E8FFF8;
  --dim:       #5AB8A8;
  --dimmer:    #2A6860;
  --ok:        #40E8A0;
  --fail:      #E07090;
  --sun:       #FFFFFF;
  --sun-rgb:   255,255,255;
  --ice:       #7AB8D4;
  --fire:      #E8935A;
}

/* ── Base depth gradient (static, instant) ───────────── */
body.aqua-page {
  background:
    linear-gradient(180deg, rgba(0,255,204,0.05) 0%, rgba(0,212,255,0.04) 14%, transparent 30%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(0,212,255,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 100% 70% at 50% 110%, #005060 0%, #002838 45%, #001220 100%);
  background-attachment: fixed;
}

/* ── Sun disc + god rays (BIO-AIO inspired, CSS only) ─ */
body.aqua-page #film-canvas {
  z-index: 1;
  opacity: 1;
  mix-blend-mode: screen;
}

body.aqua-page .page {
  z-index: 2;
}

.aqua-bg {
  z-index: 0;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.aqua-sun {
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 60vh;
  border-radius: 50%;
  background: radial-gradient(ellipse 100% 75% at 50% 0%,
    rgba(0, 255, 204, 0.14) 0%,
    rgba(0, 212, 255, 0.10) 35%,
    rgba(0, 120, 140, 0.06) 55%,
    transparent 75%);
  filter: blur(40px);
  animation: sunGlow 22s ease-in-out infinite alternate;
}

/* Wide god-ray fan — repeating spokes, soft blur */
.aqua-rays {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: sunraySway 32s ease-in-out infinite alternate;
}

.aqua-rays::before {
  content: '';
  position: absolute;
  top: -8%;
  left: -10%;
  width: 120%;
  height: 75vh;
  background: radial-gradient(ellipse 100% 80% at 50% 0%,
    rgba(0, 255, 204, 0.12) 0%,
    rgba(0, 212, 255, 0.08) 35%,
    rgba(0, 100, 120, 0.04) 55%,
    transparent 72%);
}

.aqua-rays::after {
  content: '';
  position: absolute;
  top: -5%;
  left: -8%;
  width: 116%;
  height: 80vh;
  background: repeating-conic-gradient(
    from -90deg at 50% 0%,
    transparent 0deg 8deg,
    rgba(0, 255, 204, 0.07) 8deg 9deg,
    transparent 9deg 18deg
  );
  filter: blur(20px);
  -webkit-mask-image: radial-gradient(ellipse 110% 85% at 50% 0%, #000 0%, transparent 68%);
  mask-image: radial-gradient(ellipse 110% 85% at 50% 0%, #000 0%, transparent 68%);
}

@keyframes sunGlow {
  0%   { opacity: 0.85; transform: translateX(-50%) scale(1); }
  100% { opacity: 1;    transform: translateX(-50%) scale(1.04); }
}

@keyframes sunraySway {
  0%   { opacity: 0.88; transform: rotate(-0.6deg); }
  100% { opacity: 1;    transform: rotate(0.6deg); }
}

/* ── Animated caustic light pools (CSS only) ─────────── */
.aqua-caustic {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform, opacity;
}

.aqua-caustic.c1 {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  top: -8%;
  left: 10%;
  background: rgba(0, 255, 204, 0.18);
  animation: causticA 22s ease-in-out infinite;
}

.aqua-caustic.c2 {
  width: min(45vw, 400px);
  height: min(45vw, 400px);
  top: 30%;
  right: -5%;
  background: rgba(0, 212, 255, 0.14);
  animation: causticB 28s ease-in-out infinite;
}

.aqua-caustic.c3 {
  width: min(50vw, 440px);
  height: min(50vw, 440px);
  bottom: 5%;
  left: 25%;
  background: rgba(0, 255, 204, 0.10);
  animation: causticC 25s ease-in-out infinite;
}

@keyframes causticA {
  0%, 100% { transform: translate(0, 0) scale(1);    opacity: 0.55; }
  33%       { transform: translate(6%, 4%) scale(1.08); opacity: 0.75; }
  66%       { transform: translate(-4%, 8%) scale(0.95); opacity: 0.5; }
}

@keyframes causticB {
  0%, 100% { transform: translate(0, 0) scale(1);     opacity: 0.45; }
  50%       { transform: translate(-8%, -6%) scale(1.1); opacity: 0.7; }
}

@keyframes causticC {
  0%, 100% { transform: translate(0, 0) scale(1);    opacity: 0.4; }
  40%       { transform: translate(5%, -5%) scale(1.05); opacity: 0.65; }
  80%       { transform: translate(-6%, 3%) scale(0.92); opacity: 0.45; }
}

/* Surface light line */
body.aqua-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%, rgba(0,255,204,0.2) 20%,
    rgba(0,212,255,0.45) 50%, rgba(0,255,204,0.2) 80%, transparent 100%);
  animation: surfacePulse 10s ease-in-out infinite;
}

@keyframes surfacePulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.85; }
}

/* ── Aqua UI accents ─────────────────────────────────── */
body.aqua-page .site-header {
  border-bottom-color: rgba(0, 255, 204, 0.25);
  box-shadow: 0 1px 24px rgba(0, 255, 204, 0.06);
}

body.aqua-page .site-logo { color: var(--accent); }

body.aqua-page .section-label { color: var(--accent-b); }

body.aqua-page .tag.active {
  color: var(--accent);
  border-color: rgba(0, 255, 204, 0.5);
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.1);
}

/* ── Hero title ──────────────────────────────────────── */
.hero-title-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 28px;
  isolation: isolate;
}

body.aqua-page .hero-title.aqua-fill {
  position: relative;
  z-index: 0;
  width: 100%;
  margin-bottom: 0;
}

body.aqua-page .hero-title.aqua-fill .hero-line {
  display: block;
  width: 100%;
}

body.aqua-page .hero-title.aqua-fill .hero-line-visual {
  display: block;
  width: 100%;
  white-space: nowrap;
  color: var(--accent);
}

.hero-title-shader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(0, 255, 204, 0.28));
}

.hero-title-wrap.has-bioaio-shader .hero-title-shader {
  opacity: 1;
}

.hero-title-wrap.has-bioaio-shader .hero-line-visual {
  color: transparent !important;
}

/* ── Element strip ───────────────────────────────────── */
.element-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 100px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 255, 204, 0.15);
  border-bottom: 1px solid rgba(0, 255, 204, 0.15);
  flex-wrap: wrap;
}

.element-strip .el {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
  padding: 0 20px;
  white-space: nowrap;
}

.element-strip .el.ice  { color: var(--ice); opacity: 0.85; }
.element-strip .el.aqua {
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 16px rgba(0, 255, 204, 0.35);
}
.element-strip .el.fire { color: var(--fire); opacity: 0.85; }

.element-strip .sep {
  font-size: 8px;
  color: var(--border2);
  letter-spacing: 0;
}

/* ── Product cards ───────────────────────────────────── */
.product-card.card-ice  { --card-accent: var(--ice); }
.product-card.card-fire { --card-accent: var(--fire); }

body.aqua-page .product-card {
  background: rgba(0, 32, 48, 0.6);
}

body.aqua-page .product-card:hover {
  border-color: var(--border2);
  background: rgba(0, 40, 56, 0.8);
  box-shadow: 0 0 32px rgba(0, 255, 204, 0.1);
}

body.aqua-page .manifesto-item {
  background: rgba(0, 24, 40, 0.5);
}

body.aqua-page .manifesto-item:first-child {
  background: rgba(0, 32, 48, 0.65);
}

body.aqua-page .site-footer {
  border-top-color: rgba(0, 255, 204, 0.15);
}

@media (max-width: 640px) {
  .page { padding: 48px 20px 80px; }
  .site-header { margin-bottom: 48px; }
  .hero { margin-bottom: 56px; }
  .element-strip { margin-bottom: 64px; gap: 8px; }
  .element-strip .el { padding: 4px 12px; }
  .element-strip .sep { display: none; }
  .site-footer { flex-direction: column; gap: 8px; }
  .footer-right { letter-spacing: 0.05em; line-height: 1.6; }
  .aqua-caustic { filter: blur(48px); }
  body.aqua-page .hero-title.aqua-fill .hero-line-visual {
    white-space: normal;
    letter-spacing: normal !important;
    color: var(--accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aqua-caustic,
  .aqua-sun,
  .aqua-rays,
  body.aqua-page::before {
    animation: none;
  }
  body.aqua-page .hero-title.aqua-fill .hero-line-visual {
    color: var(--accent);
  }
}
