/* =================================================================
 * MARE — Effects CSS for Divi 5
 * =================================================================
 * Stili che:
 *   1. Definiscono il design system (colori, font, scale tipografiche).
 *   2. Posizionano canvas/overlay creati da mare-effects.js.
 *   3. Sovrascrivono i moduli Divi quando serve (con !important mirati).
 *
 * Le classi sono divise in due gruppi:
 *   .mare-*       → assegnate da Adela ai moduli Divi (Section/Row/Module
 *                   CSS Class). Definiscono COME un blocco di contenuto
 *                   appare e si comporta.
 *   .mare-fx-*    → create da JS. NON vanno assegnate manualmente.
 *
 * =================================================================
 */

/* ---------- 0. ROOT TOKENS ---------- */
:root {
  --ink: #070708;
  --ink-2: #0e0e11;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --paper: #ffffff;
  --paper-dim: rgba(255, 255, 255, .72);
  --paper-mute: rgba(255, 255, 255, .5);
  --paper-faint: rgba(255, 255, 255, .3);
  --paper-ghost: rgba(255, 255, 255, .14);
  --mare-blue: #1669b8;
  --mare-blue-dim: rgba(22, 105, 184, .6);

  --f-display: 'Antonio', 'Antonio Bold', Impact, sans-serif;
  --f-body: 'Poppins', system-ui, sans-serif;
  --f-serif: 'Poppins', system-ui, sans-serif;

  --parallax-mul: 1;
  --motion-mul: 1;
}

/* ---------- 1. GLOBAL RESET (scoped) ---------- */
body.mare-page {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.mare-page em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
}
.mare-page strong { font-weight: 600; }

/* ---------- 2. BOOT SPLASH (optional, can be removed) ---------- */
#mare-boot {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease; opacity: 1;
}
#mare-boot.gone { opacity: 0; pointer-events: none; }
#mare-boot .mare-boot-mark {
  font-family: var(--f-display); font-size: clamp(48px, 9vw, 120px);
  letter-spacing: .04em; font-weight: 700;
  color: var(--paper);
}

/* ---------- 3. HERO ---------- */
.mare-hero {
  position: relative;
  min-height: 100svh;
  background: var(--ink) !important;
  color: var(--paper);
  overflow: hidden;
  display: flex !important;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.mare-hero .mare-fx-hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: auto;
}
.mare-hero .mare-fx-hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center bottom, transparent 0%, rgba(7,7,8,.6) 80%),
    linear-gradient(180deg, rgba(7,7,8,.4) 0%, transparent 30%, transparent 70%, rgba(7,7,8,.7) 100%);
  z-index: 1;
  pointer-events: none;
}
.mare-hero > .et_pb_row,
.mare-hero > .et_pb_column,
.mare-hero .mare-hero__inner {
  position: relative;
  z-index: 2;
}
.mare-hero__mark {
  text-align: center;
  margin: 0 auto 2vh;
  will-change: transform, opacity;
}
.mare-hero__mark img,
.mare-hero__mark .hero-mark-logo {
  width: clamp(80px, 14vw, 180px);
  height: auto;
  display: block;
  margin: 0 auto;
}
.mare-hero__payoff {
  font-family: var(--f-display);
  font-weight: 700;
  text-align: center;
  margin: 0;
  font-size: clamp(56px, 14vw, 220px);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: none;
  will-change: transform, opacity;
}
.mare-hero__payoff .hp-line { display: block; }
.mare-hero__payoff .hp-em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -.01em;
}

/* ---------- 4. SECTION HEADINGS (shared) ---------- */
.mare-section-h {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 96px);
  line-height: .96;
  letter-spacing: -.01em;
  margin: 0 0 .4em;
  text-transform: none;
}
.mare-section-h em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
}
.mare-section-sub {
  font-family: var(--f-body);
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.5;
  color: var(--paper-dim);
  max-width: 56ch;
  margin: 0;
}
.mare-kicker {
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--paper-mute);
  display: block;
  margin-bottom: 1.6em;
}

