/**
 * WaveFront — global styles & animation hooks.
 * Tailwind handles utilities; this file holds custom patterns and wave tokens.
 *
 * Color system (defined in Tailwind config):
 *   blue.*    — brand scale (anchor: blue-300 #38bdf8)
 *   surface.* — neutral backgrounds
 *   ink.*     — text / foreground
 *   warm.*    — pink accent
 *   gold.*    — gold accent
 */

:root {
  --wave-1: rgba(186, 230, 253, 0.80);  /* sky-200 — clearly visible back layer */
  --wave-2: rgba(56,  189, 248, 0.75);  /* sky-400 — mid layer */
  --wave-3: rgba(14,  165, 233, 0.90);  /* sky-500 — rich front layer */
}

/* ── Icon font ── */

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.material-symbols-outlined[data-weight="fill"] {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ── Decorative shapes ── */

.wavy-separator {
  mask-image: url("data:image/svg+xml,%3Csvg width='1440' height='100' viewBox='0 0 1440 100' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50C200 100 400 0 720 50C1040 100 1240 0 1440 50V100H0V50Z' fill='black'/%3E%3C/svg%3E");
  mask-size: cover;
  mask-repeat: no-repeat;
}

.organic-blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* ── FAQ accordion (grid height transition) ── */

[data-faq-panel] {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

[data-faq-item].is-open [data-faq-panel] {
  grid-template-rows: 1fr;
}

[data-faq-item] [data-faq-chevron] {
  transition: transform 0.3s ease;
}

[data-faq-item].is-open [data-faq-chevron] {
  transform: rotate(180deg);
}

/* ── Canvas wave layer ── */

#wave-canvas {
  display: block;
  width: 100%;
  height: 220px;
  background: #e8f6fe;
  pointer-events: none;
}

.wavefront-root {
  position: relative;
  z-index: 1;
}

/* ── Accessibility ── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #0c4a6e;   /* blue-900 */
  border-radius: 0.5rem;
  z-index: 100;
  outline: 2px solid #0284c7; /* blue-700 */
}

/* ── Mobile nav ── */

.nav-panel[hidden] {
  display: none !important;
}

/* ── Motion ── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── About: Water Safety star diagram ── */

.water-safety-frame {
  position: relative;
  width: 100%;
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.water-safety-star {
  display: block;
  width: 12.5rem;
  height: auto;
  margin-top: 3rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
  /* Layered depth + soft brand glow (follows non-rectangular star shape) */
  filter: drop-shadow(0 1px 2px rgba(12, 74, 110, 0.18))
    drop-shadow(0 6px 16px rgba(12, 74, 110, 0.14))
    drop-shadow(0 14px 36px rgba(12, 74, 110, 0.1))
    drop-shadow(0 0 28px rgba(21, 169, 234, 0.22))
    drop-shadow(0 0 56px rgba(21, 169, 234, 0.08));
}

.water-safety-point {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
  text-align: left;
}

@media (min-width: 1024px) {
  .water-safety-frame {
    min-height: 41rem;
    padding-bottom: 2rem;
  }

  .water-safety-star {
    position: absolute;
    left: 50%;
    top: calc(50% + 2.25rem);
    width: 18rem;
    margin-top: 0;
    margin-bottom: 0;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
  }

  .water-safety-point {
    position: absolute;
    z-index: 2;
    width: min(100%, 15.75rem);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }

  .water-safety-point--top {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
  }

  .water-safety-point--tl {
    left: 0;
    top: 23%;
    text-align: right;
    padding-right: 0.25rem;
  }

  .water-safety-point--bl {
    left: 0;
    bottom: 12%;
    text-align: right;
    padding-right: 0.25rem;
  }

  .water-safety-point--tr {
    right: 0;
    top: 23%;
    text-align: left;
    padding-left: 0.25rem;
  }

  .water-safety-point--br {
    right: 0;
    bottom: 12%;
    text-align: left;
    padding-left: 0.25rem;
  }
}
