/* ============================================================
   OPERAÇÃO MARÍTIMO — Animations v1.0
   Nautical identity — Sonar, wave pulse, depth effects
   ============================================================ */

/* ─────────────────────────────────────
   SCROLL REVEAL
   ───────────────────────────────────── */

[data-animate] {
  opacity: 0;
  will-change: opacity, transform;
}

[data-animate="fade-up"] {
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--stagger, 0) * 0.15s);
}

[data-animate="fade-in"] {
  transform: none;
  transition: opacity 0.9s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────
   BUTTON HOVER
   ───────────────────────────────────── */

/* CSS Houdini — rotating conic-gradient angle */
@property --btn-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes btnBorderSpin {
  to { --btn-angle: 360deg; }
}

.btn--primary {
  background:
    linear-gradient(135deg, #00C9E8 0%, #0096B0 100%) padding-box,
    conic-gradient(
      from var(--btn-angle),
      #0096B0                0deg,
      #00B8D4               70deg,
      rgba(200, 245, 255, 1) 145deg,
      #00B8D4               220deg,
      #0096B0               360deg
    ) border-box;
  border: 2px solid transparent;
  border-radius: 999px;
  animation: btnBorderSpin 2.8s linear infinite;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              filter 0.3s ease;
  box-shadow: 0 0 14px rgba(0, 201, 232, 0.2), 0 4px 20px rgba(0, 201, 232, 0.12);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 201, 232, 0.4), 0 8px 30px rgba(0, 201, 232, 0.2);
  filter: brightness(1.08);
}

.btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn--whatsapp:hover {
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary {
    animation: none;
    background: var(--gradient-ocean) padding-box,
                linear-gradient(rgba(0,201,232,0.5), rgba(0,201,232,0.5)) border-box;
  }
}

/* ─────────────────────────────────────
   SECTION HEADER — Ocean line reveal
   ───────────────────────────────────── */

.section__header::after {
  width: 0;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.section__header.animate-in::after {
  width: 60px;
}

/* ─────────────────────────────────────
   EYEBROW — Clip reveal
   ───────────────────────────────────── */

.section__eyebrow {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.3s;
}

.section__header.animate-in .section__eyebrow {
  clip-path: inset(0 0% 0 0);
}

/* ─────────────────────────────────────
   SECTION TITLE — Subtle fade-up
   ───────────────────────────────────── */

.section__header .section__title {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease 0.5s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.section__header.animate-in .section__title {
  opacity: 1;
  transform: translateY(0);
}

.section__header .section__subtitle {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease 0.7s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s;
}

.section__header.animate-in .section__subtitle {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────
   FAQ ITEMS
   ───────────────────────────────────── */

.faq__item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--faq-index, 0) * 0.12s);
}

.faq__item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────
   CARD HOVERS
   ───────────────────────────────────── */

.testimonial {
  background: rgba(0, 201, 232, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(0, 201, 232, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 201, 232, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0, 201, 232, 0.06);
  border-color: rgba(0, 201, 232, 0.18);
}

/* ─────────────────────────────────────
   CURSO CARD — Nautical glass
   ───────────────────────────────────── */

.curso-card {
  display: flex;
  flex-direction: column;
  background: rgba(0, 201, 232, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 201, 232, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: var(--color-white);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 201, 232, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.curso-card::before {
  content: '';
  position: absolute;
  inset: 0;
  filter: url(#glass-noise);
  opacity: 0.03;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
}

.curso-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 201, 232, 0.20);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(0, 201, 232, 0.05),
    inset 0 1px 0 rgba(0, 201, 232, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.curso-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.curso-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.curso-card:hover .curso-card__image {
  transform: scale(1.05);
}

.curso-card__body {
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.curso-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.curso-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────
   PRICE BOX
   ───────────────────────────────────── */

.price-box {
  background: rgba(0, 201, 232, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(0, 201, 232, 0.10);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 201, 232, 0.06);
}

.price-box:hover {
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(0, 201, 232, 0.1);
  border-color: rgba(0, 201, 232, 0.20);
}

/* ─────────────────────────────────────
   DIFF ITEM HOVER
   ───────────────────────────────────── */

.diff-item {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.diff-item:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ─────────────────────────────────────
   WHATSAPP FLOAT
   ───────────────────────────────────── */

.whatsapp-float:hover {
  transform: scale(1.08);
}

/* ─────────────────────────────────────
   NAV LINK
   ───────────────────────────────────── */

.nav__link::after {
  transition: width 0.3s ease;
}

/* ═════════════════════════════════════
   NAUTICAL EFFECTS
   ═════════════════════════════════════ */

/* ─────────────────────────────────────
   HUD CORNERS — Targeting brackets (ocean color)
   ───────────────────────────────────── */

.section__header--hud {
  position: relative;
  padding: var(--space-6);
}

.hud-corner--tl,
.hud-corner--tr,
.hud-corner--bl,
.hud-corner--br {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
  pointer-events: none;
}

.hud-corner--tl {
  top: 0; left: 0;
  border-top: 2px solid var(--color-ocean);
  border-left: 2px solid var(--color-ocean);
}

.hud-corner--tr {
  top: 0; right: 0;
  border-top: 2px solid var(--color-ocean);
  border-right: 2px solid var(--color-ocean);
}

.hud-corner--bl {
  bottom: 0; left: 0;
  border-bottom: 2px solid var(--color-ocean);
  border-left: 2px solid var(--color-ocean);
}

.hud-corner--br {
  bottom: 0; right: 0;
  border-bottom: 2px solid var(--color-ocean);
  border-right: 2px solid var(--color-ocean);
}

.section__header--hud.animate-in .hud-corner--tl,
.section__header--hud.animate-in .hud-corner--tr,
.section__header--hud.animate-in .hud-corner--bl,
.section__header--hud.animate-in .hud-corner--br {
  opacity: 0.45;
}

/* ─────────────────────────────────────
   NAUTICAL SECTION — Base
   ───────────────────────────────────── */

.section--nautical {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2,9,18,0.88) 0%, rgba(3,15,32,0.92) 50%, rgba(2,9,18,0.88) 100%),
    var(--gradient-depth);
}

.section--alt.section--nautical {
  background:
    linear-gradient(180deg, rgba(3,12,24,0.90) 0%, rgba(5,18,36,0.85) 50%, rgba(3,12,24,0.90) 100%);
}

.section--nautical > .container {
  position: relative;
  z-index: 2;
}

/* ─────────────────────────────────────
   SONAR SWEEP — Horizontal ocean pulse
   ───────────────────────────────────── */

@keyframes sonarSweep {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.section--nautical::after {
  content: '';
  position: absolute;
  left: 0;
  top: -2px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 201, 232, 0.04) 10%,
    rgba(0, 201, 232, 0.25) 50%,
    rgba(0, 201, 232, 0.04) 90%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(0, 201, 232, 0.12),
              0 0 60px rgba(0, 201, 232, 0.04);
  animation: sonarSweep 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* ─────────────────────────────────────
   HERO ANIMATIONS
   ───────────────────────────────────── */

@keyframes heroDepthReveal {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Cada linha do título entra da esquerda com fade */
@keyframes heroLineIn {
  0%   { opacity: 0; transform: translateX(-48px) skewX(-4deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0)    skewX(0deg); }
}

@keyframes waveRipple {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  50% { transform: scaleX(1.01) scaleY(0.99); }
}

@keyframes compassRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes depthPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 201, 232, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(0, 201, 232, 0); }
}

@keyframes sonarRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ─────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .section--nautical::after {
    animation: none;
  }
}
