/* ─────────────────────────────────────────────────────────────────────────
   welcome.css — brand-aligned styles for the welcome site.
   Follows HOMIE brand guide (brand/HOMIE_brand_guide.md). Hard rules:
     · Solid color fills only — no rgba tinted backgrounds.
     · No gradients in product UI.
     · Hover never changes border color; surface step shifts instead.
   Borders MAY be low-opacity cream or blue (the guide allows this).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Brand tokens ──────────────────────────────────────────────────────── */
:root {
  --ink:   #0F1116; /* Graphite base */
  --ink2:  #171A22; /* Surface 1 — cards at rest */
  --ink3:  #1F232E; /* Surface 2 — hover, elevated */
  --ink4:  #272B38; /* Elevated / focused */
  --cream: #F6F6F2;
  --blue:  #2F38F5; /* Electric Blue — action */
  --blueOn:#4147F8; /* Electric Blue — hover step */
  --yellow:#E9FF00; /* Signal Yellow — emphasis (sparingly) */
  --ok:    #00E5B4;
  --warm:  #FF9F00;
  --pink:  #FF4DB8;
  --line:  rgba(246, 246, 242, 0.10); /* low-opacity cream border (allowed) */
  --line2: rgba(246, 246, 242, 0.18);
}

/* ── Root ──────────────────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
  scroll-behavior: auto;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: "Inter", ui-sans-serif, system-ui;
  position: relative;
}

/* ── World atmosphere — fixed to viewport ─────────────────────────────────
   One continuous layer of soft directional light. Doesn't move with scroll,
   so the page reads as a single space Klaus inhabits, not a sequence of
   rooms. Two soft pools: cool blue toward the top, warm amber low and
   off-center — like a window and a lamp. */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110vw 80vh at 70% 18%, rgba(47, 56, 245, 0.10), transparent 60%),
    radial-gradient(ellipse 100vw 70vh at 30% 82%, rgba(255, 159, 0, 0.07), transparent 60%);
}

/* Vignette — pulls focus to center. Tighter on mobile. */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.45) 100%);
}
@media (max-width: 700px) {
  body::after {
    background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0,0,0,0.35) 100%);
  }
}

/* Film grain — subtle SVG noise, low opacity, blended. Cinematic finish. */
.grain {
  position: fixed; inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96  0 0 0 0 0.92  0 0 0 0 0.83  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Dust motes — slow drift, fixed to viewport. Pixar render staple: dust in
   a beam of light. The motes don't carry meaning, they make the space alive. */
.dust {
  position: fixed; inset: 0;
  z-index: 4;
  pointer-events: none;
}
.dust .mote {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--cream);
  opacity: 0;
  filter: blur(0.5px);
  animation: drift var(--dur, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
  left: var(--x, 50%);
  bottom: -10vh;
  --sway: 30px;
}
.dust .mote.big   { width: 3px; height: 3px; opacity-: 0.22; }
.dust .mote.small { width: 1px; height: 1px; filter: blur(0.3px); }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: 0.18; }
  50%  { transform: translate3d(var(--sway), -55vh, 0); opacity: 0.22; }
  90%  { opacity: 0.10; }
  100% { transform: translate3d(0, -120vh, 0); opacity: 0; }
}
@media (max-width: 700px) {
  /* Fewer / smaller particles on mobile — visual + perf both improve. */
  .dust .mote { width: 1.5px; height: 1.5px; }
  .dust .mote.big { width: 2px; height: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .dust { display: none; }
  .grain { opacity: 0.04; }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* Cursor glow — small, soft, follows the pointer. Brand allows soft glow as
   "active intelligence" affordance (§15). Desktop only via media query. */
#cursor-glow {
  position: fixed;
  width: 320px; height: 320px;
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(47, 56, 245, 0.16) 0%, rgba(47, 56, 245, 0.05) 35%, transparent 65%);
  opacity: 0;
  transition: opacity 600ms ease;
  will-change: transform;
  mix-blend-mode: screen;
}
@media (hover: hover) and (pointer: fine) {
  #cursor-glow.on { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #cursor-glow { display: none; }
}

/* ── Scenes ────────────────────────────────────────────────────────────── */
/* One continuous world. No per-scene backdrop tints — Klaus's halo carries
   the warmth, and a fixed body atmosphere ties everything together so
   scrolling never reveals a colored seam. */
.scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 6rem) clamp(1.25rem, 5vw, 5rem);
  z-index: 3;
  background: transparent; /* let the body atmosphere show through */
  overflow: hidden;
}
.scene > .scene-paint { display: none; } /* legacy; kept for safety */
@supports (height: 100svh) {
  .scene { min-height: 100svh; }
}
.scene-inner {
  width: 100%;
  max-width: 72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}
@media (max-width: 880px) {
  .scene-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Klaus character ───────────────────────────────────────────────────── */
.klaus-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-inline: auto;
  isolation: isolate;
  z-index: 4;
}
/* Solid surface step behind Klaus — the "stage" he sits on. */
.klaus-disk {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: var(--ink2);
  transform: translate(-50%, -50%);
  z-index: -2;
}
/* Character rim lighting — large warm/cool halo. Klaus is the warm focus
   of the world; everything else stays calm. Two stacked radials: a tight
   warm rim, a wider cool atmospheric falloff. */
