/* ==========================================================
   KrakenAR — palette sampled from the key artwork
   ========================================================== */
:root {
  --navy-900: #040d1c;
  --navy-800: #071427;
  --navy-700: #0b1f3f;
  --navy-600: #122c56;

  --cyan: #38d0ff;
  --violet: #7b5cff;
  --purple: #a855f7;

  --text: #e8f0ff;
  --muted: #93a9c9;
  --line: rgba(120, 170, 255, 0.16);

  --wrap: 1180px;
  --radius: 20px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keeps anchored sections clear of the fixed header. */
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--navy-800);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip {
  position: absolute; top: -60px; left: 16px; z-index: 200;
  background: var(--cyan); color: #041226;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 0; }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, .brand__text {
  font-family: Montserrat, Inter, sans-serif;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: #cfe0f7;
}

p { color: var(--muted); }

.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Scroll progress ─────────────────────────────────────── */
.progress {
  position: fixed; top: 0; left: 0; z-index: 120;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--purple));
  box-shadow: 0 0 14px rgba(56, 208, 255, 0.6);
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 110;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(7, 20, 39, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex: 0 0 auto;
}
.brand img { border-radius: 9px; }
.brand__text {
  font-weight: 900; font-size: 1.16rem; letter-spacing: 0.02em;
}
.brand__text em {
  font-style: normal; font-weight: 800;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav__links {
  margin-left: auto;
  display: flex; align-items: center; gap: 34px;
}
.nav__links a {
  text-decoration: none; font-size: 0.94rem; font-weight: 500;
  color: #c3d6f0; position: relative; padding: 4px 0;
  transition: color 0.25s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 20px !important;
  background: rgba(56, 208, 255, 0.07);
}
.nav__cta::after { display: none; }
.nav__cta:hover {
  background: rgba(56, 208, 255, 0.16);
  border-color: rgba(56, 208, 255, 0.5);
}

.nav__toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 11px;
  background: none; border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer;
}
.nav__toggle span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text); margin: 4px 0;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 32px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s;
}
.btn--primary {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  color: #04101f;
  box-shadow: 0 10px 34px -10px rgba(80, 150, 255, 0.75);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px -10px rgba(80, 150, 255, 0.95);
}
.btn--ghost {
  border-color: var(--line); color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn--ghost:hover {
  border-color: rgba(56, 208, 255, 0.55);
  background: rgba(56, 208, 255, 0.1);
  transform: translateY(-2px);
}

/* ── Reveal on scroll ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px 0 140px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute; inset: -12% 0;
  background: url("/scene-fountain.webp") 50% 42% / cover no-repeat;
  z-index: -2;
  animation: slowzoom 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes slowzoom {
  from { transform: scale(1.02); }
  to   { transform: scale(1.14); }
}

/* A landscape scene crops hard on tall screens, so shift the framing onto the
   kraken (right of frame) rather than the empty foreground. */
@media (max-aspect-ratio: 1 / 1) {
  .hero__bg { background-position: 63% 38%; }
}

/* Vignette the edges and darken only directly behind the headline, so the
   artwork stays visible instead of being flattened into a dark rectangle. */
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(54% 34% at 50% 51%, rgba(4, 13, 28, 0.85), transparent 74%),
    radial-gradient(90% 70% at 50% 45%, transparent 38%, rgba(4, 13, 28, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 13, 28, 0.78) 0%, rgba(4, 13, 28, 0.1) 26%,
                            rgba(4, 13, 28, 0.45) 74%, var(--navy-800) 99%);
}

.orb {
  position: absolute; z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}
