@font-face {
  font-family: "New Grotesk Square SIX";
  src: url("https://www.ourreefstories.com.au/wp-content/themes/ourreefstories-theme/dist/fonts/newgrotesksquaresix-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "News Gothic Std";
  src: url("https://www.ourreefstories.com.au/wp-content/themes/ourreefstories-theme/dist/fonts/NewsGothicStd.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "News Gothic Std";
  src: url("https://www.ourreefstories.com.au/wp-content/themes/ourreefstories-theme/dist/fonts/NewsGothicStd-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --reef: #113645;
  --sage: #a1cebd;
  --mist: #d8f2ff;
  --accent: #ef6e3d;
  --ink: #113645;
  --reef-pitch: 0deg;
  --reef-scale: 0.16;
  --reef-stand: 0;
  --reef-sign: 0deg;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--reef);
  color: #fff;
  font-family: "News Gothic Std", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button, a { font-family: inherit; }

.reef-stage {
  position: fixed;
  inset: 0;
}

#map {
  position: absolute;
  inset: 0;
}

.maplibregl-ctrl-attrib {
  font-size: 11px;
  background: rgba(17, 54, 69, 0.72) !important;
  color: #fff !important;
}

.maplibregl-ctrl-attrib a { color: var(--mist) !important; }

.reef-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
  overflow: hidden;
  z-index: 2;
}

.reef-app.is-map .reef-clouds { opacity: 0; }

.reef-cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.72), rgba(216, 242, 255, 0.15) 70%, transparent);
  filter: blur(2px);
  mix-blend-mode: screen;
  animation: reef-drift linear infinite;
}

.reef-cloud:nth-child(1) { width: 46vw; height: 18vw; top: 8%; left: -10%; animation-duration: 78s; }
.reef-cloud:nth-child(2) { width: 34vw; height: 14vw; top: 22%; left: 30%; animation-duration: 96s; animation-delay: -20s; opacity: 0.75; }
.reef-cloud:nth-child(3) { width: 52vw; height: 16vw; top: 4%; left: 55%; animation-duration: 110s; animation-delay: -40s; }
.reef-cloud:nth-child(4) { width: 28vw; height: 12vw; top: 38%; left: 10%; animation-duration: 84s; animation-delay: -12s; opacity: 0.55; }

@keyframes reef-drift {
  from { transform: translateX(0); }
  to { transform: translateX(18vw); }
}

.reef-brand {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: linear-gradient(to bottom, rgba(17, 54, 69, 0.88), rgba(17, 54, 69, 0));
  pointer-events: none;
}

.reef-brand img { height: 64px; width: auto; }

.reef-brand p {
  margin: 0;
  max-width: 16rem;
  font-family: "New Grotesk Square SIX", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.reef-still,
.reef-ack {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.reef-still {
  background:
    linear-gradient(to bottom, rgba(17, 54, 69, 0.35), rgba(17, 54, 69, 0) 22%, rgba(17, 54, 69, 0) 70%, rgba(17, 54, 69, 0.25)),
    url("https://www.ourreefstories.com.au/wp-content/uploads/2026/07/Mandubarra_Home_Large-2048x1024.png") center / cover no-repeat;
  transition: opacity 2.6s ease;
}

.reef-still.is-gone { opacity: 0; pointer-events: none; }

.reef-ack {
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: rgba(17, 54, 69, 0.94);
  transition: opacity 0.6s ease;
}

.reef-ack.is-gone { opacity: 0; pointer-events: none; }

.reef-ack-card {
  width: min(640px, 100%);
  text-align: center;
}

.reef-ack h1 {
  margin: 0 0 18px;
  font-family: "New Grotesk Square SIX", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.reef-wave { width: 120px; height: 28px; margin: 8px auto 22px; }

.reef-ack p {
  margin: 0 auto 28px;
  max-width: 38rem;
  font-size: 18px;
  line-height: 1.45;
}

.reef-continue {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: #fff;
  color: var(--reef);
  border-radius: 999px;
  padding: 14px 36px;
  font-family: "New Grotesk Square SIX", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.reef-continue:hover { background: var(--mist); }

.reef-marker {
  perspective: 900px;
  transform-style: preserve-3d;
}

.reef-hide {
  opacity: 0;
  pointer-events: none;
  transform-origin: center bottom;
}

.reef-app.is-zooming .reef-hide {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}

.reef-tilt {
  transform-origin: center bottom;
  transform: rotateX(var(--reef-sign));
}

.reef-marker.is-active { z-index: 4; }

.reef-card {
  width: 46px;
  background: #fff;
  color: var(--ink);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(8, 28, 36, 0.28);
  cursor: pointer;
}

.reef-marker.is-active .reef-card {
  box-shadow: 0 0 0 2px var(--reef), 0 8px 16px rgba(8, 28, 36, 0.28);
}

.reef-card img {
  display: block;
  width: 100%;
  height: 58px;
  object-fit: cover;
}

.reef-sheet {
  position: absolute;
  z-index: 6;
  top: 28px;
  right: 28px;
  bottom: 28px;
  width: min(400px, calc(33.33vw - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  border-top: 1px solid rgba(17, 54, 69, 0.22);
  box-shadow: 0 18px 40px rgba(8, 28, 36, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.reef-app.is-focus .reef-sheet {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.reef-sheet.is-swap { opacity: 0.35; }

.reef-sheet-photo {
  display: block;
  width: 100%;
  height: 38%;
  min-height: 160px;
  object-fit: cover;
}

.reef-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 22px;
  flex: 1;
  min-height: 0;
}

.reef-sheet-rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: rgba(17, 54, 69, 0.2);
}

.reef-sheet h2 {
  margin: 16px 0;
  font-family: "New Grotesk Square SIX", sans-serif;
  font-size: 26px;
  line-height: 0.95;
  font-weight: 700;
}

.reef-sheet p {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.4;
}

.reef-sheet-link {
  margin: 4px 0 16px;
  color: var(--reef);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.reef-sheet-link:hover { color: var(--accent); }

.reef-sheet-link[hidden],
.reef-sheet-rule.is-optional[hidden] { display: none; }

.reef-sheet-nav {
  display: flex;
  margin-top: auto;
  border-top: 1px solid rgba(17, 54, 69, 0.22);
}

.reef-sheet-nav button {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  color: #8aa3ad;
  padding: 15px 0 16px;
  cursor: pointer;
}

.reef-sheet-nav button + button { border-left: 1px solid rgba(17, 54, 69, 0.2); }

.reef-sheet-nav button:hover { color: var(--reef); }

.reef-sheet-nav svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .reef-still, .reef-ack, .reef-clouds, .reef-card, .reef-card img, .reef-tilt {
    transition: none;
  }
  .reef-cloud { animation: none; }
}
