:root {
  --bg: #02040a;
  --blue: #3d8bff;
  --blue-light: #9cc8ff;
  --blue-deep: #0b3d91;
  --silver: #e8eef8;
  --text-dim: #8a9bb8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--silver);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Background layers ---------- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 35% at 30% 30%, rgba(61, 139, 255, .22), transparent 70%),
    radial-gradient(35% 30% at 75% 65%, rgba(11, 61, 145, .35), transparent 70%),
    radial-gradient(30% 25% at 50% 90%, rgba(156, 200, 255, .12), transparent 70%);
  filter: blur(40px);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(3%, -2%) rotate(8deg) scale(1.08); }
  100% { transform: translate(-3%, 2%) rotate(-6deg) scale(1); }
}

.grid-floor {
  position: fixed;
  left: -50%;
  right: -50%;
  bottom: -10vh;
  height: 45vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 139, 255, .25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 139, 255, .25) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(400px) rotateX(65deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,.8), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.8), transparent 85%);
  animation: gridMove 4s linear infinite;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

/* ---------- Stage ---------- */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 16px 90px;
}

/* ---------- Logo scene ---------- */
.logo-scene {
  position: relative;
  width: min(440px, 86vw);
  aspect-ratio: 600 / 480;
  perspective: 1000px;
  margin-bottom: 10px;
}

.halo {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 139, 255, .45), rgba(11, 61, 145, .15) 45%, transparent 70%);
  filter: blur(30px);
  animation: haloPulse 4s ease-in-out infinite;
}

@keyframes haloPulse {
  0%, 100% { opacity: .6; transform: scale(.92); }
  50%      { opacity: 1;  transform: scale(1.08); }
}

.ring {
  position: absolute;
  top: 38%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(156, 200, 255, .25);
  transform: translate(-50%, -50%) rotateX(72deg);
  pointer-events: none;
}
.ring::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 12px 4px var(--blue);
}
.ring-1 { width: 70%;  aspect-ratio: 1; animation: spin 9s linear infinite; }
.ring-2 { width: 95%;  aspect-ratio: 1; animation: spin 14s linear infinite reverse; border-color: rgba(61,139,255,.2); }
.ring-3 { width: 120%; aspect-ratio: 1; animation: spin 22s linear infinite; border-style: dashed; border-color: rgba(61,139,255,.12); }

@keyframes spin {
  from { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg); }
}

/* Mouse-driven 3D tilt (set from script.js) */
.tilt {
  position: relative;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  transition: transform .2s ease-out;
  will-change: transform;
}

/* The logo has a black background: "screen" blending makes the black vanish */
.logo-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  animation: logoIntro 1.8s cubic-bezier(.2, .9, .25, 1) both,
             logoFloat 6s ease-in-out 1.8s infinite;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 70%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 70%, transparent 100%);
}

.logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logoIntro {
  0%   { opacity: 0; filter: blur(20px) brightness(3); transform: scale(.4) rotateY(-90deg); }
  60%  { opacity: 1; filter: blur(0) brightness(1.6); transform: scale(1.06) rotateY(8deg); }
  100% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1) rotateY(0); }
}

@keyframes logoFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}

/* Light sweep: color-dodge only brightens the logo, black stays black */
.shine {
  position: absolute;
  inset: 0;
  mix-blend-mode: color-dodge;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(120, 170, 255, .0) 40%,
    rgba(180, 215, 255, .9) 50%,
    rgba(120, 170, 255, .0) 60%,
    transparent 65%);
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: sweep 4.5s ease-in-out 2s infinite;
  pointer-events: none;
}

@keyframes sweep {
  0%   { background-position: 150% 0; }
  45%  { background-position: -50% 0; }
  100% { background-position: -50% 0; }
}