/* ---------- 5. MANIFESTO ---------- */
.mare-manifesto {
  position: relative;
  background: var(--ink) !important;
  color: var(--paper);
  padding: clamp(80px, 14vh, 200px) 0 !important;
  overflow: hidden;
  isolation: isolate;
}
.mare-fx-manifesto-bg {
  position: absolute; inset: -10%;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.mare-fx-manifesto-bg svg { width: 100%; height: 100%; }
.mare-manifesto > .et_pb_row { position: relative; z-index: 1; }
.mare-manifesto .mare-manifesto__headline {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 120px);
  line-height: .94;
  letter-spacing: -.01em;
  margin: 0 0 1em;
  text-transform: none;
}
.mare-manifesto .mare-manifesto__headline em,
.mare-manifesto .mare-manifesto__headline .m-em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
}
.mare-manifesto .m-line {
  display: block;
  will-change: transform, opacity;
}
.mare-manifesto .mare-manifesto__body {
  font-family: var(--f-body);
  font-size: clamp(18px, 1.6vw, 28px);
  line-height: 1.5;
  font-weight: 300;
  max-width: 28ch;
  margin: 2em 0;
}
.mare-manifesto .mare-manifesto__promise {
  font-family: var(--f-display);
  font-size: clamp(28px, 4.2vw, 64px);
  line-height: 1.1;
  font-weight: 600;
  margin: 1.4em 0 0;
}

/* ---------- 6. OUTPUTS ---------- */
.mare-outputs {
  position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, #02050a 100%) !important;
  color: var(--paper);
  padding: clamp(80px, 12vh, 160px) 0 !important;
  overflow: hidden;
  isolation: isolate;
}
.mare-fx-outputs-bg {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
}
.mare-fx-depth-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(255,255,255,.06);
}
.mare-fx-depth-line span {
  position: absolute; left: 24px; top: -8px;
  font-family: var(--f-display);
  font-size: 11px; letter-spacing: .3em;
  color: var(--paper-faint);
}
.mare-fx-light-shaft {
  position: absolute; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.04) 30%, transparent 100%);
}
.mare-outputs > * { position: relative; z-index: 1; }

