/* SubAquaDive design layer. Loaded after the compiled Tailwind CSS, so it can restyle existing classes.
   New classes are prefixed sq-. Build: `npm run build:app` hashes this file into public/_astro/sq-design.<hash>.css. */

@font-face {
  font-family: "Geist";
  src: url("/_astro/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sq-deep: #04222c;
  --sq-teal: #09566b;
  --sq-aqua: #3fb5cf;
  --sq-ink: #f1f1f1;
  --sq-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- typography (Geist, self-hosted: no request to a third-party font server) ---------- */
body,
.font-paragraph {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.font-heading {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.03em;
}
h1.font-heading,
h2.font-heading {
  letter-spacing: -0.04em;
}

/* legible primary buttons everywhere: dark ink on aqua */
.bg-coral-accent.text-background {
  color: #032029;
}

/* ---------- ambient background: soft colour glow + fine grain over the existing wave pattern ---------- */
.page-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.page-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60vw 50vh at 85% -5%, rgba(63, 181, 207, 0.22), transparent 70%),
    radial-gradient(55vw 55vh at -10% 55%, rgba(62, 84, 169, 0.25), transparent 70%),
    radial-gradient(70vw 40vh at 50% 110%, rgba(3, 26, 34, 0.5), transparent 70%);
  pointer-events: none;
}

/* ---------- navigation: floating glass pill ---------- */
header.sq-nav {
  top: 12px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(1360px, calc(100% - 24px));
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 40, 52, 0.4);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 40px -14px rgba(0, 0, 0, 0.5);
  transition: background-color 0.35s, box-shadow 0.35s, top 0.35s, border-color 0.35s;
}
header.sq-nav[data-scrolled="true"] {
  top: 8px;
  background: rgba(4, 34, 44, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
}
header.sq-nav > div {
  max-width: none;
  padding: 6px 12px 6px 14px;
}
header.sq-nav > div > div > a:first-child {
  background: #fff;
  border-radius: 9999px;
  padding: 3px 14px;
}
header.sq-nav > div > div > a:first-child img {
  height: 38px;
  width: auto;
}
header.sq-nav nav a {
  position: relative;
}
header.sq-nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--sq-aqua);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--sq-ease);
}
header.sq-nav nav a:hover::after {
  transform: scaleX(1);
}
@media (max-width: 1023px) {
  header.sq-nav {
    top: 8px;
    width: calc(100% - 16px);
  }
  header.sq-nav > div {
    padding: 5px 8px 5px 10px;
  }
  header.sq-nav > div > div > a:first-child img {
    height: 32px;
  }
}

/* ---------- shared building blocks ---------- */
.sq-section {
  position: relative;
  padding: clamp(72px, 10vw, 168px) clamp(16px, 4vw, 56px);
}
.sq-wrap {
  position: relative;
  max-width: 92rem;
  margin: 0 auto;
}
.sq-head {
  text-align: center;
  margin: 0 auto clamp(28px, 4vw, 56px);
}
.sq-h2 {
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 4.8vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
  text-wrap: balance;
  margin: 0;
}
.sq-accent {
  color: var(--sq-aqua);
}
.sq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.35s var(--sq-ease),
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s,
    box-shadow 0.35s;
}
.sq-btn svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.35s var(--sq-ease);
}
.sq-btn:hover svg {
  transform: translateX(4px);
}
.sq-btn:focus-visible,
.sq-card:focus-visible,
.sq-slice:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.sq-btn--primary {
  background: var(--sq-aqua);
  color: #032029;
  box-shadow: 0 14px 34px -14px rgba(63, 181, 207, 0.9);
}
.sq-btn--primary:hover {
  background: #6fd0e4;
  transform: translateY(-2px);
}
.sq-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sq-btn--ghost:hover {
  background: #fff;
  color: #032029;
  transform: translateY(-2px);
}

