/* ==========================================================================
   Distribuciones JN Roque — static site stylesheet
   All fonts, colours and assets are local. No external dependencies.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0a2032;
  --navy-deep: #061524;
  --teal: #1c7a8c;
  --teal-light: #7fc3cc;
  --sand: #e6d8bf;
  --sand-soft: #f3ece0;
  --paper: #faf8f4;
  --ink: #14212c;
  --ink-soft: #4c5c68;
  --line: #dcd5c8;
  --white: #ffffff;
  --maxw: 1200px;
  --radius: 2px;
  --shadow: 0 18px 40px -24px rgba(6, 21, 36, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
}
h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.1em;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 14px;
}

.lead {
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section {
  padding: 92px 0;
}
.section--tight {
  padding: 64px 0;
}
.section--sand {
  background: var(--sand-soft);
}
.section--navy {
  background: var(--navy);
  color: #cfe0e6;
}
.section--navy h2,
.section--navy h3 {
  color: var(--white);
}
.section--navy .lead {
  color: #a9c2cc;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- Header ---------- */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  z-index: 60;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: auto;
  height: 46px;
  border-radius: 4px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  white-space: nowrap;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
}
.brand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav a {
  color: var(--ink);
  white-space: nowrap;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  text-decoration: none;
  border-bottom-color: var(--teal-light);
}
.nav a.is-active {
  border-bottom-color: var(--teal);
  color: var(--navy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 9px 11px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
}
.btn--light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.btn--light:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--navy-deep);
  overflow: hidden;
}
.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 21, 36, 0.12) 0%,
    rgba(6, 21, 36, 0.32) 45%,
    rgba(6, 21, 36, 0.86) 100%
  );
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding-top: 130px;
  padding-bottom: 128px;
}
.hero h1 {
  color: #fff;
  max-width: 16ch;
}
.hero p {
  color: #cbdbe3;
  max-width: 54ch;
  font-size: 1.14rem;
}
.hero-cta {
  margin-top: 26px;
}

.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 128px 0 72px;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.02) brightness(1.12);
  will-change: transform;
  pointer-events: none;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 21, 36, 0.86) 0%, rgba(6, 21, 36, 0.55) 45%, rgba(6, 21, 36, 0.18) 100%),
    linear-gradient(180deg, rgba(9, 32, 46, 0.3), rgba(9, 32, 46, 0.7));
  pointer-events: none;
}
.page-hero .wrap {
  position: relative;
  z-index: 2;
}
.page-hero::before {
  content: "";
  z-index: 3;
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 195, 204, 0.22), transparent 70%);
}
.page-hero h1 {
  color: #fff;
  max-width: 18ch;
  position: relative;
}
.page-hero p {
  color: #a9c2cc;
  max-width: 60ch;
  position: relative;
}

/* ---------- Grids & cards ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid {
  counter-reset: feat;
}

.card {
  position: relative;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 26px 0 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--teal), transparent);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}
.card.is-visible::before,
.reveal.is-visible .card::before {
  width: 100%;
}
.card:hover {
  transform: translateY(-6px);
}
.card:hover::before {
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
}
.card h3 {
  margin-bottom: 0.4em;
  font-size: 1.12rem;
}
.card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.97rem;
}
.card .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .icon {
  transform: translateY(-3px) scale(1.08);
}
.card:has(.icon) .num,
.card-num {
  display: block;
}
.card:has(.icon)::after {
  counter-increment: feat;
  content: counter(feat, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: 18px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--teal) 40%, transparent);
  letter-spacing: 0.02em;
}

/* staggered entrance inside grids */
.grid > .reveal:nth-child(2) {
  transition-delay: 0.09s;
}
.grid > .reveal:nth-child(3) {
  transition-delay: 0.18s;
}
.grid > .reveal:nth-child(4) {
  transition-delay: 0.27s;
}
.grid > .reveal:nth-child(5) {
  transition-delay: 0.36s;
}
.grid > .reveal:nth-child(6) {
  transition-delay: 0.45s;
}

.section--navy .card {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.16);
}
.section--navy .card p {
  color: #a9c2cc;
}
.section--navy .card:has(.icon)::after {
  color: rgba(127, 195, 204, 0.55);
}

/* species cards */
.species {
  background: transparent;
  border: 0;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.species:hover {
  transform: translateY(-6px);
}
.species .species-media {
  border-radius: 2px;
}

.species img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.species-body {
  padding: 18px 0 6px;
}
.species-body h3 {
  margin-bottom: 4px;
}
.species-latin {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin: 0 0 10px;
}
.species-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.species-meta li {
  padding: 5px 0;
  border-top: 1px solid var(--line);
}

/* split media/text */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
}
.split--reverse .split-media {
  order: 2;
}
.split--top {
  align-items: start;
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 40px;
}
.stat-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.6rem;
  color: var(--teal-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fb7c2;
  margin-top: 8px;
}

/* timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 34px 28px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
}
.timeline .year {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  color: var(--navy);
  display: block;
}
.timeline p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

/* steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 62px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: var(--teal);
}
.steps h3 {
  margin-bottom: 2px;
}
.steps p {
  margin: 0;
  color: var(--ink-soft);
}
.section--navy .steps p {
  color: #a9c2cc;
}

/* table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}
th {
  background: var(--sand-soft);
  font-weight: 700;
  color: var(--navy);
}
tbody tr:last-child td {
  border-bottom: 0;
}

/* form */
.form {
  display: grid;
  gap: 18px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.97rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--teal-light);
  outline-offset: 1px;
  border-color: var(--teal);
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

/* CTA band */
.cta-band {
  background: var(--teal);
  color: #fff;
  padding: 66px 0;
  text-align: center;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: #dff0f3;
  max-width: 56ch;
  margin-inline: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #97b0bd;
  padding: 66px 0 28px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 34px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li {
  margin-bottom: 9px;
}
.site-footer a {
  color: #97b0bd;
}
.site-footer a:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.footer-brand img {
  width: auto;
  height: 64px;
  border-radius: 4px;
  margin-bottom: 14px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.99);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (max-width: 760px) {
  .grid > .reveal:nth-child(n) {
    transition-delay: 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card:hover,
  .species:hover,
  .btn:hover {
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1150px) and (min-width: 1001px) {
  .brand-tag {
    display: none;
  }
  .brand-name {
    font-size: 0.98rem;
  }
  .header-inner {
    gap: 14px;
  }
  .nav {
    gap: 14px;
  }
  .nav a {
    font-size: 0.86rem;
  }
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav a:hover,
  .nav a.is-active {
    border-bottom-color: var(--line);
    color: var(--teal);
  }
  .brand-tag {
    display: none;
  }
  .header-inner {
    gap: 14px;
  }
}

@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split--reverse .split-media {
    order: 0;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .brand-name {
    font-size: 0.82rem;
  }
  .brand img {
    height: 40px;
  }
  body {
    font-size: 16px;
  }
  .section {
    padding: 62px 0;
  }
  .hero {
    min-height: 68vh;
  }
  .hero .wrap {
    padding-top: 90px;
    padding-bottom: 54px;
  }
  .page-hero {
    padding: 96px 0 56px;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Parallax imagery ---------- */
.split-media,
.species-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.split-media img,
.species-media img {
  display: block;
  transform: translate3d(0, 0, 0) scale(1.52);
  will-change: transform;
  border-radius: 0;
}
.species-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.hero img.hero-bg {
  transform: scale(1.52);
  will-change: transform;
}
.page-hero-bg {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .split-media img,
  .species-media img,
  .hero img.hero-bg {
    transform: none !important;
    scale: 1 !important;
  }
}

/* ---------- Animated hero ---------- */
.hero-media {
  position: absolute;
  inset: -2%;
  overflow: hidden;
  animation: heroDrift 26s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.4%, -1%, 0); }
}
.hero .hero-media img.hero-bg { opacity: 0.9; filter: brightness(1.16) saturate(1.08) contrast(1.02); }
.hero-sheen {
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(127, 195, 204, 0.16) 48%,
    rgba(255, 255, 255, 0.14) 52%,
    transparent 62%
  );
  transform: translate3d(-40%, 0, 0);
  animation: heroSheen 11s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes heroSheen {
  0%, 55% { transform: translate3d(-45%, 0, 0); }
  100%    { transform: translate3d(45%, 0, 0); }
}
.hero-glow {
  position: absolute;
  left: 50%;
  top: -25%;
  width: 90vw;
  max-width: 1100px;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(127, 195, 204, 0.28), transparent 62%);
  animation: heroPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes heroPulse {
  from { opacity: 0.45; transform: translateX(-50%) scale(0.92); }
  to   { opacity: 0.85; transform: translateX(-50%) scale(1.06); }
}

/* Rippling underwater caustics over the photo */
.hero-caustics {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.5;
  background:
    radial-gradient(closest-side, rgba(160, 220, 228, 0.22), transparent 70%) 12% 22% / 46% 38% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent 70%) 74% 34% / 40% 32% no-repeat,
    radial-gradient(closest-side, rgba(127, 195, 204, 0.2), transparent 70%) 48% 78% / 52% 40% no-repeat;
  animation: heroCaustics 17s ease-in-out infinite alternate;
}
@keyframes heroCaustics {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1.02); opacity: 0.35; }
  50%  { transform: translate3d(1.5%, 1.5%, 0) scale(1.08); opacity: 0.6; }
  100% { transform: translate3d(-1%, 2%, 0) scale(1.04); opacity: 0.42; }
}