.mare-fx-archipelago {
  position: relative;
  min-height: 80vh;
  --torch-x: 50%;
  --torch-y: 50%;
}
.mare-fx-archipelago .mare-fx-torch {
  position: absolute; inset: 0;
  background: radial-gradient(circle 240px at var(--torch-x) var(--torch-y),
    rgba(255,255,255,.08) 0%, transparent 80%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* fish items — positioned absolute on desktop */
.mare-fx-fish {
  position: absolute;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  transform-origin: center;
  will-change: transform;
  padding: 12px;
  display: block;
}
.mare-fx-fish .fish-label {
  display: block;
  font-size: clamp(22px, 3.4vw, 56px);
  line-height: 1;
  opacity: .85;
  transition: opacity .3s ease;
  white-space: nowrap;
}
.mare-fx-fish.fish-xl .fish-label { font-size: clamp(28px, 4.6vw, 72px); }
.mare-fx-fish.fish-lg .fish-label { font-size: clamp(26px, 4vw, 64px); }
.mare-fx-fish.fish-md .fish-label { font-size: clamp(22px, 3vw, 48px); }
.mare-fx-fish:hover .fish-label,
.mare-fx-fish.is-lit .fish-label { opacity: 1; }
.mare-fx-fish .fish-hint {
  display: block;
  font-family: var(--f-body);
  font-size: 11px; letter-spacing: .15em;
  color: var(--paper-mute);
  margin-top: .4em;
  opacity: 0; transition: opacity .3s ease;
}
.mare-fx-fish:hover .fish-hint { opacity: 1; }
.mare-fx-fish.is-lit .fish-hint { opacity: .6; }
.mare-fx-fish .fish-services {
  list-style: none;
  margin: 14px 0 0; padding: 0;
  max-height: 0; opacity: 0;
  overflow: hidden;
  transition: max-height .5s ease, opacity .3s ease;
}
.mare-fx-fish.is-lit .fish-services {
  max-height: 320px; opacity: 1;
}
.mare-fx-fish .fish-services li {
  font-family: var(--f-body);
  font-size: 13px; font-weight: 300;
  color: var(--paper-dim);
  padding: 5px 0;
  border-top: 1px solid var(--line);
}

/* mobile: accordion */
@media (max-width: 900px) {
  .mare-fx-archipelago { min-height: auto; }
  .mare-fx-fish {
    position: relative !important;
    left: 0 !important; top: 0 !important;
    display: block;
    width: 100%;
    border-top: 1px solid var(--line);
    padding: 22px 8px;
  }
  .mare-fx-fish .fish-services { max-height: 0; }
  .mare-fx-fish.is-lit .fish-services { max-height: 600px; }
}

/* ---------- 7. INPUTS (capabilities head + rail) ---------- */
.mare-inputs {
  position: relative;
  background: var(--ink) !important;
  color: var(--paper);
  padding: clamp(80px, 12vh, 160px) 0 !important;
}
.mare-inputs__head { margin-bottom: 80px; }

/* block meta (number / name / depth) */
.mare-block__meta {
  display: flex; flex-direction: column;
  gap: 4px; margin-bottom: 32px;
}
.mare-block__ix {
  font-family: var(--f-display); font-size: 12px;
  letter-spacing: .3em; color: var(--paper-mute);
}
.mare-block__name {
  font-family: var(--f-display); font-size: 18px;
  font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
}
.mare-block__depth {
  font-family: var(--f-body); font-size: 12px;
  font-weight: 300; color: var(--paper-faint);
}

/* block headline (shared) */
.mare-block__headline {
  font-family: var(--f-display);
  font-size: clamp(36px, 5.4vw, 88px);
  line-height: .96;
  letter-spacing: -.01em;
  font-weight: 700;
  margin: 0 0 .8em;
  text-transform: none;
}
.mare-block__headline em {
  font-family: var(--f-serif);
  font-style: italic; font-weight: 300;
}
.mare-block__body {
  font-family: var(--f-body); font-weight: 300;
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 1.55;
  color: var(--paper-dim);
  max-width: 50ch;
  margin: 0 0 1em;
}

/* ---------- 8. BLOCK 04 — Hub timeline ---------- */
.mare-block--hub {
  padding: 80px 0 !important;
  border-top: 1px solid var(--line);
}
.mare-fx-timeline {
  --p: 0;
  margin-top: 60px;
  position: relative;
}
.mare-fx-timeline__track {
  height: 2px; background: var(--line);
  position: relative;
  margin-bottom: 32px;
}
.mare-fx-timeline__fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--paper);
  width: calc(var(--p) * 100%);
  transition: width .4s ease;
}
.mare-fx-timeline__phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.mare-fx-timeline__phase {
  opacity: .35;
  transition: opacity .4s ease;
}
.mare-fx-timeline__phase.is-active { opacity: 1; }
.mare-fx-timeline__phase .b4-tick {
  font-family: var(--f-display);
  font-size: 11px;
  color: var(--paper-mute);
  margin-bottom: 4px;
}
.mare-fx-timeline__phase .b4-key {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .12em;
  margin-bottom: 4px;
}
.mare-fx-timeline__phase .b4-task {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--paper-dim);
}
@media (max-width: 900px) {
  .mare-fx-timeline__phases { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- 9. BLOCK 01 — Studio viewfinder ---------- */
.mare-block--studio {
  padding: 80px 0 !important;
  border-top: 1px solid var(--line);
}
.mare-fx-vf-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050608;
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.mare-fx-vf-corner {
  position: absolute; width: 28px; height: 28px;
  border: 2px solid var(--paper);
}
.mare-fx-vf-corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.mare-fx-vf-corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.mare-fx-vf-corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.mare-fx-vf-corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.mare-fx-vf-scene {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(22,105,184,.04) 0%, transparent 70%),
    linear-gradient(180deg, #0a0c10 0%, #050608 100%);
  transition: transform .6s ease-out;
  will-change: transform;
}
.mare-fx-vf-rec {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-size: 11px; letter-spacing: .3em;
  color: var(--paper);
}
.mare-fx-vf-rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e23b3b;
  animation: marePulse 1.4s ease-in-out infinite;
}
@keyframes marePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
.mare-fx-vf-tc {
  position: absolute; top: 24px; right: 24px;
  font-family: 'Courier New', monospace; font-size: 12px;
  color: var(--paper); letter-spacing: .12em;
}
.mare-fx-vf-reticle { position: absolute; inset: 0; pointer-events: none; }
.mare-fx-vf-reticle .r-h, .mare-fx-vf-reticle .r-v {
  position: absolute; background: rgba(255,255,255,.18);
}
.mare-fx-vf-reticle .r-h { left: 49%; right: 49%; top: 24px; bottom: 24px; width: 1px; }
.mare-fx-vf-reticle .r-v { left: 24px; right: 24px; top: 49%; bottom: 49%; height: 1px; }
.mare-fx-vf-histo {
  position: absolute; left: 24px; bottom: 60px;
  display: flex; align-items: flex-end; gap: 2px;
  width: 140px; height: 40px;
}
.mare-fx-vf-histo span {
  display: block; width: 3px;
  background: var(--paper);
  opacity: .5;
}
.mare-fx-vf-level {
  position: absolute; left: 24px; bottom: 36px;
  font-family: 'Courier New', monospace; font-size: 10px;
  color: var(--paper-faint); letter-spacing: .12em;
}
.mare-fx-vf-strip {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 24px;
  display: flex; justify-content: space-between;
  font-family: var(--f-display); font-size: 11px; letter-spacing: .2em;
  color: var(--paper-mute);
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.5);
}
.mare-fx-vf-strip span:not(:first-child) { color: var(--paper-faint); }

