/* ============================================================
   CLIPR — cinematic landing page
   Design system: deep-space cloud + lime signature glow
   Type: JetBrains Mono (display/labels) + Plus Jakarta Sans (body)
   ============================================================ */

:root {
  /* atmosphere */
  --bg:        #07080c;
  --bg-2:      #0a0b11;
  --bg-3:      #0d0f16;
  --ink:       #08090c;      /* app-surface black, matches real app */

  /* signature */
  --lime:      #c8ff66;
  --lime-2:    #b6f24f;
  --lime-deep: #8fd92e;
  --cream:     #f5f1e8;

  /* text */
  --white:     #f4f7fb;
  --silver:    #c7d0dc;
  --muted:     #97a2b3;
  --muted-2:   #69737f;
  --faint:     #3a414e;

  /* atmospheric glows (background only) */
  --glow-blue:   #3f6ff0;
  --glow-violet: #7a5cf0;
  --glow-cyan:   #46c8f5;

  /* glass */
  --glass:        rgba(255, 255, 255, 0.045);
  --glass-2:      rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hi:     rgba(255, 255, 255, 0.16);

  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* elevation — premium, layered depth */
  --shadow-window: 0 60px 120px -30px rgba(0,0,0,0.85), 0 0 0 1px var(--glass-border), 0 0 90px -20px rgba(80,120,255,0.25);
  --shadow-card: 0 24px 60px -22px rgba(0,0,0,0.7);
  --shadow-lime: 0 0 0 1px rgba(200,255,102,0.5), 0 16px 56px -6px rgba(200,255,102,0.55);

  /* fluid section rhythm */
  --pad-section: clamp(80px, 10vw, 160px);
}

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

html { scroll-behavior: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--white);
  line-height: 1.55;
  overflow-x: hidden;
  cursor: auto;
  -moz-osx-font-smoothing: grayscale;
}

/* belt-and-suspenders: never allow a stray transform/blur or fixed
   atmosphere layer to create a horizontal scrollbar on any viewport */
html, body { max-width: 100%; overflow-x: hidden; }

::selection { background: var(--lime); color: #0a0a0a; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }
.waitlist input:focus-visible { outline: none; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============================================================
   ATMOSPHERE — fixed cloud / glow layers behind everything
   ============================================================ */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--atmos-op, 1);
  transition: opacity 0.6s var(--ease);
}
.atmos__grad {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.atmos__grad--blue {
  width: 60vw; height: 60vw;
  top: -18vw; left: -10vw;
  background: radial-gradient(circle at 50% 50%, var(--glow-blue), transparent 65%);
  opacity: 0.4;
}
.atmos__grad--violet {
  width: 55vw; height: 55vw;
  top: 8vh; right: -16vw;
  background: radial-gradient(circle at 50% 50%, var(--glow-violet), transparent 65%);
  opacity: 0.38;
}
.atmos__grad--lime {
  width: 42vw; height: 42vw;
  bottom: -14vw; left: 28vw;
  background: radial-gradient(circle at 50% 50%, var(--lime), transparent 62%);
  opacity: 0.12;
}
.atmos__grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: screen;
}
/* drifting soft cloud blobs (parallax targets) */
.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  background: radial-gradient(ellipse at 50% 50%, rgba(150,180,255,0.16), transparent 70%);
  will-change: transform;
}

/* starfield dots */
.atmos__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 12% 70%, rgba(255,255,255,.4), transparent);
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.5;
}

/* vignette to keep edges cinematic */
.atmos__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 35%, transparent 50%, rgba(4,5,8,0.7) 100%);
}

/* ============================================================
   LAYOUT
   ============================================================ */
main { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { position: relative; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled {
  padding: 10px 0;
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 12px rgba(200,255,102,0.35)); }
.brand__name { font-family: var(--font-mono); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand__name b { color: var(--lime); font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__link {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s var(--ease);
  position: relative;
  padding: 4px 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
  box-shadow: 0 0 8px rgba(200,255,102,0.6);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta-wrap { display: flex; align-items: center; gap: 16px; }
.nav__cta-wrap .btn { padding: 11px 18px; font-size: 13px; }
.brand { transition: transform 0.3s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand:hover .brand__mark { filter: drop-shadow(0 0 16px rgba(200,255,102,0.55)); }
.brand__mark { transition: filter 0.3s var(--ease); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 12px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.35s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(180deg, #d2ff7d 0%, var(--lime) 60%, var(--lime-2) 100%);
  color: #0a0e06;
  box-shadow: 0 0 0 1px rgba(200,255,102,0.55), 0 10px 40px -8px rgba(200,255,102,0.45), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn--primary:hover { box-shadow: 0 0 0 1px var(--lime), 0 16px 56px -6px rgba(200,255,102,0.7), inset 0 1px 0 rgba(255,255,255,0.55); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: var(--glass);
  color: var(--white);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--glass-2); border-color: var(--glass-hi); }
.btn--lg { padding: 16px 28px; font-size: 15px; border-radius: 14px; }
.btn__inner { display: inline-flex; align-items: center; gap: 9px; will-change: transform; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 132px 0 80px;
}
.hero__eyebrow { margin-bottom: 26px; opacity: 0; }
.hero__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin: 0 auto;
}
.hero__title .ln { display: block; overflow: hidden; }
.hero__title .ln > span { display: inline-block; will-change: transform; }
.hero-force-visible,
.hero-force-visible > span,
.hero-force-visible [data-hero-line] { transform: none !important; opacity: 1 !important; }
.hero__title .accent {
  color: var(--lime);
}
.hero__sub {
  margin: 30px auto 0;
  max-width: 60ch;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--silver);
  line-height: 1.6;
  font-weight: 400;
  opacity: 0;
}
.hero__cta {
  margin-top: 42px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}
.hero__note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  opacity: 0;
}
.hero__note b { color: var(--silver); font-weight: 500; }

/* hero stage — floating desktop + orb + particles */
.stage {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 48px auto 0;
  aspect-ratio: 16 / 9.6;
  opacity: 0;
}
/* the floating desktop window */
.desktop {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) perspective(1600px) rotateX(8deg) rotateY(-2deg);
  width: 78%;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-window);
  will-change: transform;
}
/* snip selection box over the desktop */
.snipbox {
  position: absolute;
  z-index: 4;
  border: 1.5px solid var(--lime);
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(6,7,11,0.0), inset 0 0 30px rgba(200,255,102,0.12);
  pointer-events: none;
}
.snipbox::before, .snipbox::after,
.snipbox > i {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 2px solid var(--lime);
  background: #0a0e06;
}
.snipbox::before { top: -5px; left: -5px; border-radius: 2px; }
.snipbox::after { top: -5px; right: -5px; border-radius: 2px; }
.snipbox > i:nth-child(1) { bottom: -5px; left: -5px; border-radius: 2px; }
.snipbox > i:nth-child(2) { bottom: -5px; right: -5px; border-radius: 2px; }
/* floating mini UI cards around the hero */
.floatcard {
  position: absolute;
  z-index: 6;
  background: linear-gradient(160deg, rgba(20,23,32,0.82), rgba(11,13,19,0.78));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 13px 15px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.06);
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 11px;
}
.floatcard__icon {
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(200,255,102,0.12);
  border: 1px solid rgba(200,255,102,0.25);
  color: var(--lime);
}
.floatcard__t { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--white); }
.floatcard__s { font-size: 11px; color: var(--muted); margin-top: 1px; }
.floatcard--voice { left: -5%; top: 15%; }
.floatcard--snip  { left: -1%; bottom: 13%; }
.floatcard--ctx   { right: -5%; bottom: 27%; }

/* waveform inside voice card */
.wave { display: flex; align-items: center; gap: 2.5px; height: 22px; }
.wave > span {
  display: block; width: 2.5px; border-radius: 2px;
  background: var(--lime);
  height: 30%;
}

.marquee {
  margin-top: 84px;
  opacity: 0;
}
.marquee__label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 22px;
}
.marquee__row { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; }
.marquee__item {
  display: flex; align-items: center; gap: 9px;
  color: var(--silver); font-size: 14px; font-weight: 500;
  opacity: 0.7;
  padding: 6px 10px; border-radius: 10px;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
  cursor: default;
}
.marquee__item:hover { opacity: 1; transform: translateY(-2px); background: rgba(255,255,255,0.04); }
.marquee__item svg { opacity: 0.85; }
.marquee__logo { display: grid; place-items: center; width: 24px; height: 24px; flex: none; }
.marquee__logo svg { width: 100%; height: 100%; }

/* hover state on the floating mini cards */
.floatcard { transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.floatcard:hover {
  border-color: rgba(200,255,102,0.4);
  box-shadow: 0 24px 60px -22px rgba(0,0,0,0.7), 0 0 32px -8px rgba(200,255,102,0.35);
}

/* ============================================================
   CINEMATIC PRELOADER (opening sequence — clipr-intro.js)
   ============================================================ */
/* lock scroll while the opening sequence plays */
html.is-loading, html.is-loading body { overflow: hidden; height: 100%; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background:
    radial-gradient(ellipse 60% 50% at 50% 46%, rgba(20,28,16,0.6), transparent 70%),
    #05060a;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.9s var(--ease);
}
.preloader__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.preloader__center {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.preloader__mark {
  width: 56px; height: 56px;
  opacity: 0; transform: scale(0.6);
  filter: drop-shadow(0 0 22px rgba(200,255,102,0.55));
}
.preloader__mark img { width: 100%; height: 100%; }
.preloader__word {
  display: flex; gap: 0.01em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: 0.02em;
  margin-top: 22px;
  color: var(--white);
}
.preloader__word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  filter: blur(8px);
}
.preloader__word span.is-r { color: var(--lime); text-shadow: 0 0 30px rgba(200,255,102,0.6); }
/* the "i" is the loading meter — it fills lime from bottom to top as the page loads */
.preloader__word span.pre-i { position: relative; color: rgba(255,255,255,0.22); }
.preloader__word span.pre-i .pre-i__fill {
  position: absolute; left: 0; top: 0;
  font: inherit; font-weight: inherit;
  color: var(--lime);
  text-shadow: 0 0 26px rgba(200,255,102,0.75);
  -webkit-clip-path: inset(100% 0 0 0);
          clip-path: inset(100% 0 0 0);
  pointer-events: none;
}
.preloader__tag {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted-2);
  opacity: 0;
}
.preloader.is-done { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none !important; }
  html.is-loading, html.is-loading body { overflow: auto; height: auto; }
}