/* ---------- hero (cinematic, centred) ---------- */
.sq-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: 120px clamp(16px, 4vw, 48px) 104px;
  text-align: center;
}
.sq-hero-bg {
  position: absolute;
  inset: -3%;
  z-index: -3;
  background-size: cover;
  background-position: center;
  animation: sq-kb 32s ease-in-out infinite alternate;
  translate: 0 calc(var(--sq-hp, 0) * 90px);
  will-change: scale, translate;
}
@keyframes sq-kb {
  from {
    scale: 1;
  }
  to {
    scale: 1.09;
  }
}
.sq-hero-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 62% at 50% 46%, rgba(3, 26, 34, 0.74) 0%, rgba(3, 26, 34, 0.46) 55%, rgba(3, 26, 34, 0.3) 100%),
    linear-gradient(180deg, rgba(3, 26, 34, 0.55) 0%, rgba(3, 26, 34, 0) 28%, rgba(3, 26, 34, 0) 62%, #09566b 100%);
}
.sq-hero-inner {
  max-width: 76rem;
  margin: 0 auto;
  opacity: calc(1 - var(--sq-hp, 0) * 1.15);
  transform: translate3d(0, calc(var(--sq-hp, 0) * -48px), 0);
}
.sq-hero-title {
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 6.4vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: #fff;
  text-wrap: balance;
}
.sq-hero-title .sq-line {
  display: block;
}
.sq-pill {
  display: inline-block;
  vertical-align: middle;
  width: 1.9em;
  height: 0.78em;
  margin: 0 0.2em 0.08em 0;
  border-radius: 9999px;
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.28),
    0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.sq-hero-sub {
  margin: 28px auto 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: rgba(241, 241, 241, 0.92);
}
.sq-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
}
.sq-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 1px;
  height: 56px;
  background: linear-gradient(#fff, transparent);
  transform-origin: top;
  animation: sq-cue 2.4s ease-in-out infinite;
}
@keyframes sq-cue {
  0%,
  100% {
    transform: scaleY(0.25);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ---------- infinite marquee ---------- */
.sq-marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 26, 34, 0.45);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.sq-marquee-track {
  display: flex;
  width: max-content;
  animation: sq-marquee 70s linear infinite;
}
.sq-marquee:hover .sq-marquee-track {
  animation-play-state: paused;
}
.sq-marquee-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 clamp(20px, 3vw, 40px);
  font-size: clamp(1.1rem, 2.1vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: rgba(241, 241, 241, 0.92);
}
.sq-marquee-item::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: clamp(20px, 3vw, 40px);
  border-radius: 9999px;
  background: var(--sq-aqua);
}
@keyframes sq-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- scrubbed statement ---------- */
.sq-statement {
  max-width: 64rem;
  margin: 0 auto clamp(48px, 7vw, 96px);
  text-align: center;
  font-size: clamp(1.45rem, 3.3vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: #fff;
}
.sq-statement .sq-w {
  opacity: 0.12;
}
.sq-lead {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.6;
  letter-spacing: -0.015em;
  color: #fff;
  margin: clamp(20px, 2.4vw, 32px) 0 clamp(28px, 3vw, 40px);
}
.sq-lead .sq-w {
  opacity: 0.12;
}

/* ---------- gapless bento (3 cards: 7+5 columns, the first card spans two rows) ---------- */
.sq-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: minmax(300px, auto);
  gap: clamp(12px, 1.6vw, 20px);
}
.sq-bento > .sq-card:nth-child(1) {
  grid-column: span 7;
  grid-row: span 2;
}
.sq-bento > .sq-card:nth-child(2),
.sq-bento > .sq-card:nth-child(3) {
  grid-column: span 5;
}
.sq-bento[data-n="2"] > .sq-card {
  grid-column: span 6;
  grid-row: span 2;
}
.sq-bento[data-n="1"] > .sq-card {
  grid-column: span 12;
  grid-row: span 1;
}
@media (max-width: 1023px) {
  .sq-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sq-bento > .sq-card:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }
  .sq-bento > .sq-card:nth-child(1) {
    grid-column: span 2;
  }
  .sq-bento[data-n="2"] > .sq-card:nth-child(1) {
    grid-column: span 1;
  }
}
@media (max-width: 639px) {
  .sq-bento {
    grid-template-columns: 1fr;
  }
  .sq-bento > .sq-card:nth-child(n) {
    grid-column: span 1;
  }
}
.sq-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  padding: clamp(20px, 2.6vw, 36px);
  border-radius: clamp(20px, 2.4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #06303c;
  color: #fff;
  text-decoration: none;
}
.sq-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 26, 34, 0) 25%, rgba(3, 26, 34, 0.55) 62%, rgba(3, 26, 34, 0.92) 100%);
}
.sq-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  transform: scale(var(--sq-scale, 1));
  opacity: var(--sq-opacity, 1);
  will-change: transform, opacity;
}
.sq-media img,
.sq-media .sq-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--sq-ease);
}
.sq-media .sq-fallback {
  background: linear-gradient(140deg, #0e7f9a, #3e54a9);
}
.sq-card:hover .sq-media img,
.sq-feature-media:hover .sq-media img {
  transform: scale(1.06);
}
.sq-card h3 {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sq-card p {
  margin: 0 0 18px;
  max-width: 34rem;
  color: rgba(241, 241, 241, 0.88);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sq-card:nth-child(1) p {
  -webkit-line-clamp: 5;
}
.sq-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--sq-aqua);
}
.sq-more svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.35s var(--sq-ease);
}
.sq-card:hover .sq-more svg {
  transform: translateX(5px);
}

