/* ============================================================
   EPIK OCEAN — component layer (added in revision)
   GL canvas · pill nav · theme toggle · logo cloud ·
   magnetic text · floating-paths closing · letters · stack depth
   ============================================================ */

/* ---------- WebGL shader background ---------- */
/* ---------- WebGL shader background — confined to the intro ---------- */
#gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}
#gl canvas { width: 100% !important; height: 100% !important; display: block; }
html[data-theme="light"] #gl { opacity: .55; }
/* same mesh background in the closing section */
#gl-closing { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#gl-closing canvas { width: 100% !important; height: 100% !important; display: block; }
/* liquid-glass panel holding the closing CTA, floating over the mesh */
.closing__glass {
  padding: clamp(36px, 6vw, 76px) clamp(28px, 5vw, 72px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(8, 10, 16, .34);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
          backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .18),
    inset -1px -1px 1px rgba(255, 255, 255, .06),
    0 30px 80px -40px rgba(0, 0, 0, .8);
}

/* ---------- mouse spotlight ---------- */
.spot { z-index: 1; }

/* ============================================================
   PILL NAV — sliding cursor
   ============================================================ */
/* dark liquid-glass pill: translucent, blurred, specular inset edges; the
   sliding cursor is a brighter glass highlight under the active/hovered tab */
