/* ============ Polar Pup — global tokens, reset, shared ice utilities ============ */

:root {
  /* ice palette */
  --ice-white: #e8f4f8;
  --ice-blue: #a8d8ea;
  --frost-glass: rgba(168, 216, 234, 0.15);
  --deep-arctic: #0a1628;
  --icicle-tip: #c5e8f0;
  --glow-cyan: #00d4ff;

  /* derived */
  --arctic-2: #0d1f38;
  --card: rgba(13, 31, 56, 0.55);
  --frost-line: rgba(197, 232, 240, 0.22);
  --text: #eaf6fb;
  --muted: #9cc3d8;

  /* type */
  --font-ice: 'Creepster', 'Fredoka', cursive;
  --font-ui: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  --nav-h: 66px;
  --container: 1120px;
  --ease-pop: cubic-bezier(0.3, 1.4, 0.4, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { scroll-behavior: auto; }

body {
  min-height: 100vh;
  font: 400 17px/1.65 var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(0, 212, 255, 0.13), transparent 60%),
    radial-gradient(900px 520px at 12% 4%, rgba(168, 216, 234, 0.10), transparent 55%),
    radial-gradient(1400px 900px at 50% 118%, rgba(0, 90, 140, 0.18), transparent 60%),
    var(--deep-arctic);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: var(--glow-cyan); }

:focus-visible {
  outline: 2px solid var(--glow-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(0, 212, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #081120; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ice-blue), #3a7ca8);
  border-radius: 8px;
  border: 3px solid #081120;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  background: var(--deep-arctic);
  color: var(--ice-white);
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--frost-line);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- layout ---------- */

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 108px 0;
  scroll-margin-top: 150px;
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.section-sub {
  color: var(--muted);
  max-width: 560px;
  font-size: 1.02rem;
}

/* ---------- ice font treatment (branding + titles) ---------- */

.ice-text {
  font-family: var(--font-ice);
  font-weight: 400;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  background-size: 100% 190%;
  background: linear-gradient(180deg, #ffffff 6%, var(--ice-white) 32%, var(--ice-blue) 58%, var(--glow-cyan) 94%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.16)) drop-shadow(0 8px 22px rgba(0, 212, 255, 0.28));
}

.section-title {
  font-size: clamp(2.7rem, 6.5vw, 4.3rem);
  line-height: 1.05;
}

/* ---------- impale target (section titles take the icicle hit) ---------- */

.impale-target { position: relative; }

/* ---------- ice frame (every framed asset shares this) ---------- */

.ice-frame {
  position: relative;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(232, 244, 248, 0.16), rgba(168, 216, 234, 0.07) 38%, rgba(0, 212, 255, 0.05)),
    var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -12px 24px rgba(0, 212, 255, 0.05),
    0 18px 40px rgba(2, 10, 24, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ice-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.75), rgba(168, 216, 234, 0.35) 30%, rgba(0, 212, 255, 0.28) 65%, rgba(168, 216, 234, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.ice-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("../assets/ice/frost-texture.svg");
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- seal buddy (peek-a-boo corner friend) ---------- */

.seal-buddy {
  position: fixed;
  right: 18px;
  bottom: -150px;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 95;
  transition: bottom 0.6s var(--ease-pop), transform 0.2s var(--ease-pop);
  filter: drop-shadow(0 10px 22px rgba(0, 120, 190, 0.4));
}

.seal-buddy .lottie-seal { width: 100%; height: 100%; }
.seal-buddy.up { bottom: -22px; }
.seal-buddy:hover { transform: scale(1.07) rotate(-4deg); }
.seal-buddy:active { transform: scale(0.92); }
.seal-buddy.bounce { animation: buddy-bounce 0.5s var(--ease-pop); }

@keyframes buddy-bounce {
  30% { transform: scale(1.15) rotate(4deg) translateY(-10px); }
  60% { transform: scale(0.95) rotate(-2deg); }
}

@media (max-width: 640px) {
  .seal-buddy { width: 88px; height: 88px; right: 10px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font: 600 1.02rem var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.18s var(--ease-pop), box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  color: #04263a;
  background: linear-gradient(140deg, #8ff0ff, var(--glow-cyan) 45%, #1f8fe8);
  box-shadow: 0 10px 26px rgba(0, 212, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 212, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-ghost {
  color: var(--ice-white);
  background: var(--frost-glass);
  border: 1px solid var(--frost-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(168, 216, 234, 0.24); transform: translateY(-2px); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- lottie seal hosts ---------- */

.lottie-seal { display: block; }
.lottie-seal svg { display: block; }
.lottie-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  translate: -50% 16px;
  z-index: 1200;
  background: rgba(10, 22, 40, 0.92);
  border: 1px solid var(--frost-line);
  color: var(--ice-white);
  padding: 12px 20px;
  border-radius: 14px;
  font: 600 0.95rem var(--font-ui);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, translate 0.25s;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { opacity: 1; translate: -50% 0; }