.mare-fx-vf-id {
  position: absolute; top: 56px; left: 24px;
  font-family: var(--f-display); color: var(--paper-mute);
  font-size: 11px; letter-spacing: .2em;
  display: flex; flex-direction: column; gap: 2px;
}
.mare-fx-vf-id .vf-id-name { color: var(--paper); font-size: 13px; }
.mare-fx-vf-headline {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 8%;
  text-align: center;
}
.mare-fx-vf-headline h3 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 64px);
  font-weight: 700; line-height: .98;
  margin: 0;
}
.mare-fx-vf-headline em {
  font-family: var(--f-serif);
  font-style: italic; font-weight: 300;
}
.mare-fx-vf-hud {
  position: absolute; top: 100px; bottom: 100px;
  display: flex; flex-direction: column; gap: 22px;
  width: 200px;
}
.mare-fx-vf-hud.vf-hud-l { left: 24px; }
.mare-fx-vf-hud.vf-hud-r { right: 24px; align-items: flex-end; text-align: right; }
.mare-fx-vf-param {
  font-family: var(--f-body);
  cursor: pointer;
  transition: opacity .25s ease;
  position: relative;
}
.mare-fx-vf-param span {
  display: block;
  font-family: var(--f-display); font-size: 10px;
  letter-spacing: .25em; color: var(--paper-mute);
  margin-bottom: 4px;
}
.mare-fx-vf-param b {
  font-family: var(--f-display); font-weight: 600;
  font-size: 18px; color: var(--paper);
  letter-spacing: .04em;
}
.mare-fx-vf-param.is-dim { opacity: .25; }
.mare-fx-vf-param.is-active { opacity: 1; }
.mare-fx-vf-param-detail {
  font-family: var(--f-body); font-size: 12px; font-weight: 300;
  color: var(--paper-dim);
  max-width: 220px; margin-top: 8px;
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease;
}
.mare-fx-vf-param.is-active .mare-fx-vf-param-detail { max-height: 120px; }