.orb--1 {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -8%; left: -12%;
  background: radial-gradient(circle, rgba(56, 208, 255, 0.75), transparent 68%);
  animation: float1 17s ease-in-out infinite;
}
.orb--2 {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  bottom: -14%; right: -10%;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.7), transparent 68%);
  animation: float2 21s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vw, 5vh) scale(1.12); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1.08); }
  50%      { transform: translate(-5vw, -6vh) scale(1); }
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 860px;
  padding-inline: 24px;
}
.hero__title {
  font-size: clamp(2.9rem, 8.4vw, 6rem);
  font-weight: 900;
  margin: 0 0 22px;
  text-shadow: 0 14px 60px rgba(0, 0, 0, 0.6);
}
.hero__lede {
  max-width: 620px; margin: 0 auto 38px;
  color: #d3e3fa;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}
/* A badge rather than bare text — the artwork behind it is too bright and
   varied for small type to survive on its own. */
.hero .eyebrow {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(56, 208, 255, 0.38);
  background: rgba(4, 13, 28, 0.62);
  backdrop-filter: blur(8px);
  text-shadow: none;
}
.hero__actions {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

.scrollcue {
  position: absolute; bottom: 34px; left: 50%;
  translate: -50% 0;
  width: 26px; height: 46px;
  border: 1px solid var(--line); border-radius: 999px;
  display: grid; place-items: start center; padding-top: 8px;
}
.scrollcue__line {
  width: 2px; height: 10px; border-radius: 2px;
  background: var(--cyan);
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(18px); }
}

/* ── Marquee ─────────────────────────────────────────────── */
.marquee {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(56, 208, 255, 0.06), rgba(123, 92, 255, 0.06));
  overflow: hidden;
  padding: 20px 0;
}
.marquee__track {
  display: flex; width: max-content;
  animation: slide 34s linear infinite;
}
.marquee__track span {
  font-family: Montserrat, sans-serif;
  font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap; padding-right: 1.2em;
  color: rgba(232, 240, 255, 0.42);
}
.marquee__track i {
  font-style: normal; margin-inline: 0.7em;
  color: var(--cyan); font-size: 0.6em; vertical-align: middle;
}
@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ── Sections ────────────────────────────────────────────── */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section__head { max-width: 700px; margin-bottom: clamp(44px, 6vw, 72px); }

/* The Idea */
.idea__grid {
  display: grid; gap: clamp(40px, 6vw, 80px);
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 30px 0 0; }
.chips li {
  font-size: 0.85rem; font-weight: 500; color: #c8dbf5;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; background: rgba(56, 208, 255, 0.05);
}

.idea__art { margin: 0; }
.art-card {
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9),
              0 0 70px -30px rgba(80, 150, 255, 0.5);
  will-change: transform;
}
.art-card img { width: 100%; height: auto; }

/* Features */
.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.card {
  position: relative;
  padding: 34px 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 44, 86, 0.5), rgba(7, 20, 39, 0.35));
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 0%, rgba(56, 208, 255, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 208, 255, 0.4);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.card:hover::before { opacity: 1; }
.card__icon {
  position: relative;
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 22px;
  border-radius: 15px;
  color: var(--cyan);
  border: 1px solid rgba(56, 208, 255, 0.3);
  background: rgba(56, 208, 255, 0.09);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { position: relative; font-size: 1.16rem; font-weight: 800; margin-bottom: 12px; }
.card p { position: relative; margin: 0; font-size: 0.96rem; }

/* How it works */
.steps {
  list-style: none; padding: 0; margin: 0; position: relative;
  display: grid; gap: 30px;
  grid-template-columns: repeat(3, 1fr);
}
.steps__rail {
  position: absolute; top: 26px; left: 6%; right: 6%;
  height: 2px; background: var(--line); border-radius: 2px;
}
.steps__rail i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--purple));
  box-shadow: 0 0 12px rgba(56, 208, 255, 0.7);
  border-radius: 2px;
}
.step { position: relative; padding-top: 74px; }
.step__num {
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  font-family: Montserrat, sans-serif; font-weight: 800; font-size: 1rem;
  color: var(--text);
  background: var(--navy-800);
  border: 1px solid rgba(56, 208, 255, 0.45);
  box-shadow: 0 0 0 6px var(--navy-800), 0 0 30px -6px rgba(56, 208, 255, 0.6);
}
.step h3 { font-size: 1.28rem; font-weight: 800; margin-bottom: 12px; }
.step p { margin: 0; }

