:root {
  --bg: #000;
  --fg: #e9edf2;
  --dim: #8b95a3;
  --line: #161b22;
  --blue: #46a8ee;
  --blue-2: #2472dd;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* keep anchored sections clear of the header */
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

main { max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* ---------- scroll progress ---------- */

#progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 50;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

/* ---------- jelly animations ---------- */

/* The squish: squash and stretch past 1, then wobble back to rest. */
@keyframes jelly {
  0%   { transform: scale3d(1, 1, 1); }
  22%  { transform: scale3d(.86, 1.16, 1); }
  45%  { transform: scale3d(1.14, .88, 1); }
  65%  { transform: scale3d(.95, 1.06, 1); }
  82%  { transform: scale3d(1.03, .98, 1); }
  100% { transform: scale3d(1, 1, 1); }
}

/* Drops in from above, lands flat, then wobbles upright. */
@keyframes jellyDrop {
  0%   { opacity: 0; transform: translateY(-34px) scale3d(1.3, .7, 1); }
  55%  { opacity: 1; transform: translateY(0) scale3d(1.22, .74, 1); }
  72%  { transform: scale3d(.92, 1.1, 1); }
  86%  { transform: scale3d(1.05, .96, 1); }
  100% { opacity: 1; transform: scale3d(1, 1, 1); }
}

/* Idle loop for the logo: a slow, always-wobbling jelly. */
@keyframes jellyIdle {
  0%, 100% { transform: scale3d(1, 1, 1) rotate(0deg); }
  25%      { transform: scale3d(.94, 1.07, 1) rotate(-1.4deg); }
  50%      { transform: scale3d(1.07, .94, 1) rotate(1.4deg); }
  75%      { transform: scale3d(.97, 1.03, 1) rotate(-.7deg); }
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4%, -3%, 0) scale(1.12); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}

/* Staggered jelly drop-in: set --d per element. */
.anim {
  opacity: 0;
  animation: jellyDrop .85s cubic-bezier(.3, 1.5, .5, 1) forwards;
  animation-delay: var(--d, 0s);
}

/* Reveal on scroll. Scoped to .js so it can never leave content invisible
   if the script is blocked or fails. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px) scale(.97);
  transition:
    opacity .7s ease,
    transform .8s cubic-bezier(.2, 1.4, .4, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Drifting background glow (ambient, stays subtle). */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(38% 38% at 22% 18%, rgba(70, 168, 238, .20), transparent 70%),
    radial-gradient(34% 34% at 78% 72%, rgba(36, 114, 221, .16), transparent 70%);
  animation: drift 22s ease-in-out infinite;
}

/* ---------- header ---------- */

.bar {
  max-width: 940px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; display: block; }
.brand:hover img { animation: jelly .5s cubic-bezier(.3, 1.4, .5, 1); }

.bar nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.bar nav a { color: var(--dim); }
.bar nav a:hover { color: var(--fg); text-decoration: none; }

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

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

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #04121f;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
/* Jelly squish on hover instead of a light sweep. */
.btn:hover {
  animation: jelly .55s cubic-bezier(.3, 1.4, .5, 1);
  filter: brightness(1.1);
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-sm { padding: 7px 15px; font-size: 13px; }

.btn.ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover { background: #0d1117; }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 84px 0 90px;
}

.mark {
  border-radius: 26px;
  width: 132px;
  height: 132px;
  box-shadow: 0 0 90px rgba(70, 168, 238, 0.28);
  animation: jellyDrop .85s cubic-bezier(.3, 1.5, .5, 1) forwards,
             jellyIdle 4.5s ease-in-out 1s infinite;
}

.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(38px, 8vw, 66px);
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(135deg, #7cdcf9, #2472dd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tag {
  margin: 14px auto 0;
  max-width: 34ch;
  color: var(--dim);
  font-size: 18px;
}

.cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.alt { margin-top: 18px; font-size: 13px; color: #5c6672; }

/* ---------- free/paid pill ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #06080b;
  font-size: 13px;
  color: var(--dim);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d07f;
  animation: blink 2.4s ease-in-out infinite;
}

/* ---------- features ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding-bottom: 88px;
}

.grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px;
  background: #06080b;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.grid article:hover {
  animation: jelly .6s cubic-bezier(.3, 1.4, .5, 1);
  border-color: rgba(70, 168, 238, .45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}

.ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 11px;
  color: var(--blue);
  background: rgba(70, 168, 238, .10);
  box-shadow: inset 0 0 0 1px rgba(70, 168, 238, .22);
}
.ico svg { width: 21px; height: 21px; display: block; }
.grid article:hover .ico { animation: jelly .6s cubic-bezier(.3, 1.4, .5, 1); }

.grid h3 { margin: 0 0 8px; font-size: 17px; }

.grid p { margin: 0; color: var(--dim); font-size: 15px; }

/* ---------- clips ---------- */

.clips {
  border-top: 1px solid var(--line);
  padding: 72px 0;
  text-align: center;
}

.clips h2 { margin: 0 0 8px; font-size: 28px; }
.clips p { margin: 0 0 26px; color: var(--dim); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 30px 20px 46px;
  text-align: center;
}

.links { display: flex; gap: 22px; justify-content: center; font-size: 14px; }
.fine { margin: 16px 0 0; color: #4d5661; font-size: 12px; }

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .bar { padding: 14px 18px; }
  .bar nav { gap: 15px; }
  .bar nav a:not(.btn) { display: none; }
  .hero { padding: 60px 0 70px; }
  .tag { font-size: 16px; }
  .cta .btn { width: 100%; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .anim, .mark, .js .reveal { opacity: 1; transform: none; }
  #progress { display: none; }
}
