/* ============ Base ============ */
:root {
  --bg: #0b111c;
  --surface: rgba(20, 32, 50, 0.5);
  --border: rgba(141, 173, 199, 0.14);
  --border-bright: rgba(141, 173, 199, 0.3);
  --text: #e9eff5;
  --text-muted: #9db0bf;
  /* studio accent: bioluminescent teal — the lure's warm amber lives only in imagery */
  --accent: #4de0cf;
  --accent-soft: #8ff0e4;
  --accent-dim: rgba(77, 224, 207, 0.12);
  --lure: #ffd27a;
  --font-display: "Sora", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1060px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  /* fallback water column when JS/canvas is unavailable */
  background: linear-gradient(180deg, #101c2e 0%, #0a1220 40%, #050a13 75%, #03050a 100%) var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(77, 224, 207, 0.28);
}

/* ============ The ocean (fixed canvas backdrop) ============ */
.ocean {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* ============ Cursor lantern ============ */
.lantern {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 720px;
  height: 720px;
  margin: -360px 0 0 -360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 100, 0.07), rgba(255, 195, 100, 0.028) 42%, transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 30;
}

.lantern.on {
  display: block;
}

/* ============ Depth gauge ============ */
.depth-hud {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.depth-line {
  width: 1px;
  height: 54px;
  background: linear-gradient(180deg, transparent, var(--accent));
  opacity: 0.6;
}

.depth-value {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(11, 17, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  z-index: 60;
}

.logo-img {
  border-radius: 9px;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a.nav-cta {
  color: var(--accent);
  border: 1px solid rgba(77, 224, 207, 0.45);
  border-radius: 999px;
  padding: 7px 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--accent);
  color: #04241f;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 60;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -24% 0 0 0;
  background: url("assets/hero.jpg") center right / cover no-repeat;
  transform: translate3d(0, 0, 0) scale(1.06);
  will-change: transform;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 17, 28, 0.9) 0%, rgba(11, 17, 28, 0.68) 45%, rgba(11, 17, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(11, 17, 28, 0.5) 0%, transparent 30%, transparent 52%, rgba(12, 21, 35, 0.97) 100%);
}

/* God rays — near the surface, fading out as you dive */
.rays {
  position: absolute;
  inset: -10% 0 0 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.rays i {
  position: absolute;
  top: -20%;
  height: 130%;
  width: 220px;
  background: linear-gradient(180deg, rgba(140, 220, 235, 0.1), rgba(140, 220, 235, 0.025) 55%, transparent 85%);
  transform: skewX(-14deg);
  animation: raySway 13s ease-in-out infinite alternate;
}

.rays i:nth-child(1) { left: 12%; width: 170px; animation-delay: 0s; }
.rays i:nth-child(2) { left: 38%; width: 260px; animation-delay: -4s; opacity: 0.75; }
.rays i:nth-child(3) { left: 66%; width: 190px; animation-delay: -8s; opacity: 0.6; }

@keyframes raySway {
  from { transform: skewX(-17deg) translateX(-46px); }
  to   { transform: skewX(-9deg) translateX(46px); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 72px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.3rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 750px;
  margin: 0 0 26px;
}

.glow-text {
  color: var(--accent-soft);
  text-shadow: 0 0 34px rgba(77, 224, 207, 0.5);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.18rem;
  max-width: 540px;
  margin-bottom: 40px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero load-in */
.rise {
  opacity: 0;
  transform: translateY(26px);
  animation: riseIn 0.9s var(--ease-out) forwards;
  animation-delay: calc(0.15s + var(--d, 0) * 0.13s);
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 44px;
  border: 1.5px solid var(--border-bright);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-line {
  width: 2px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollNudge 2s ease-in-out infinite;
}

@keyframes scrollNudge {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55%      { transform: translateY(12px); opacity: 0.2; }
  56%      { transform: translateY(0); opacity: 0; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #04241f;
  box-shadow: 0 8px 28px -10px rgba(77, 224, 207, 0.5);
}

.btn-primary:hover {
  background: var(--accent-soft);
  box-shadow: 0 12px 34px -10px rgba(77, 224, 207, 0.65);
}

.btn-ghost {
  border-color: var(--border-bright);
  color: var(--text);
  background: rgba(20, 32, 50, 0.3);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
}

/* ============ Sections ============ */
.section {
  position: relative;
  padding: 130px 0;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 600;
  margin-bottom: 22px;
}

.section-head {
  margin-bottom: 48px;
}

.section p {
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 60ch;
}

/* Scroll reveal — hidden state only applies when JS is running (html.js),
   so crawlers and no-JS browsers always see full content */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.12s);
}

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Kill-switch for automated captures: index.html?noanim */
.noanim *, .noanim *::before, .noanim *::after {
  animation: none !important;
  transition: none !important;
}

.noanim .reveal,
.noanim .rise {
  opacity: 1 !important;
  transform: none !important;
}

.noanim .hero {
  min-height: 760px;
}

/* ============ Sea life drifting past ============ */
.swimmer {
  position: absolute;
  z-index: 0;
  color: rgba(150, 185, 210, 0.09);
  pointer-events: none;
  will-change: transform;
}

.swimmer-a {
  top: 8%;
  right: 6%;
  filter: blur(3px);
  color: rgba(150, 185, 210, 0.06);
}

.swimmer-a .swimmer-inner {
  animation: swimDrift 17s ease-in-out infinite alternate;
}

.swimmer-school {
  top: 4%;
  left: 8%;
  filter: blur(1px);
  color: rgba(150, 185, 210, 0.08);
}

.swimmer-school .swimmer-inner {
  animation: swimDrift 13s ease-in-out infinite alternate-reverse;
}

.swimmer-b {
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  color: rgba(160, 195, 220, 0.16);
}

.swimmer-b .swimmer-cross {
  width: 90px;
  animation: swimAcross 64s linear infinite;
}

.swimmer-lure {
  fill: var(--accent);
  filter: drop-shadow(0 0 5px rgba(77, 224, 207, 0.9));
  animation: lureBlink 3.2s ease-in-out infinite;
}

@keyframes swimDrift {
  from { transform: translate3d(-34px, -10px, 0); }
  to   { transform: translate3d(34px, 12px, 0); }
}

@keyframes swimAcross {
  from { transform: translateX(-120px); }
  to   { transform: translateX(calc(100vw + 120px)); }
}

@keyframes lureBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.about-stats {
  display: grid;
  gap: 18px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, transform 0.3s var(--ease-out),
              opacity 0.8s var(--ease-out);
}

.stat-card:hover {
  border-color: var(--border-bright);
  transform: translateX(6px);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  flex: 0 0 84px;
  text-align: center;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ============ Principle cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.p-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 26px;
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease,
              opacity 0.8s var(--ease-out);
}

.p-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(77, 224, 207, 0.075), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.p-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

.p-card:hover::before {
  opacity: 1;
}

.p-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 20px;
}

.p-card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.p-card p {
  font-size: 0.93rem;
  margin: 0;
}

/* ============ App card ============ */
.app-card + .app-card {
  margin-top: 28px;
}

a.store-pill {
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s ease, color 0.25s ease;
}

a.store-pill:hover {
  border-color: rgba(77, 224, 207, 0.4);
  color: var(--accent);
}

.app-card {
  position: relative;
  display: flex;
  gap: 36px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 780px;
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.35s ease,
              opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.app-card.in-view {
  transition: border-color 0.3s ease, box-shadow 0.35s ease,
              opacity 0.8s var(--ease-out), transform 0.35s var(--ease-out);
}

.app-card:hover {
  border-color: rgba(77, 224, 207, 0.32);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.app-glow {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(77, 224, 207, 0.11), transparent 70%);
  pointer-events: none;
}

.app-icon img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.35s var(--ease-out);
}

.app-card:hover .app-icon img {
  transform: scale(1.05) rotate(-2deg);
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.app-info h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  border: 1px solid rgba(77, 224, 207, 0.4);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 5px 13px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(77, 224, 207, 0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 5px rgba(77, 224, 207, 0); }
}

.chip-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 24px;
}

.chip {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(11, 17, 28, 0.5);
  border-radius: 999px;
  padding: 6px 14px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-bright);
}

.store-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 9px 4px;
  transition: color 0.2s ease;
}

.app-link span {
  transition: transform 0.25s var(--ease-out);
}

.app-link:hover {
  color: var(--accent-soft);
}

.app-link:hover span {
  transform: translateX(4px);
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 16px;
}

.store-pill em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ============ Contact — the abyss, and one warm light ============ */
.contact-card {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  background: rgba(14, 22, 36, 0.55);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 40px 70px;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

/* .section p caps width at 60ch with a left-anchored box;
   inside this centered card every text block must center itself */
.contact-card p {
  margin-left: auto;
  margin-right: auto;
}

.contact-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  margin-left: -240px;
  width: 480px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255, 190, 90, 0.1), transparent 70%);
  pointer-events: none;
}