/* Showcase */
.poster { margin: 0; }
.poster__frame {
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.95),
              0 0 100px -40px rgba(90, 130, 255, 0.45);
  will-change: transform;
}
.poster img { width: 100%; height: auto; }
.poster figcaption {
  margin-top: 18px; text-align: center;
  font-size: 0.88rem; color: var(--muted);
}

/* Notify */
.notify { overflow: hidden; isolation: isolate; text-align: center; }
.notify__bg {
  position: absolute; inset: -20% 0; z-index: -1;
  background: url("/scene-fountain.webp") center 30% / cover no-repeat;
  opacity: 0.42;
  filter: blur(2px);
}
.notify::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--navy-800), rgba(7, 20, 39, 0.72) 50%, var(--navy-800));
}
.notify__inner { max-width: 700px; }
.notify .lede { margin-bottom: 34px; }

.signup {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.signup input[type="email"] {
  flex: 1 1 280px; min-width: 0;
  padding: 15px 22px; border-radius: 999px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(4, 13, 28, 0.72);
  border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s;
}
.signup input::placeholder { color: #6f89ab; }
.signup input:focus {
  border-color: rgba(56, 208, 255, 0.6);
  background: rgba(4, 13, 28, 0.9);
}
/* Chrome paints autofilled inputs near-white, which wrecks the dark field.
   An inset shadow is the only way to override that background. */
.signup input:-webkit-autofill,
.signup input:-webkit-autofill:hover,
.signup input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #071427 inset;
  box-shadow: 0 0 0 1000px #071427 inset;
  caret-color: var(--text);
}
.hp { position: absolute; left: -9999px; }

.signup__note { font-size: 0.85rem; margin-top: 18px; }
.signup__status {
  min-height: 1.5em; margin: 14px 0 0; font-weight: 500;
}
.signup__status.ok { color: var(--cyan); }
.signup__status.err { color: #ff8fa3; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--navy-900);
  padding: 60px 0 30px;
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 34px;
  justify-content: space-between; align-items: center;
}
.footer__brand { display: flex; align-items: center; gap: 15px; }
.footer__brand img { border-radius: 11px; }
.footer__brand p { margin: 4px 0 0; font-size: 0.88rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.footer__links a {
  text-decoration: none; font-size: 0.92rem; color: #b9cdea;
  transition: color 0.25s;
}
.footer__links a:hover { color: var(--cyan); }
.footer__legal {
  max-width: var(--wrap); margin: 46px auto 0; padding-inline: 24px;
  font-size: 0.82rem; color: #6b83a6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .idea__grid { grid-template-columns: 1fr; }
  .idea__art { order: -1; max-width: 460px; }
  .steps { grid-template-columns: 1fr; gap: 38px; }
  .steps__rail { display: none; }
  .step { padding-top: 0; padding-left: 74px; min-height: 54px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 76px; }

  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 68px 12px auto;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px; border-radius: 18px;
    background: rgba(7, 20, 39, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 13px 14px; border-radius: 11px; font-size: 1rem; }
  .nav__links a::after { display: none; }
  .nav__links a:hover { background: rgba(56, 208, 255, 0.1); }
  .nav__cta { text-align: center; margin-top: 6px; }

  .signup { flex-direction: column; }
  .signup .btn { width: 100%; }
  /* In a column flex container the 280px flex-basis applies to height, not
     width, which stretched the field into a huge box. */
  .signup input[type="email"] { flex: 0 0 auto; width: 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }

  /* Narrow screens crop into the brightest part of the scene, so the copy
     needs a heavier backing to stay readable. */
  .hero__veil {
    background:
      radial-gradient(72% 42% at 50% 44%, rgba(4, 13, 28, 0.93), transparent 78%),
      linear-gradient(180deg, rgba(4, 13, 28, 0.86) 0%, rgba(4, 13, 28, 0.3) 20%,
                              rgba(4, 13, 28, 0.6) 68%, var(--navy-800) 99%);
  }
}

/* ── Motion / contrast preferences ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg, .orb, .marquee__track, .scrollcue__line { animation: none !important; }
  .btn:hover, .card:hover { transform: none; }
  * { transition-duration: 0.01ms !important; }
}