.klaus-halo {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 159, 0, 0.32), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(47, 56, 245, 0.20), transparent 68%);
  filter: blur(40px);
  z-index: -1;
  animation: halo-pulse 9s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes halo-pulse {
  0%, 100% { transform: scale(1.00); opacity: 0.90; }
  50%      { transform: scale(1.06); opacity: 1.00; }
}
/* Floor pool — warm puddle at his feet. Sells the "lit from below" feel. */
.klaus-pedestal {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  width: 70%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 159, 0, 0.38), transparent 70%);
  filter: blur(14px);
  z-index: -1;
}
/* Painted PNG, crossfade between poses */
.klaus-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(.4,0,.2,1);
  user-select: none;
  -webkit-user-drag: none;
}
.klaus-img.on { opacity: 1; }
/* Subtle breathing — Klaus is alive even when still. CSS transform of his
   own group; doesn't violate any brand rule (no color/gradient involved). */
.klaus-breathe {
  animation: breathe 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.012); }
}

/* ── Reveal: appears on scroll into view ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms cubic-bezier(.16,1,.3,1),
    transform 900ms cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-slow { transition-duration: 1400ms; }

/* ── Eyebrow tag ──────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink2); /* solid surface step */
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--ok);
}

/* ── Display type ─────────────────────────────────────────────────────── */
/* Hero (Scene 1 only) — Bebas Neue, the campaign moment. */
.display-hero {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--cream);
  text-wrap: balance;
  text-transform: uppercase;
}
.display-hero .em {
  color: var(--yellow); /* Signal Yellow — emphasis, sparingly */
}

/* Sub-hero (other scenes) — Inter Bold, more conversational. */
.display {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--cream);
  text-wrap: balance;
}
.display .em {
  color: var(--blue); /* Electric Blue — emphasis on action/connection scenes */
}

.lede {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--cream);
  opacity: 0.78;
  max-width: 34ch;
}
.kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  opacity: 0.65;
  text-transform: uppercase;
}

/* ── Beat / capability cards ──────────────────────────────────────────── */
.cap-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.3rem;
  background: var(--ink2);                 /* solid */
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: background 250ms cubic-bezier(.16,1,.3,1),
              transform 350ms cubic-bezier(.16,1,.3,1);
}
.cap-card:hover {
  background: var(--ink3);                 /* surface step, no border change */
  transform: translateY(-2px);
}
.cap-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cap-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.cap-title {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.25rem;
  letter-spacing: -0.005em;
}
.cap-body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.65;
}

/* ── Channel form (Scene: where to reach you) ─────────────────────────── */
.channel-form {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.55rem;
  max-width: 34rem;
}
@media (max-width: 480px) {
  .channel-form { grid-template-columns: 1fr; }
}
.channel-select, .channel-handle {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  padding: 0.9rem 1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  outline: none;
  transition: background 200ms;            /* no border-color hover */
  appearance: none;
  -webkit-appearance: none;
}
.channel-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23F6F6F2' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 36px;
  cursor: pointer;
}
.channel-select:focus, .channel-handle:focus {
  border-color: var(--blue);               /* focus = action, solid Electric Blue */
  background: var(--ink3);
}
.channel-handle::placeholder { color: var(--cream); opacity: 0.35; }
.channel-select option {
  background: var(--ink2);
  color: var(--cream);
}

/* ── Permission row (CTA scene) ───────────────────────────────────────── */
.perm-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.95rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.perm-row:last-child { border-bottom: none; }
.perm-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink3);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--cream);
  flex-shrink: 0;
}
.perm-title {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.98rem;
}
.perm-why {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--cream);
  opacity: 0.60;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}

/* ── Primary CTA — Electric Blue, Pixar-plastic depth ─────────────────── */
/* Solid Electric Blue base + Pixar plastic depth:
     · inset white highlight along the top edge (rim light)
     · big directional shadow (the pill floats)
     · soft outer glow (active intelligence, brand §15)
     · sheen sweep on hover (marketing affordance, §17)
   Stays on-brand: the fill is solid Electric Blue, not a multi-stop fill. */
.cta-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 2.1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.005em;
  color: var(--cream);
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  cursor: pointer;
  transition: background 220ms, transform 220ms, box-shadow 220ms;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 36px -12px rgba(47, 56, 245, 0.55),
    0 0 60px rgba(47, 56, 245, 0.18);
  overflow: hidden;
}
.cta-primary::before {
  /* Sheen sweep — moving highlight across the button on hover. Marketing UI. */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 850ms cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.cta-primary:hover:not(:disabled) {
  background: var(--blueOn);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 24px 48px -12px rgba(47, 56, 245, 0.65),
    0 0 80px rgba(47, 56, 245, 0.28);
}
.cta-primary:hover:not(:disabled)::before { transform: translateX(110%); }
.cta-primary:active { transform: translateY(0); }
.cta-primary:disabled {
  background: var(--ink3);
  border-color: var(--line);
  color: var(--cream);
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.cta-primary:disabled::before { display: none; }

/* ── Hub cards ────────────────────────────────────────────────────────── */
.hub-card {
  padding: 1.1rem 1.3rem;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: background 250ms;
}
.hub-card:hover { background: var(--ink3); }
.hub-card.is-connected { border-color: rgba(0, 229, 180, 0.40); }
.hub-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--ink3);
  border: 1px solid var(--line);
  color: var(--cream);
  opacity: 0.75;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.hub-chip-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--cream);
  opacity: 0.4;
}
.hub-chip.on { color: var(--ok); border-color: rgba(0, 229, 180, 0.40); opacity: 1; }
.hub-chip.on .hub-chip-dot { background: var(--ok); opacity: 1; }

/* ── Reduce motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .klaus-breathe { animation: none; }
}