/* ---------- 10. BLOCK 02 — Models marquees ---------- */
.mare-block--models {
  padding: 100px 0 !important;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.mare-fx-marquee {
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--paper-ghost);
  text-transform: uppercase;
  user-select: none;
}
.mare-fx-marquee-track {
  display: inline-block;
  animation: mareMarqueeL 32s linear infinite;
}
.mare-fx-marquee-track.reverse {
  animation: mareMarqueeR 32s linear infinite;
}
@keyframes mareMarqueeL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mareMarqueeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.mare-fx-morph {
  position: relative;
  display: inline-block;
  min-height: 1em;
}
.mare-fx-morph-word {
  position: absolute; left: 0; top: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.6,.0,.4,1);
}
.mare-fx-morph-word.is-active {
  opacity: 1; transform: translateY(0);
}
.mare-fx-morph-word:first-child { position: relative; }

/* ---------- 11. BLOCK 03 — AI Lab ---------- */
.mare-block--ailab {
  position: relative;
  padding: clamp(100px, 18vh, 240px) 0 !important;
  background: #02030a !important;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.mare-fx-ailab-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.mare-fx-ailab-bg canvas {
  width: 100%; height: 100%;
}
.mare-fx-ailab-brain {
  position: absolute; left: 50%; top: 50%;
  width: 60vw; height: 60vw;
  max-width: 700px; max-height: 700px;
  transform: translate(-50%, -50%);
  z-index: 1;
  will-change: transform;
}
.mare-fx-ailab-brain canvas {
  width: 100%; height: 100%;
}
.mare-block--ailab > * { position: relative; z-index: 2; }

.mare-fx-ailab-tag {
  position: absolute;
  font-family: var(--f-display); font-size: 11px;
  letter-spacing: .25em; color: var(--paper-mute);
  z-index: 3;
}
.mare-fx-ailab-tag.tl { top: 40px; left: 40px; }
.mare-fx-ailab-tag.tr { top: 40px; right: 40px; }
.mare-fx-ailab-tag.bl { bottom: 40px; left: 40px; }
.mare-fx-ailab-tag.br { bottom: 40px; right: 40px; }

.mare-fx-ailab-tape {
  display: flex; gap: 32px; flex-wrap: wrap;
  font-family: 'Courier New', monospace; font-size: 11px;
  color: var(--paper-faint); letter-spacing: .12em;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .mare-fx-ailab-tag { display: none; }
  .mare-fx-ailab-brain { opacity: .55; }
}

