/* ============================================================
   C00L — Bonaire Dive Log
   Concept: scrollen = afdalen. Licht caribisch blauw aan de
   oppervlakte, bijna zwart op de bodem.
   ============================================================ */

:root {
  --surface: #0a7ea4;
  --mid: #064e74;
  --deep: #021526;
  --abyss: #010a14;
  --foam: #eaf6fb;
  --accent: #35e0c5;
  --accent-2: #ffd166;
  --card: rgba(8, 40, 64, 0.55);
  --card-border: rgba(120, 220, 255, 0.18);
  --radius: 18px;
  --font: "Avenir Next", "Helvetica Neue", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  color: var(--foam);
  background: var(--deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- fixed layers ---------- */

#ocean {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

#depth-tint {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--abyss));
  opacity: 0;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 14px;
  pointer-events: none;
}

.hud__brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
.hud__brand span { color: var(--accent); }

.hud__depth {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  background: rgba(2, 21, 38, 0.45);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hud__depth-value { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.hud__depth-unit { font-size: 0.8rem; opacity: 0.7; }

/* ---------- content ---------- */

main { position: relative; z-index: 10; }

section { padding: clamp(80px, 12vh, 140px) clamp(18px, 5vw, 64px); }

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero__inner { max-width: 1000px; margin: 0 auto; width: 100%; }

.hero__kicker {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.hero__line { display: block; overflow: hidden; }
.hero__word { display: inline-block; will-change: transform; }
.hero__word--accent {
  color: transparent;
  background: linear-gradient(100deg, var(--accent), #6ecbff 70%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__sub {
  max-width: 460px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
  opacity: 0.92;
}

.hero__turtle {
  margin-top: 34px;
  max-width: 560px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(-1.2deg);
}
.hero__turtle video { width: 100%; height: auto; display: block; }

.hero__scrollcue {
  position: absolute;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
}
.hero__scrollcue span {
  display: block;
  width: 1px;
  height: 46px;
  margin: 0 auto 10px;
  background: linear-gradient(var(--foam), transparent);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.hero__waterline {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 90px;
  background:
    radial-gradient(60% 100% at 30% 0%, rgba(53, 224, 197, 0.10), transparent 70%),
    linear-gradient(transparent, rgba(2, 21, 38, 0.55));
  pointer-events: none;
}

/* ---------- dive log ---------- */

.log__head { max-width: 1100px; margin: 0 auto 46px; }

.log__title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.log__note { max-width: 520px; opacity: 0.85; line-height: 1.6; }

.log__grid {
  list-style: none;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

.dive {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s;
  -webkit-tap-highlight-color: transparent;
}
.dive:hover, .dive:focus-within { transform: translateY(-5px); border-color: rgba(53, 224, 197, 0.55); }

.dive__btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.dive__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 30% 0%, rgba(53, 224, 197, 0.18), transparent 60%),
    linear-gradient(160deg, #0a4f74, #042a44 70%);
}

.dive__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dive:hover .dive__media video { transform: scale(1.08); }

.dive__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(2, 21, 38, 0.55));
  pointer-events: none;
}

.dive__info { display: block; padding: 16px 18px 18px; }

.dive__no {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--accent);
  text-transform: uppercase;
}

.dive__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 7px 0 3px;
}

.dive__file {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  opacity: 0.55;
}

.dive__meta {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  opacity: 0.85;
}

.dive__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(2, 21, 38, 0.55);
  border: 1px solid rgba(53, 224, 197, 0.55);
  color: var(--accent);
  font-size: 0.7rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.3s, transform 0.3s;
}
.dive:hover .dive__play { background: rgba(53, 224, 197, 0.35); color: var(--foam); transform: scale(1.1); }

/* shimmer ribbon */
.dive::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(140, 230, 255, 0.07) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.9s ease;
  pointer-events: none;
}
.dive:hover::after { transform: translateX(100%); }

/* ---------- outro ---------- */

.outro {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.outro__title {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.outro__text { opacity: 0.8; max-width: 420px; line-height: 1.6; margin-bottom: 34px; }

.outro__up {
  color: var(--deep);
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.outro__up:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(53, 224, 197, 0.35); }

.outro__footer { margin-top: 70px; font-size: 0.78rem; opacity: 0.55; }

/* ---------- player modal ---------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 40px);
}
.player[hidden] { display: none; }

.player__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 8, 16, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.player__panel {
  position: relative;
  width: min(960px, 100%);
  background: #04121f;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.player__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.player__name { font-weight: 700; }
.player__meta { font-size: 0.74rem; opacity: 0.6; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.player__close {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--foam);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s;
}
.player__close:hover { background: rgba(255, 255, 255, 0.16); }

.player__stage { position: relative; aspect-ratio: 16 / 9; background: #000; }

.player__stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.player__loading.is-on { opacity: 1; }
.player__loading p { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; margin-top: 10px; }
.player__loading span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: bub 1.2s ease-in-out infinite;
}
.player__loading span:nth-child(2) { animation-delay: 0.15s; }
.player__loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bub {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-10px); opacity: 1; }
}

/* ---------- small screens ---------- */

@media (max-width: 600px) {
  .hero__turtle { transform: none; }
  .player { padding: 0; align-items: flex-end; }
  .player__panel { border-radius: var(--radius) var(--radius) 0 0; }
}

/* ---------- reduced motion ---------- */

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