/* ---------- horizontal accordion (slices open on hover / focus) ---------- */
.sq-acc {
  display: flex;
  gap: clamp(8px, 1.2vw, 16px);
  height: clamp(440px, 64vh, 600px);
}
.sq-slice {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(18px, 2vw, 32px);
  border-radius: clamp(20px, 2.4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #06303c;
  color: #fff;
  text-decoration: none;
  transition: flex-grow 0.8s var(--sq-ease);
}
.sq-slice[data-on="true"] {
  flex-grow: 4.2;
}
.sq-slice-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 1.2s var(--sq-ease);
}
.sq-slice[data-on="true"] .sq-slice-bg {
  transform: scale(1);
}
.sq-slice::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 26, 34, 0.1) 30%, rgba(3, 26, 34, 0.9) 100%);
}
.sq-slice h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.sq-slice p {
  margin: 0;
  max-width: 28rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  line-height: 1.5;
  color: rgba(241, 241, 241, 0.9);
  transition:
    opacity 0.5s,
    max-height 0.6s var(--sq-ease),
    margin 0.6s var(--sq-ease);
}
.sq-slice[data-on="true"] p {
  max-height: 140px;
  margin-top: 10px;
  opacity: 1;
  transition-delay: 0.15s;
}
@media (max-width: 767px), (hover: none) {
  .sq-acc {
    flex-direction: column;
    height: auto;
  }
  .sq-slice {
    flex: none;
    min-height: 220px;
  }
  .sq-slice[data-on] {
    flex-grow: 0;
  }
  .sq-slice p {
    max-height: none;
    margin-top: 8px;
    opacity: 1;
  }
}

/* ---------- featured dive spot ---------- */
.sq-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 1023px) {
  .sq-feature {
    grid-template-columns: 1fr;
  }
}
.sq-feature-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 640px;
  border-radius: clamp(24px, 3vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #06303c;
}
@media (max-width: 1023px) {
  .sq-feature-media {
    aspect-ratio: 4 / 3;
  }
}
.sq-stat {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  padding: 14px 22px;
  border-radius: 20px;
  background: rgba(3, 26, 34, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.sq-stat b {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.sq-stat span {
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(241, 241, 241, 0.88);
}
.sq-feature .sq-h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
}
.sq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- closing call to action ---------- */
.sq-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: clamp(56px, 9vw, 136px) clamp(20px, 5vw, 80px);
  border-radius: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(63, 181, 207, 0.38), transparent 70%),
    linear-gradient(160deg, #0b6a82, #04222c);
}
.sq-cta .sq-h2 {
  max-width: 62rem;
  margin: 0 auto;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
}
.sq-cta p {
  max-width: 40rem;
  margin: 24px auto 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: rgba(241, 241, 241, 0.92);
}
.sq-cta .sq-hero-cta {
  margin-top: 36px;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sq-hero-bg,
  .sq-marquee-track,
  .sq-cue {
    animation: none !important;
  }
  .sq-hero-inner {
    opacity: 1 !important;
    transform: none !important;
  }
  .sq-hero-bg {
    translate: none !important;
  }
  .sq-media {
    transform: none !important;
    opacity: 1 !important;
  }
  .sq-slice,
  .sq-slice p,
  .sq-slice-bg,
  .sq-btn,
  .sq-media img {
    transition: none !important;
  }
}