.lure-beacon {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: var(--lure);
  box-shadow:
    0 0 18px 4px rgba(255, 210, 122, 0.5),
    0 0 70px 24px rgba(255, 190, 90, 0.16);
  animation: beacon 3.4s ease-in-out infinite;
}

@keyframes beacon {
  0%, 100% {
    box-shadow:
      0 0 18px 4px rgba(255, 210, 122, 0.5),
      0 0 70px 24px rgba(255, 190, 90, 0.16);
  }
  50% {
    box-shadow:
      0 0 26px 8px rgba(255, 210, 122, 0.7),
      0 0 100px 34px rgba(255, 190, 90, 0.24);
  }
}

.contact-card .eyebrow {
  margin-bottom: 14px;
}

.contact-sub {
  max-width: 46ch;
  margin: 0 auto 36px;
}

.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 36px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-footer {
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a,
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .depth-hud,
  .lantern {
    display: none !important;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 84px 0;
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    background: rgba(11, 17, 28, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 55;
  }

  .nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.3rem;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.7rem);
  }

  .app-card {
    flex-direction: column;
    padding: 30px 24px;
  }

  .contact-card {
    padding: 54px 24px;
  }

  .footer-row {
    flex-direction: column;
    text-align: center;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rise,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .rays i,
  .swimmer-inner,
  .swimmer-cross,
  .swimmer-lure,
  .scroll-line,
  .badge-dot,
  .lure-beacon {
    animation: none;
  }

  .swimmer-b {
    display: none;
  }

  .lantern {
    display: none !important;
  }
}