.pillnav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
          backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .16),
    inset -1px -1px 1px rgba(255, 255, 255, .05),
    inset 0 0 8px rgba(255, 255, 255, .03),
    0 8px 30px rgba(0, 0, 0, .35);
}
.pillnav__cursor {
  position: absolute;
  z-index: 0;
  top: 5px; left: 0;
  height: calc(100% - 10px);
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .2),
    inset -1px -1px 1px rgba(255, 255, 255, .06);
  opacity: 0;
  transition: left .35s var(--ease), width .35s var(--ease), opacity .35s var(--ease);
}
.pillnav__tab {
  position: relative;
  z-index: 1;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.pillnav__tab:hover { color: var(--ink); }
@media (max-width: 920px) { .pillnav { display: none; } }

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.themetoggle {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.themetoggle:hover { border-color: color-mix(in srgb, var(--ink) 34%, transparent); transform: translateY(-1px); }
.themetoggle svg { width: 18px; height: 18px; }
.themetoggle .ico-moon { display: none; }
.themetoggle .ico-sun  { display: block; }
html[data-theme="light"] .themetoggle .ico-moon { display: block; }
html[data-theme="light"] .themetoggle .ico-sun  { display: none; }

/* ============================================================
   LOGO CLOUD — bordered grid with + markers
   ============================================================ */
/* ============================================================
   INTEGRATION HERO — ruixen.ui/integration-hero (vanilla port)
   centred heading + two opposite-scrolling rows of glass logo chips
   ============================================================ */
.intg { padding: clamp(64px, 9vh, 120px) 0; position: relative; }
.intg__head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.intg__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute);
}
.intg__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--glow), .8); }
.intg__title { margin: 0; font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.intg__sub { margin: 0; color: var(--mute); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; }
.intg__head .btn { margin-top: 6px; }

/* tech-stack icons that spread + converge on scroll (reuno) */
.intg__icons { display: flex; justify-content: center; align-items: center; gap: clamp(12px, 1.8vw, 24px); overflow: hidden; padding: clamp(8px, 1.4vw, 18px) 0; }
.intg__icons .intg__chip { will-change: transform, opacity; }
.intg__rows { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 24px); }
.intg__row {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.intg__track {
  display: flex;
  gap: clamp(16px, 1.6vw, 22px);
  width: max-content;
  will-change: transform;
}
.intg__track--l { animation: intg-left 38s linear infinite; }
.intg__track--r { animation: intg-right 38s linear infinite; }
@keyframes intg-left  { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes intg-right { from { transform: translateX(-50%); }  to { transform: translateX(0); } }
.intg__row:hover .intg__track { animation-play-state: paused; }
.intg__chip {
  flex: none;
  width: clamp(58px, 6vw, 76px);
  height: clamp(58px, 6vw, 76px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .12), 0 6px 18px rgba(0, 0, 0, .3);
}
.intg__chip img {
  width: 46%; height: 46%; object-fit: contain;
  /* unify every brand mark to a clean off-white on the dark glass chips */
  filter: brightness(0) invert(1);
  opacity: .8;
}
@media (prefers-reduced-motion: reduce) { .intg__track { animation: none; } }

/* ============================================================
   MAGNETIC TEXT — circular reveal
   ============================================================ */
.mtext-sec {
  padding: clamp(80px, 13vh, 170px) 0;
  display: flex;
  justify-content: center;
  text-align: center;
}
.mtext {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  user-select: none;
  line-height: .9;
}
.mtext__base, .mtext__inner span {
  font-size: clamp(2.6rem, 9vw, 7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .82;
  text-align: center;
}
.mtext__base { color: var(--ink); }
.mtext__circle {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-radius: 50%;
  background: var(--accent);
  overflow: hidden;
  pointer-events: none;
  will-change: transform, width, height;
  transition: width .5s var(--ease), height .5s var(--ease);
}
.mtext.on .mtext__circle { width: clamp(280px, 42vw, 520px); height: clamp(190px, 24vw, 300px); }
.mtext__inner {
  position: absolute;
  top: 50%; left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.mtext__inner span { color: #100a08; }
/* touch devices have no hover → reveal the circle + "HANDLED." statically,
   centred over the word, so the payoff isn't lost on mobile */
@media (hover: none) {
  .mtext__circle {
    width: clamp(150px, 44vw, 240px); height: clamp(150px, 44vw, 240px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
  }
  .mtext__inner { top: 50%; left: 50%; transform: translate(-50%, -50%); }
}

/* ============================================================
   LETTER TITLES
   ============================================================ */
[data-letters] { display: inline-block; }
[data-letters] .ltr-word { display: inline-block; white-space: nowrap; }
[data-letters] .ltr {
  display: inline-block;
  transform: translateY(125%) rotate(5deg) scale(.94);
  transform-origin: bottom center;
  opacity: 0;
  /* snappy easeOutExpo-style spring → a more dynamic "pop" into place */
  transition: transform .95s cubic-bezier(.16, 1, .3, 1), opacity .55s ease;
  transition-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
[data-letters] .ltr.sp { width: .26em; }
[data-letters].lit .ltr { transform: none; opacity: 1; }
[data-letters].settled .ltr { transition: none !important; transform: none !important; opacity: 1 !important; }

/* block-wipe reveal (text-block-animation port): an accent block sweeps
   across, the text appears under it, then it retracts revealing the text */
[data-block] { position: relative; display: block; isolation: isolate; }
[data-block] > .bt { display: inline-block; opacity: 0; }
[data-block].in > .bt { opacity: 1; transition: opacity 0s .42s; }
[data-block]::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--accent); transform: scaleX(0); transform-origin: left center;
  pointer-events: none;
}
[data-block].in::after { animation: block-wipe .95s var(--ease) forwards; }
/* self-heal: once settled, guarantee text is shown and the block is gone
   (never leave a filled block stuck over the copy) */
[data-block].settled > .bt { opacity: 1 !important; }
[data-block].settled::after { display: none !important; }
@keyframes block-wipe {
  0%   { transform: scaleX(0); transform-origin: left center; }
  46%  { transform: scaleX(1); transform-origin: left center; }
  54%  { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}
@media (prefers-reduced-motion: reduce) {
  [data-block] > .bt { opacity: 1; }
  [data-block]::after { display: none; }
}

/* text-reveal headings (dillionverma port): words brighten dim→full on scroll */
.rword { display: inline-block; opacity: .2; will-change: opacity; }
.rword--hl { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .rword { opacity: 1 !important; } }

/* ============================================================
   FLOATING-PATHS CLOSING SECTION
   ============================================================ */
.closing {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: clamp(110px, 17vh, 200px) var(--pad);
}
.paths { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.closing .paths {
  opacity: .55;
  -webkit-mask-image: radial-gradient(82% 78% at 50% 50%, #000 28%, transparent 80%);
          mask-image: radial-gradient(82% 78% at 50% 50%, #000 28%, transparent 80%);
}
/* scrim between the paths (z0) and the copy (z2) so the lines never cut
   through the headline — matters most on narrow screens */
.closing::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(58% 52% at 50% 50%, rgba(6, 7, 10, .72), transparent 76%);
  pointer-events: none;
}
.paths__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.closing__in { position: relative; z-index: 2; max-width: 1000px; }
.closing__title {
  margin: 18px 0 0;
  font-weight: 800;
  font-size: clamp(2.8rem, 8.5vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.05em;
}
.closing__sub {
  margin: clamp(20px, 2.6vw, 30px) auto 0;
  max-width: 46ch;
  color: var(--mute);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6;
}
.closing__btn { margin-top: clamp(30px, 4vh, 48px); display: flex; justify-content: center; }
.closing .cta__contact { margin-top: clamp(34px, 5vh, 64px); }

/* ============================================================
   INTRO — "Simply Unstoppable" with wave background
   ============================================================ */
.intro {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 24px) var(--pad) 70px;
  overflow: hidden;
  isolation: isolate; /* scope the title's difference-blend to the mesh only */
}
.intro .paths { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.intro::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.intro__in { position: relative; z-index: 2; }
.intro__eyebrow { display: flex; justify-content: center; margin-top: clamp(18px, 2.4vw, 30px); font-size: clamp(15px, 1.5vw, 19px); }
.intro__cta { display: flex; justify-content: center; margin-top: clamp(26px, 3.2vw, 44px); }
.intro__title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .92;
  font-size: clamp(2.1rem, 6.2vw, 5.4rem);
  /* blend with the mesh: white text in difference blend inverts the colours
     behind it — the background reads through the letters, reflective + premium */
  color: rgba(255, 255, 255, .92);
  mix-blend-mode: difference;
  -webkit-text-stroke: 0;
  filter: none;
}
.intro__title .ltr { color: rgba(255, 255, 255, .92); -webkit-text-stroke: 0; }
.intro__sub {
  margin: clamp(22px, 2.6vw, 34px) auto 0;
  max-width: 40ch;
  color: var(--mute);
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.6;
}
.intro__cue {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
.intro__cue .line { width: 1px; height: 36px; background: linear-gradient(var(--faint), transparent); animation: cuepulse 2.2s var(--ease) infinite; }
@keyframes cuepulse { 0%,100% { transform: scaleY(.6); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   FOUNDERS — forward-deployed engineers
   ============================================================ */
.founders__head { max-width: 30ch; }
.founders__lead {
  margin: 18px 0 0;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.25;
  max-width: 30ch;
}
.founders__lead b { color: var(--ink); }
.founders__grid {
  margin-top: clamp(34px, 4vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 1.8vw, 26px);
}
@media (max-width: 760px) { .founders__grid { grid-template-columns: 1fr; } }
/* no box — clean centred stack: monogram, name, role */
.fcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 32px) 0;
}
.fcard__top { display: flex; align-items: center; gap: 16px; }
.fcard__av {
  width: 86px; height: 86px; border-radius: 20px; overflow: hidden; flex: none;
  border: 1px solid var(--line-2);
}
/* monogram avatar (placeholder until real founder photos are dropped in) */
.fcard__mono {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ink);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(var(--glow), .35), transparent 70%),
    var(--panel-2);
}
.fcard__name { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.fcard__role { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .02em; white-space: nowrap; }
.fcard__bio { margin: 0; color: var(--mute); font-size: clamp(14px, 1.3vw, 16px); line-height: 1.6; }
.fcard__tag {
  align-self: flex-start;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.fcard__tag .avail__dot { width: 6px; height: 6px; }

/* ============================================================
   SCHEMATIC MARKS — corner crosses + section rules
   ============================================================ */
.cross {
  position: absolute;
  width: 12px; height: 12px;
  z-index: 4;
  color: var(--faint);
  pointer-events: none;
}
.cross::before, .cross::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: currentColor;
}
.cross::before { width: 11px; height: 1px; transform: translate(-50%, -50%); }
.cross::after  { width: 1px; height: 11px; transform: translate(-50%, -50%); }
.cross--tl { top: 10px; left: 10px; }
.cross--tr { top: 10px; right: 10px; }
.cross--bl { bottom: 10px; left: 10px; }
.cross--br { bottom: 10px; right: 10px; }
[data-frame] { position: relative; }

.secrule {
  position: relative;
  height: 0;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 66px);
}
.secrule::before, .secrule::after {
  content: "+";
  position: absolute; top: 0; transform: translateY(-52%);
  font-family: var(--mono); font-size: 14px; line-height: 1;
  color: var(--faint);
}
.secrule::before { left: -4px; }
.secrule::after  { right: -4px; }

/* ============================================================
   FOUNDERS — centred treatment
   ============================================================ */
.founders__head {
  max-width: 42ch;
  margin-left: auto; margin-right: auto;
  text-align: center;
}
.founders__head .kicker { justify-content: center; }
.founders__head h2 { margin-left: auto; margin-right: auto; }
.founders__lead { margin-left: auto; margin-right: auto; }
.founders__grid { max-width: 940px; margin-left: auto; margin-right: auto; }
.fcard { align-items: center; text-align: center; }
.fcard__top { flex-direction: column; gap: 12px; }
.fcard__tag { align-self: center; }

/* ============================================================
   STACK DEPTH (driven by motion.js vars)
   ============================================================ */
/* story-scroll: each card rotates in from a tilt as it settles, then stacks */
.stack__card { transform: perspective(1400px) rotateX(var(--rot, 0deg)) scale(var(--depth, 1)); transform-origin: center bottom; }
.stack__card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--bg);
  opacity: var(--dim, 0);
  pointer-events: none;
  transition: opacity .2s linear;
}

@media (prefers-reduced-motion: reduce) {
  .stack__card { transform: none !important; }
  .stack__card::after { display: none; }
  #gl { display: none; }
  .mtext { cursor: auto; }
}
