/* squidbite.io home page. The sea is a WebGL canvas behind plain HTML text.
   The privacy policy and the 404 page use style.css. No external fonts. */
:root {
  --night: #15123d;
  --dusk: #4b3a8c;
  --peach: #ff9f7f;
  --lagoon: #5fd8ea;
  --abyss: #070a26;
  --coral: #ff7f93;
  --orange: #f8a427;
  --yellow: #f4c534;
  --foam: #f4f2ff;
  --mist: #cdc7f2;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(22px, 7vw, 120px);
  --shadow: 0 2px 18px rgba(7, 8, 34, 0.55), 0 1px 2px rgba(7, 8, 34, 0.5);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Shown before the sea loads, and when WebGL is not available. */
  background: linear-gradient(to bottom,
    var(--night) 0%, var(--dusk) 8%, var(--peach) 13.4%, #1ea5b9 13.6%,
    #117aa1 30%, #0c3b72 60%, var(--abyss) 100%);
  background-color: var(--abyss);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--foam);
}

a { color: var(--lagoon); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The sea */
.sea {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.sea-ready .sea { opacity: 1; }
.no-webgl .sea { display: none; }
.over-squid { cursor: pointer; }

/* Keeps the text column readable over the moving scene. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 8, 36, 0.42) 0%, rgba(8, 8, 36, 0.18) 40%, rgba(8, 8, 36, 0) 62%);
}

/* Header */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  padding-top: max(22px, env(safe-area-inset-top));
  text-shadow: var(--shadow);
}
.brand {
  color: var(--foam);
  text-decoration: none;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.top nav { display: flex; gap: 26px; }
.top nav a { color: var(--foam); text-decoration: none; font-weight: 700; }
.top nav a:hover { color: var(--yellow); }

/* Depth gauge: the camera depth while you scroll. */
.depth {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.depth-track {
  position: relative;
  width: 2px;
  height: 34vh;
  background: rgba(244, 242, 255, 0.22);
  border-radius: 2px;
  overflow: hidden;
}
.depth-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--lagoon), var(--yellow));
  transform: scaleY(var(--depth, 0));
  transform-origin: top;
}
.depth-value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
  text-shadow: var(--shadow);
  min-width: 4ch;
  text-align: center;
}
.no-webgl .depth { display: none; }

/* Sections */
main { position: relative; z-index: 2; }

.panel {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 120px var(--gutter);
  text-shadow: var(--shadow);
}
.panel-body { max-width: 31rem; }

h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.015em;
}
.panel p { margin: 0 0 16px; color: var(--mist); }

/* Hero */
.hero {
  align-content: space-between;
  padding-top: clamp(96px, 15vh, 160px);
  padding-bottom: clamp(48px, 9vh, 96px);
}
.wordmark {
  margin: 0;
  font-size: clamp(64px, 11.5vw, 196px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #fff6ee;
  text-shadow: 0 4px 0 rgba(21, 18, 61, 0.35), 0 10px 40px rgba(21, 18, 61, 0.45);
}
.letters { display: inline-flex; }
.letters span { display: inline-block; }
.hero-foot { max-width: 26rem; }
.lede {
  margin: 0 0 26px;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.35;
  font-weight: 700;
  color: var(--foam);
}
.dive {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--foam);
  font-weight: 800;
  text-decoration: none;
}
.dive-line {
  position: relative;
  width: 2px;
  height: 44px;
  background: rgba(244, 242, 255, 0.3);
  overflow: hidden;
  border-radius: 2px;
}
.dive-line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 14px;
  background: var(--yellow);
  border-radius: 2px;
}

/* Facts */
.facts { margin: 30px 0 0; display: grid; gap: 18px; }
.facts div { padding-left: 16px; border-left: 2px solid rgba(95, 216, 234, 0.55); }
.facts dt { font-weight: 800; color: var(--yellow); }
.facts dd { margin: 2px 0 0; color: var(--mist); }

/* Game */
.game { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; }
.game img {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  box-shadow: 0 0 0 3px var(--lagoon), 0 14px 40px rgba(7, 8, 34, 0.55);
}
.game h3 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--orange);
}
.game .tagline { margin: 8px 0 14px; font-weight: 800; color: var(--foam); }
.game .status {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(7, 10, 38, 0.55);
  color: var(--yellow);
  font-size: 15px;
  font-weight: 800;
  text-shadow: none;
}
.game a { display: block; font-weight: 700; }

/* Contact */
.mail {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* Footer */
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  justify-content: space-between;
  padding: 26px var(--gutter) max(30px, env(safe-area-inset-bottom));
  color: var(--mist);
  font-size: 14px;
  text-shadow: var(--shadow);
}
.foot a { color: var(--mist); }
.foot a:hover { color: var(--foam); }

/* Motion: the letters rise out of the water once, then bob like buoys. */
@media (prefers-reduced-motion: no-preference) {
  .letters span {
    animation:
      letter-rise 1.1s cubic-bezier(0.2, 1.5, 0.45, 1) both,
      letter-bob 4.2s ease-in-out 1.3s infinite;
  }
  .letters span:nth-child(2) { animation-delay: 0.05s, 1.6s; }
  .letters span:nth-child(3) { animation-delay: 0.1s, 1.9s; }
  .letters span:nth-child(4) { animation-delay: 0.15s, 2.2s; }
  .letters span:nth-child(5) { animation-delay: 0.2s, 2.5s; }
  .letters span:nth-child(6) { animation-delay: 0.25s, 2.8s; }
  .letters span:nth-child(7) { animation-delay: 0.3s, 3.1s; }
  .letters span:nth-child(8) { animation-delay: 0.35s, 3.4s; }
  .letters span:nth-child(9) { animation-delay: 0.4s, 3.7s; }
  .dive-line::after { animation: drop 2.2s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes letter-rise {
  from { transform: translateY(0.55em); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes letter-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(0.045em) rotate(-1.2deg); }
}
@keyframes drop {
  0% { transform: translateY(-16px); }
  100% { transform: translateY(46px); }
}

/* Narrow screens: the squid sits in the upper part, the text at the bottom. */
@media (max-width: 760px), (max-aspect-ratio: 9/10) {
  body { font-size: 17px; }
  .scrim { background: linear-gradient(0deg, rgba(8, 8, 36, 0.62) 0%, rgba(8, 8, 36, 0.3) 38%, rgba(8, 8, 36, 0) 60%); }
  .panel { align-content: end; padding-bottom: 72px; }
  .hero { align-content: space-between; padding-top: 92px; padding-bottom: 48px; }
  .wordmark { font-size: clamp(58px, 17.5vw, 140px); }
  .top nav { gap: 18px; }
  .depth { top: auto; bottom: 22px; transform: none; flex-direction: row-reverse; right: 18px; }
  .depth-track { width: 64px; height: 2px; }
  .depth-fill { transform: scaleX(var(--depth, 0)); transform-origin: left; }
  .game { grid-template-columns: 1fr; gap: 18px; }
  .game img { width: 96px; height: 96px; border-radius: 24px; }
}