.hero-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  line-height: 0;
  pointer-events: none;
}
.hero-waves {
  height: 190px;
}
.hero-wave-canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -12px 26px rgba(6, 21, 36, 0.45));
}
.hero-waves.has-canvas svg { display: none !important; }
.hero-waves svg {
  display: block;
  width: 260%;
  height: 120px;
  animation: heroWave 18s linear infinite;
}
.hero-waves svg.wave-2 {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.55;
  height: 96px;
  animation: heroWaveAlt 26s linear infinite;
}
.hero-waves svg.wave-3 {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.7;
  height: 110px;
  animation: heroWave 34s linear infinite;
}
@keyframes heroWave {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(-25%, 7px, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes heroWaveAlt {
  0%   { transform: translate3d(-50%, 0, 0); }
  50%  { transform: translate3d(-25%, -6px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.hero-line {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  animation: heroIn 0.9s cubic-bezier(0.22, 0.8, 0.28, 1) forwards;
}
.hero-line:nth-child(1) { animation-delay: 0.15s; }
.hero-line:nth-child(2) { animation-delay: 0.3s; }
.hero-line:nth-child(3) { animation-delay: 0.45s; }
.hero-line:nth-child(4) { animation-delay: 0.6s; }
@keyframes heroIn {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hero h1 {
  text-shadow: 0 2px 30px rgba(6, 21, 36, 0.55);
}
.hero h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-light), transparent);
  transform-origin: left;
  animation: heroRule 1s cubic-bezier(0.22, 0.8, 0.28, 1) 0.7s both;
}
@keyframes heroRule {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.hero-scroll {
  position: relative;
  z-index: 4;
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fc0cd;
  opacity: 0;
  animation: heroIn 0.9s cubic-bezier(0.22, 0.8, 0.28, 1) 0.85s forwards;
}
.hero-scroll i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--teal-light), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll i::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 14px;
  background: #fff;
  animation: heroScrollDot 2.2s ease-in-out infinite;
}
@keyframes heroScrollDot {
  0%   { transform: translateY(-16px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(42px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media,
  .hero-sheen,
  .hero-caustics,
  .hero-glow,
  .hero-waves svg,
  .hero h1::after,
  .hero-scroll i::after {
    animation: none !important;
  }
  .hero-line,
  .hero-scroll {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* Mobile parallax: lighter zoom (matches the JS-applied scale) and no
   continuously animating hero layers, so phones only composite small deltas. */
@media (max-width: 760px), (pointer: coarse) {
  .split-media img,
  .species-media img {
    transform: translate3d(0, 0, 0) scale(1.30);
  }
  .hero img.hero-bg {
    transform: scale(1.28);
  }
  .hero-caustics { opacity: 0.35; animation-duration: 24s; }
  .hero-waves { height: 130px; }
  .hero-waves svg.wave-3 { display: none; }
  .hero-media,
  .hero-sheen,
  .hero-glow {
    animation: none;
  }
  .hero-sheen {
    display: none;
  }
  .hero-waves svg {
    width: 200%;
    height: 72px;
    animation-duration: 26s;
  }
  .hero-waves svg.wave-2 {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-text {
    display: none;
  }
  .brand img {
    height: 38px;
  }
}

/* Responsive <picture> wrappers should not affect layout */
picture { display: contents; }
img { max-width: 100%; }

/* ---------- Cinematic image reveals ---------- */
.split-media::after,
.species-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--navy);
  transform: translate3d(0, 0, 0);
  transition: transform 0.8s cubic-bezier(0.16, 0.84, 0.28, 1);
  pointer-events: none;
}
.split-media.media-in::after,
.species-media.media-in::after {
  transform: translate3d(0, -101%, 0);
}
.split-media img,
.species-media img {
  opacity: 0.35;
  transition: opacity 0.75s ease 0.1s;
}
.split-media.media-in img,
.species-media.media-in img {
  opacity: 1;
}

/* Slow Ken Burns drift on page hero photos (composes with parallax translate) */
.page-hero-bg {
  animation: kenburns-slow 22s ease-in-out infinite alternate;
}
@keyframes kenburns-slow {
  from {
    scale: 1.06;
  }
  to {
    scale: 1.16;
  }
}

@media (max-width: 760px) {
  .page-hero-bg {
    animation-duration: 30s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .split-media::after,
  .species-media::after {
    display: none;
  }
  .split-media img,
  .species-media img {
    opacity: 1;
    transition: none;
  }
  .page-hero-bg {
    animation: none;
  }
}

/* Honeypot field — hidden from humans, visible to naive bots */
.form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#form-status[data-state="ok"] { color: var(--teal-light); }
#form-status[data-state="error"] { color: #ffb4a8; }

/* Contact email helper notes */
.site-footer ul li small,
.contact-list small {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.65;
}
.contact-list small { margin-bottom: 10px; }