/* ---------- 12. WHERE — map ---------- */
.mare-where {
  position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, #020610 100%) !important;
  padding: clamp(80px, 14vh, 200px) 0 !important;
  overflow: hidden;
  isolation: isolate;
}
.mare-fx-map {
  position: relative;
  min-height: 90vh;
  --mx: 0; --my: 0;
}
.mare-fx-map-caustics {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: .8; pointer-events: none;
}
.mare-fx-map-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.mare-fx-map-layers {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transform: translate(calc(var(--mx) * 12px), calc(var(--my) * 12px));
  transition: transform .8s ease-out;
}
.mare-fx-map-svg {
  width: min(640px, 70vw);
  height: auto;
  max-height: 90vh;
}
.mare-fx-map-info {
  position: absolute; bottom: 40px; left: 40px;
  z-index: 4;
  font-family: var(--f-body);
}
.mare-fx-map-info .mi-num {
  font-family: var(--f-display);
  font-size: 11px; letter-spacing: .25em;
  color: var(--paper-mute);
}
.mare-fx-map-info .mi-label {
  font-family: var(--f-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: .04em;
  margin: 4px 0;
}
.mare-fx-map-info .mi-sub {
  font-size: 12px; font-weight: 300;
  color: var(--paper-faint);
}
.mare-fx-map-tag {
  position: absolute; bottom: 40px; right: 40px;
  z-index: 4;
  font-family: var(--f-display); font-size: 11px;
  letter-spacing: .25em; color: var(--paper-mute);
}
.mare-where__overlay {
  position: relative; z-index: 3;
}
.mare-where__overlay .mare-section-h {
  font-size: clamp(40px, 6vw, 96px);
}

/* ---------- 13. CONTACTS ---------- */
.mare-contacts {
  position: relative;
  background: var(--ink) !important;
  padding: clamp(80px, 12vh, 160px) 0 !important;
  overflow: hidden;
  isolation: isolate;
}
.mare-fx-contacts-bg {
  position: absolute; inset: -10%;
  z-index: 0; pointer-events: none;
}
.mare-fx-contacts-bg svg { width: 100%; height: 100%; }
.mare-contacts > * { position: relative; z-index: 1; }

.mare-contacts__h {
  font-family: var(--f-display);
  font-size: clamp(48px, 9vw, 140px);
  line-height: .94; font-weight: 700;
  margin: 0;
}
.mare-contacts__h em {
  font-family: var(--f-serif);
  font-style: italic; font-weight: 300;
}

/* Hooks for Divi contact form fields — Adela classes these */
.mare-contacts .et_pb_contact_form,
.mare-contacts form {
  font-family: var(--f-body);
}
.mare-contacts label > span,
.mare-contacts .et_pb_contact_field_label {
  font-family: var(--f-display);
  font-size: 11px; letter-spacing: .25em;
  color: var(--paper-mute);
  text-transform: uppercase;
  display: block; margin-bottom: 6px;
}
.mare-contacts input[type="text"],
.mare-contacts input[type="email"],
.mare-contacts input[type="tel"],
.mare-contacts textarea,
.mare-contacts select,
.mare-contacts .et_pb_contact_form input,
.mare-contacts .et_pb_contact_form textarea,
.mare-contacts .et_pb_contact_form select {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line-2) !important;
  border-radius: 0 !important;
  color: var(--paper) !important;
  font-family: var(--f-body) !important;
  font-size: 16px !important;
  padding: 12px 0 !important;
  width: 100%;
  box-shadow: none !important;
}
.mare-contacts input:focus,
.mare-contacts textarea:focus,
.mare-contacts select:focus {
  outline: none;
  border-bottom-color: var(--paper) !important;
}
.mare-contacts ::placeholder { color: var(--paper-faint); }
.mare-contacts button[type=submit],
.mare-contacts .et_pb_button {
  background: transparent !important;
  border: 1px solid var(--paper) !important;
  color: var(--paper) !important;
  font-family: var(--f-display) !important;
  font-size: 14px !important;
  letter-spacing: .25em !important;
  text-transform: uppercase !important;
  padding: 18px 40px !important;
  cursor: pointer;
  transition: background .3s ease, color .3s ease !important;
}
.mare-contacts button[type=submit]:hover,
.mare-contacts .et_pb_button:hover {
  background: var(--paper) !important;
  color: var(--ink) !important;
}

/* ---------- 14. FOOTER ---------- */
.mare-footer {
  background: #020203 !important;
  padding: 40px 0 !important;
  border-top: 1px solid var(--line);
  font-family: var(--f-body);
  color: var(--paper-mute);
  font-size: 12px;
}
.mare-footer .fs-mark {
  font-family: var(--f-display);
  font-size: 18px; font-weight: 600;
  letter-spacing: .12em;
  color: var(--paper);
}
.mare-footer .fs-sub {
  display: block;
  font-family: var(--f-body); font-size: 11px;
  letter-spacing: .15em; color: var(--paper-faint);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- 15. NAV (Divi-rendered, we style) ---------- */
.mare-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(7,7,8,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px !important;
}
.mare-nav .nav-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--paper);
}
.mare-nav .nav-brand img { height: 32px; width: auto; }
.mare-nav .nav-brand .sub {
  font-family: var(--f-body); font-size: 10px;
  letter-spacing: .15em; color: var(--paper-mute);
  text-transform: uppercase;
}
.mare-nav .nav-links { display: flex; gap: 28px; }
.mare-nav .nav-links a {
  font-family: var(--f-display);
  font-size: 13px; letter-spacing: .12em;
  color: var(--paper-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .25s ease;
}
.mare-nav .nav-links a:hover { color: var(--paper); }
.mare-nav .nav-cta {
  font-family: var(--f-display);
  font-size: 12px; letter-spacing: .15em;
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--paper);
  padding: 8px 16px;
  transition: background .25s ease, color .25s ease;
}
.mare-nav .nav-cta:hover {
  background: var(--paper); color: var(--ink);
}
@media (max-width: 900px) {
  .mare-nav .nav-links, .mare-nav .nav-cta { display: none; }
}