/* ---------- Headline ---------- */
.headline {
  font-weight: 800;
  font-size: clamp(1.6rem, 4.6vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: .02em;
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .35em;
}

.word {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 0%, #c9d6ea 55%, #7f93b3 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  opacity: 0;
  animation: wordIn 1s cubic-bezier(.2, .9, .25, 1) forwards;
}
.word:nth-child(1) { animation-delay: 1.4s; }
.word:nth-child(2) { animation-delay: 1.65s; }
.word:nth-child(3) { animation-delay: 1.9s; }

.word.accent {
  background: linear-gradient(90deg, var(--blue-light), var(--blue), #1f5fd6, var(--blue-light));
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  animation: wordIn 1s cubic-bezier(.2, .9, .25, 1) forwards 1.65s,
             gradientFlow 5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(61, 139, 255, .55));
}

@keyframes wordIn {
  from { opacity: 0; transform: translateY(30px) scale(.9); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes gradientFlow {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

.tagline {
  color: var(--text-dim);
  font-weight: 300;
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  line-height: 1.7;
  max-width: 560px;
  opacity: 0;
  animation: fadeUp 1s ease forwards 2.3s;
}
.tagline strong { color: var(--blue-light); font-weight: 600; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Progress ---------- */
.progress {
  width: min(420px, 90vw);
  margin: 30px 0 26px;
  opacity: 0;
  animation: fadeUp 1s ease forwards 2.6s;
}

.progress-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(156, 200, 255, .1);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(156, 200, 255, .12);
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--blue-light));
  box-shadow: 0 0 14px var(--blue);
  position: relative;
  transition: width 2.5s cubic-bezier(.2, .9, .25, 1);
}
.progress-bar span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: barShine 2s linear infinite;
}

@keyframes barShine {
  from { background-position: -100% 0; }
  to   { background-position: 200% 0; }
}

.progress-label {
  margin-top: 10px;
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.progress-label span { color: var(--blue-light); font-weight: 600; }

/* ---------- Notify form ---------- */
.notify {
  display: flex;
  width: min(460px, 92vw);
  border-radius: 99px;
  padding: 5px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(156, 200, 255, .2);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeUp 1s ease forwards 2.9s;
  transition: border-color .3s, box-shadow .3s;
}
.notify:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 24px rgba(61, 139, 255, .35);
}

.notify input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--silver);
  font: inherit;
  font-size: .9rem;
  padding: 0 18px;
}
.notify input::placeholder { color: #5f6f8c; }

.notify button {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .05em;
  color: #fff;
  padding: 12px 24px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 4px 20px rgba(61, 139, 255, .4);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.notify button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(61, 139, 255, .6);
}

.notify-msg {
  min-height: 1.4em;
  margin-top: 12px;
  font-size: .85rem;
  color: var(--blue-light);
}

.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 18px 16px 24px;
  font-size: .75rem;
  letter-spacing: .1em;
  color: #4f5d78;
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  width: max-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease forwards 3.4s;
  transition: color .3s;
}
.scroll-hint:hover, .scroll-hint:focus-visible { color: var(--blue-light); }
.scroll-hint .chevron {
  width: 14px; height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { translate: 0 0; opacity: .5; }
  50%      { translate: 0 6px; opacity: 1; }
}

/* ---------- Founder section ---------- */
.founder {
  position: relative;
  z-index: 2;
  padding: clamp(60px, 10vw, 120px) 16px clamp(50px, 8vw, 100px);
}
.founder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 30, .75) 18%, rgba(5, 12, 30, .75) 82%, transparent);
  pointer-events: none;
}
.founder-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
  justify-items: center;
  text-align: center;
}