/* ---------- 16. BACK-TO-TOP ---------- */
.mare-fx-totop {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(7,7,8,.8);
  border: 1px solid var(--paper);
  color: var(--paper);
  font-family: var(--f-display);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease, background .25s ease;
  pointer-events: none;
}
.mare-fx-totop.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mare-fx-totop:hover { background: var(--paper); color: var(--ink); }
.mare-fx-totop .ntt-arrow { font-size: 16px; }
.mare-fx-totop .ntt-label { font-size: 8px; letter-spacing: .15em; }

/* ---------- 17. CUSTOM CURSOR ---------- */
@media (hover: hover) and (pointer: fine) {
  .mare-page, .mare-page * { cursor: none !important; }
  .mare-page input, .mare-page textarea, .mare-page select { cursor: text !important; }
}
.mare-fx-cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
}
.mare-fx-cursor-dot, .mare-fx-cursor-ring, .mare-fx-cursor-label {
  position: absolute; top: 0; left: 0;
  pointer-events: none;
  will-change: transform;
}
.mare-fx-cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--paper);
  border-radius: 50%;
  mix-blend-mode: difference;
}
.mare-fx-cursor-ring {
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease, margin .25s ease;
}
.mare-fx-cursor.has-label .mare-fx-cursor-ring {
  width: 60px; height: 60px;
  margin: -30px 0 0 -30px;
}
.mare-fx-cursor-label {
  font-family: var(--f-display);
  font-size: 11px; letter-spacing: .2em;
  color: var(--paper);
  text-transform: uppercase;
  background: var(--ink);
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s ease;
}
.mare-fx-cursor.has-label .mare-fx-cursor-label { opacity: 1; }
@media (pointer: coarse) { .mare-fx-cursor { display: none; } }

/* ---------- 18. DIVE OVERLAY ---------- */
.mare-fx-dive {
  position: fixed; inset: 0;
  z-index: 9998;
  background: rgba(7,7,8,0);
  pointer-events: none;
  transition: background .8s ease;
}
.mare-fx-dive.active { background: rgba(7,7,8,.92); }
.mare-fx-dive canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.mare-fx-dive-rays {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg,
      transparent 0px, transparent 80px,
      rgba(255,255,255,.02) 80px, rgba(255,255,255,.02) 82px);
  opacity: 0;
  transition: opacity .8s ease;
}
.mare-fx-dive.active .mare-fx-dive-rays { opacity: 1; }
.mare-fx-dive-label {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-family: var(--f-display); font-size: 13px;
  letter-spacing: .35em; color: var(--paper);
  text-transform: uppercase;
  opacity: 0; transition: opacity .8s ease;
}
.mare-fx-dive.active .mare-fx-dive-label { opacity: .7; }

/* ---------- 19. BUBBLE LAYER (form submit pop) ---------- */
.mare-fx-bubble-layer {
  position: fixed; inset: 0;
  z-index: 9997;
  pointer-events: none;
  overflow: hidden;
}
.mare-fx-pop-bubble {
  position: absolute;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.4) 0%, transparent 60%);
  animation: marePopBubble var(--dur, 3s) var(--delay, 0s) cubic-bezier(.3,.7,.4,1) forwards;
}
@keyframes marePopBubble {
  0%   { transform: translate(0, 0) scale(.4); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, -100vh)) scale(1); opacity: 0; }
}

/* ---------- 20. PERF GATES (skip heavy on low/reduced-motion) ---------- */
[data-perf-tier="low"] .mare-fx-manifesto-bg svg,
[data-perf-tier="low"] .mare-fx-contacts-bg svg { display: none; }
[data-reduced-motion="true"] .mare-fx-marquee-track,
[data-reduced-motion="true"] .mare-fx-vf-rec-dot { animation: none !important; }
[data-reduced-motion="true"] .mare-fx-ailab-brain { display: none; }