/* Photo */
.founder-visual {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 3 / 4;
  perspective: 1000px;
}
.photo-glow {
  position: absolute;
  inset: -12%;
  border-radius: 40%;
  background: radial-gradient(circle, rgba(61, 139, 255, .45), rgba(11, 61, 145, .2) 45%, transparent 70%);
  filter: blur(30px);
  animation: haloPulse 5s ease-in-out infinite;
}
.photo-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  animation: photoFloat 7s ease-in-out infinite;
}
@keyframes photoFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}
/* Spinning gradient border: a rotating conic layer clipped by the frame on top */
.photo-ring {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(61, 139, 255, .25);
}
.photo-ring::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, var(--blue-deep), var(--blue), var(--blue-light), #ffffff, var(--blue-light), var(--blue), var(--blue-deep));
  animation: spinRing 6s linear infinite;
}
@keyframes spinRing { to { transform: rotate(360deg); } }
.photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #0a1224;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transform: scale(1.04);
  transition: transform .8s ease;
}
.founder-visual:hover .photo-frame img { transform: scale(1.09); }
.photo-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: sweep 6s ease-in-out 1.5s infinite;
  pointer-events: none;
}

/* Orbiting sparks */
.photo-orbit {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  animation: spinRing 14s linear infinite;
  pointer-events: none;
}
.photo-orbit span {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 14px 4px var(--blue);
}
.photo-orbit span:nth-child(1) { top: 0; left: 50%; }
.photo-orbit span:nth-child(2) { bottom: 12%; left: 4%; width: 6px; height: 6px; }
.photo-orbit span:nth-child(3) { top: 40%; right: 0; width: 7px; height: 7px; }

.founder-badge {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%) translateZ(40px);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 10px 30px rgba(61, 139, 255, .45);
}
.founder-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7dffb0;
  box-shadow: 0 0 10px #7dffb0;
  animation: haloPulse 2s ease-in-out infinite;
}

/* Text */
.founder-text { max-width: 560px; }
.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--blue-light);
  padding: 6px 14px;
  border: 1px solid rgba(156, 200, 255, .3);
  border-radius: 99px;
  margin-bottom: 18px;
}
.founder-name {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .01em;
  background: linear-gradient(90deg, #ffffff 0%, var(--blue-light) 30%, var(--blue) 50%, var(--blue-light) 70%, #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: gradientFlow 7s linear infinite;
  filter: drop-shadow(0 0 22px rgba(61, 139, 255, .35));
}
.founder-role {
  margin-top: 10px;
  font-size: clamp(.95rem, 2.4vw, 1.2rem);
  font-weight: 600;
  color: var(--silver);
  letter-spacing: .04em;
}
.founder-line {
  height: 3px;
  width: 90px;
  margin: 22px auto;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--blue-light));
  transform-origin: left;
}
.founder-line.visible { animation: growLine 1.2s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes growLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.founder-bio {
  color: var(--text-dim);
  font-size: clamp(.95rem, 2.2vw, 1.08rem);
  line-height: 1.85;
  font-weight: 300;
}
.founder-bio strong { color: var(--silver); font-weight: 600; }
.founder-values {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.founder-values li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(156, 200, 255, .15);
  transition: transform .3s, border-color .3s, background .3s;
}
.founder-values li:hover { transform: translateY(-3px); border-color: var(--blue); background: rgba(61, 139, 255, .12); }
.v-icon { color: var(--blue); font-size: .7rem; }

/* Scroll reveal (script.js adds .visible) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .9, .25, 1), filter .9s ease;
}
.reveal.visible { opacity: 1; transform: none; filter: none; }
.founder-visual.reveal { transform: translateY(40px) scale(.92); }
.founder-visual.reveal.visible { transform: none; }

/* Tablet & up: photo beside the text */
@media (min-width: 900px) {
  .founder-inner {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }
  .founder-visual { width: 380px; }
  .founder-line { margin-left: 0; }
  .founder-values { justify-content: flex-start; }
}
@media (min-width: 1280px) {
  .founder-visual { width: 420px; }
}

/* Small phones */
@media (max-width: 480px) {
  .notify button { padding: 11px 16px; }
  .notify input  { padding: 0 12px; }
  .founder-badge { font-size: .7rem; padding: 8px 14px; }
  .scroll-hint span { display: none; }
}

/* Short landscape phones: let the hero grow instead of squeezing */
@media (max-height: 560px) and (orientation: landscape) {
  .logo-scene { width: min(260px, 40vw); }
  .scroll-hint { display: none; }
}

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