/* ============================================================
   ARCANIIA LABS — DESIGN SYSTEM
   Editorial confidence. Ink, bone, one electric ultramarine.
   Type leads; decoration earns its place or doesn't ship.
   ============================================================ */

:root {
  --ink: #0d0d10;
  --ink-soft: #1a1a20;
  --bone: #f2efe9;
  --bone-dim: #e7e3da;
  --ultra: #2b32ff;
  --ultra-dim: #babdff;
  --grey: #6f6e6a;

  --font-display: "Switzer", "Helvetica Neue", sans-serif;
  --font-serif: "Zodiak", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--bone);
  color: var(--ink);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle paper grain over light sections */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
  mix-blend-mode: multiply;
  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%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.04'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--ultra); color: var(--bone); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95em 1.8em;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: var(--bone); }
.btn--solid:hover { background: var(--ultra); border-color: var(--ultra); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bone); }
.btn--pill { background: var(--ink); color: var(--bone); padding: 0.8em 1.6em; }
.btn--pill:hover { background: var(--ultra); border-color: var(--ultra); }
.btn--bone { background: var(--bone); color: var(--ink); border-color: var(--bone); font-size: 0.95rem; text-transform: none; letter-spacing: 0; font-family: var(--font-display); font-weight: 600; }
.btn--bone:hover { background: var(--ultra); color: var(--bone); border-color: var(--ultra); }
/* the start-a-conversation button: mono font, visible on the black band */
.contact .btn--bone {
  background: #f2efe9; color: #0d0d10; border-color: #f2efe9;
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.78rem; font-weight: 500;
}
.contact .btn--bone:hover, .contact .btn--bone:active, .contact .btn--bone:focus-visible {
  background: var(--ultra); color: #f2efe9; border-color: var(--ultra);
}

/* ============ NAV ============ */
/* solid black static header on every page — content scrolls underneath */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem var(--pad);
  background: rgba(13, 13, 16, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(242, 239, 233, 0.12);
  color: #f2efe9;
}
.nav a, .nav .mono { color: #f2efe9; }
.nav__logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; }
.nav__mark {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
}
.nav__mark--lg { font-size: 2.6rem; }
.nav__word { font-size: 0.8rem; letter-spacing: 0.22em; font-weight: 700; }
.nav__meta { display: flex; gap: 1.2rem; margin-left: auto; opacity: 0.75; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { position: relative; padding: 0.2em 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav .btn--pill { background: #f2efe9; color: #0d0d10; border-color: #f2efe9; }
.nav .btn--pill:hover { background: var(--ultra); color: #f2efe9; border-color: var(--ultra); }

/* ============ WHITE THEME (pure white body) ============ */
.theme-white {
  --bone: #ffffff;
  --bone-dim: #f4f3f0;
}

/* ============ DARK THEME (black body, white wording) ============ */
.theme-dark {
  --ink: #f2efe9;
  --ink-soft: #d8d4cb;
  --bone: #0d0d10;
  --bone-dim: #16161b;
  --grey: #8a897f;
  --ultra-dim: #2b32ff;
}
.theme-dark::before { mix-blend-mode: screen; opacity: 0.5; }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--pad) 4rem;
  position: relative;
}
.hero__kicker { color: var(--grey); margin-bottom: 2.5rem; }
.hero__title {
  font-size: clamp(2.8rem, 9.2vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.hero__line { display: block; }
.hero__title em { font-weight: 700; }
.hero__split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
}
.hero__sub {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: var(--pad);
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--grey);
}
.hero__scrollline {
  display: inline-block; width: 4rem; height: 1px; background: var(--grey);
  transform-origin: left; animation: scrollpulse 2.2s var(--ease-out) infinite;
}
@keyframes scrollpulse {
  0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; }
}

/* ============ TRUST ============ */
.trust { border-top: 1px solid var(--ink); }
.trust__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust__stat {
  padding: 2.4rem var(--pad);
  border-right: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.trust__stat:last-child { border-right: none; }
.trust__num { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.trust__label { color: var(--grey); }
.marquee {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 0.8rem 0;
}
.marquee__track {
  display: flex; gap: 2.2rem; white-space: nowrap;
  animation: marquee 28s linear infinite;
  color: var(--grey);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SECTION SCAFFOLD ============ */
.section-kicker { color: var(--ultra); margin-bottom: 1.6rem; }
.section-kicker--light { color: var(--ultra-dim); }
.section-title {
  font-size: clamp(2rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.section-title--light { color: var(--bone); }
.section-sub { max-width: 36rem; margin-top: 1.4rem; color: var(--ink-soft); }

/* ============ PROBLEM ============ */
.problem { padding: 8rem var(--pad) 6rem; }
.problem__tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
  margin-top: 4rem;
}
.track { padding: 3rem clamp(1.5rem, 3vw, 3rem); }
.track--enterprise { background: var(--ink); color: var(--bone); }
.track--individual { background: var(--bone); }
.track__label { color: var(--ultra-dim); margin-bottom: 1.4rem; }
.track--individual .track__label { color: var(--ultra); }
.track__head {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 1.8rem; text-wrap: balance;
}
.track__list { list-style: none; display: grid; gap: 0.7rem; margin-bottom: 2rem; }
.track__list li { padding-left: 1.4rem; position: relative; font-family: var(--font-mono); font-size: 0.92rem; letter-spacing: 0; line-height: 1.5; }
.track__list li::before { content: "—"; position: absolute; left: 0; opacity: 0.5; }
.track__answer { font-size: 1.12rem; }
.track--enterprise .track__answer em { color: var(--ultra-dim); }
.track--individual .track__answer em { color: var(--ultra); }

/* ============ WORK / CASES ============ */
.work { padding: 6rem var(--pad) 8rem; }
.cases { margin-top: 4rem; display: grid; gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.case {
  background: var(--bone);
  display: grid;
  grid-template-columns: minmax(7rem, 0.6fr) 1.6fr 2.4fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding: 2.6rem clamp(1.5rem, 3vw, 3rem);
  transition: background 0.3s var(--ease-out);
}
.case:hover { background: var(--bone-dim); }
.case__meta { display: flex; flex-direction: column; gap: 0.6rem; color: var(--grey); }
.case__id { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-family: var(--font-mono); }
/* whole stories section in the mono treatment */
.case__title { font-family: var(--font-mono); font-size: clamp(1.05rem, 1.7vw, 1.4rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.case__arc { display: grid; gap: 1.1rem; }
.case__step { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: start; }
.case__step .mono { color: var(--ultra); padding-top: 0.25em; }
.case__step p { color: var(--ink-soft); font-size: 0.9rem; font-family: var(--font-mono); line-height: 1.55; }

/* ============ APPS — 3D GALLERY ============ */
.apps {
  background: var(--ink);
  color: var(--bone);
  padding: 7rem 0 3rem;
  position: relative;
}
.apps__head { padding: 0 var(--pad); }
.apps__hint { color: var(--grey); margin-top: 1.6rem; }
.apps__stage {
  position: relative;
  height: clamp(420px, 72vh, 760px);
  margin-top: 2rem;
  cursor: grab;
}
.apps__stage.is-dragging { cursor: grabbing; }
#gallery-canvas { width: 100%; height: 100%; display: block; }
.apps__tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bone);
  color: var(--ink);
  padding: 0.45em 0.9em;
  border-radius: 999px;
  transform: translate(-50%, -140%);
  white-space: nowrap;
  z-index: 5;
}
.apps__index {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem;
  padding: 2.5rem var(--pad) 2rem;
  color: var(--grey);
}
.apps__index a { transition: color 0.2s; }
.apps__index a:hover { color: var(--bone); }
.apps__index a span { color: var(--ultra-dim); margin-right: 0.5em; }

/* ============ APPROACH ============ */
.approach { padding: 8rem var(--pad); }
.approach__big {
  font-size: clamp(1.9rem, 4.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 56rem;
  text-wrap: balance;
}
.approach__big em { color: var(--ultra); }
.approach__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 4.5rem;
}
.approach__col { border-top: 1px solid var(--ink); padding-top: 1.4rem; }
.approach__h { color: var(--ultra); margin-bottom: 0.9rem; }
.approach__col p { color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.6; letter-spacing: -0.005em; }

/* ============ CONTACT ============ */
.contact {
  background: #0d0d10;
  color: #f2efe9;
  padding: 8rem var(--pad);
}
.contact .section-kicker--light { color: var(--ultra-dim); opacity: 1; }
.contact__title em { color: var(--ultra); }
.contact__title {
  font-size: clamp(2.4rem, 6.4vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.contact__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem;
  margin-top: 3.4rem;
}
.contact__note { opacity: 0.75; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: var(--bone); padding: 5rem var(--pad) 2rem; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer__brand { display: flex; flex-direction: column; gap: 1rem; }
/* footer brand line in the mono caption treatment, every page */
.footer__line {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1.8;
  text-transform: uppercase;
}
.footer__col { display: grid; gap: 0.7rem; align-content: start; color: var(--grey); }
.footer__col a { color: var(--bone); opacity: 0.8; transition: opacity 0.2s, color 0.2s; }
.footer__col a:hover { opacity: 1; color: var(--ultra-dim); }
.footer__h { color: var(--grey); margin-bottom: 0.4rem; }
.footer__small { font-size: 0.72rem; line-height: 1.7; }
.footer__legal {
  margin-top: 4.5rem; padding-top: 1.4rem;
  border-top: 1px solid var(--ink-soft);
  color: var(--grey);
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
}

/* ============================================================
   APP LANDING PAGE (app.html)
   ============================================================ */
.appland { --app-accent: var(--ultra); --app-soft: var(--ultra-dim); }
.appland__hero {
  min-height: 88svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem var(--pad) 4rem;
  background: var(--app-soft);
  position: relative; overflow: hidden;
}
.appland__hero::after {
  content: "";
  position: absolute;
  right: -12vw; bottom: -34vh;
  width: 56vw; height: 56vw;
  border-radius: 50%;
  background: var(--app-accent);
  opacity: 0.92;
}
.appland__back { color: var(--ink); opacity: 0.7; margin-bottom: 2.5rem; display: inline-flex; gap: 0.5em; }
.appland__back:hover { opacity: 1; }
.appland__name {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 900; letter-spacing: -0.04em; line-height: 0.95;
  position: relative; z-index: 2;
}
.appland__tagline {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  margin-top: 1.2rem; position: relative; z-index: 2;
}
.appland__tags { display: flex; gap: 0.6rem; margin-top: 2rem; position: relative; z-index: 2; }
.appland__tag {
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.35em 1em; font-size: 0.68rem;
}
.appland__stores { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 3rem; position: relative; z-index: 2; }

.storebtn {
  display: inline-flex; align-items: center; gap: 0.7em;
  background: var(--ink); color: var(--bone);
  border-radius: 14px; padding: 0.8em 1.4em;
  transition: transform 0.25s var(--ease-out), background 0.25s;
}
.storebtn:hover { transform: translateY(-3px); background: #000; }
.storebtn svg { width: 1.6em; height: 1.6em; flex-shrink: 0; }
.storebtn__txt { display: flex; flex-direction: column; line-height: 1.15; }
.storebtn__pre { font-size: 0.62rem; opacity: 0.75; font-family: var(--font-mono); letter-spacing: 0.06em; }
.storebtn__main { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }

.appland__body { padding: 6rem var(--pad); }
.appland__desc {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.3;
  max-width: 50rem; text-wrap: balance;
}
.appland__arc {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--ink); border: 1px solid var(--ink);
  margin-top: 5rem;
}
.appland__arccell { background: var(--bone); padding: 2.4rem 2rem; }
.appland__arccell .mono { color: var(--app-accent); margin-bottom: 1.2rem; display: block; }
.appland__arccell p { color: var(--ink-soft); }

.appland__features { margin-top: 6rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.feature { border-top: 2px solid var(--app-accent); padding-top: 1.3rem; }
.feature h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.feature p { color: var(--ink-soft); font-size: 0.98rem; }

.appland__cta {
  background: var(--ink); color: var(--bone);
  padding: 7rem var(--pad); text-align: center;
}
.appland__cta h2 {
  font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 2.4rem; text-wrap: balance;
}
.appland__cta .appland__stores { justify-content: center; margin-top: 0; position: static; }
.appland__cta .storebtn { background: var(--bone); color: var(--ink); }
.appland__cta .storebtn:hover { background: var(--app-soft); }

.appland__others { padding: 5rem var(--pad); border-top: 1px solid var(--ink); }
.appland__others h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 2rem; }
.appland__otherrow { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.appland__otherrow a {
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.7em 1.5em; font-weight: 600;
  transition: background 0.25s, color 0.25s;
}
.appland__otherrow a:hover { background: var(--ink); color: var(--bone); }

/* ============================================================
   CINEMATIC SCRUB SECTIONS (scroll plays the clip)
   ============================================================ */
.scrub { position: relative; height: 460vh; }
.scrub--short { height: 320vh; }
.scrub__stage {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
}
.scrub__stage canvas { width: 100%; height: 100%; display: block; }
.scrub__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,16,0.25) 0%, rgba(13,13,16,0) 30%, rgba(13,13,16,0) 70%, rgba(13,13,16,0.45) 100%);
  pointer-events: none;
}
.scrub__veil--bone {
  background: linear-gradient(180deg, rgba(242,239,233,0.4) 0%, rgba(242,239,233,0) 30%, rgba(242,239,233,0) 65%, rgba(242,239,233,1) 100%);
}
.scrub__veil--ink {
  background: linear-gradient(180deg, rgba(13,13,16,0.5) 0%, rgba(13,13,16,0) 30%, rgba(13,13,16,0) 65%, rgba(13,13,16,1) 100%);
}
.scrub__veil--white {
  background: linear-gradient(180deg,
    rgba(13,13,16,0.55) 0%,
    rgba(13,13,16,0.35) 45%,
    rgba(13,13,16,0.15) 70%,
    rgba(255,255,255,1) 100%);
}
.scrub-line {
  position: absolute;
  left: var(--pad); right: var(--pad);
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}
.scrub-line--center { text-align: center; }
.scrub-line--bottom { bottom: 14vh; }
.scrub-line--mid { top: 42vh; }
.scrub-line .mono { display: block; margin-bottom: 1rem; }
.scrub__h1 {
  font-size: clamp(2.6rem, 8.4vw, 7.6rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance;
}
.scrub__h2 {
  font-size: clamp(1.8rem, 4.6vw, 4rem);
  line-height: 1.02; letter-spacing: -0.03em; font-weight: 800;
  text-wrap: balance;
}
.scrub__p { max-width: 32rem; font-size: clamp(1rem, 1.4vw, 1.25rem); }
.scrub__p--lead { max-width: 44rem; font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.4; opacity: 0.92; }

/* ============================================================
   HERO SUBTEXT — MONO TREATMENT
   Applies the kicker (JetBrains Mono) font to the supporting
   copy beneath every hero headline. To ROLL BACK: delete this
   whole block.
   ============================================================ */
.scrub__p,
.work-hero__sub,
.wires-hero__sub,
.page-hero__sub {
  font-family: var(--font-mono);
  letter-spacing: -0.005em;
  line-height: 1.55;
}
.scrub__p--lead { font-size: clamp(0.92rem, 1.35vw, 1.16rem); letter-spacing: 0; line-height: 1.6; }
.work-hero__sub,
.wires-hero__sub,
.page-hero__sub { font-size: clamp(0.92rem, 1.2vw, 1.08rem); }
.scrub-line .btn { pointer-events: auto; }
.t-ink { color: var(--ink); }
.t-bone { color: var(--bone); }

/* ============ INNER PAGE HERO ============ */
.page-hero { padding: 11rem var(--pad) 5rem; }
.page-hero--dark { background: var(--ink); color: var(--bone); }
.page-hero__title {
  font-size: clamp(2.6rem, 7.4vw, 6.4rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance;
}
.page-hero__sub { max-width: 36rem; margin-top: 1.8rem; font-size: clamp(1.05rem, 1.4vw, 1.3rem); }

/* ============ ABOUT — INTERTWINED WIRES HERO ============ */
.wires-hero {
  position: relative;
  background: #0d0d10;
  color: #f2efe9;
  min-height: 92svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.wires-hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.wires-hero__inner {
  position: relative; z-index: 2;
  padding: 8rem var(--pad) 5rem;
  max-width: 52rem;
  pointer-events: none;
}
.wires-hero__inner .section-kicker { color: var(--ultra-dim); }
.wires-hero__title {
  font-size: clamp(2.8rem, 8vw, 7rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance;
  color: #f2efe9;
}
.wires-hero__sub {
  margin-top: 2rem;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: rgba(242, 239, 233, 0.82);
}

/* ============ NAV ACTIVE STATE ============ */
.nav__links a.is-active::after { transform: scaleX(1); }

/* ============ HOME TEASERS ============ */
.teaser { padding: 7rem var(--pad); }
.teaser__row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.6rem; margin-bottom: 3.5rem;
}
.teaser__more { white-space: nowrap; }
/* homepage apps section: live, always-rotating 3D wall with named tiles */
.apps-teaser {
  position: relative;
  background: #0d0d10; color: #f2efe9;
  padding: 0;
  overflow: hidden;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
}
.apps-teaser__stage {
  position: absolute; inset: 0;
  cursor: grab;
}
.apps-teaser__stage canvas { width: 100%; height: 100%; display: block; }
.apps-teaser__inner {
  position: relative; z-index: 2;
  max-width: 46rem;
  padding: 8rem var(--pad) 5rem;
  pointer-events: none;
}
.apps-teaser__inner .btn { pointer-events: auto; }
.apps-teaser .section-title { color: #f2efe9; }
.apps-teaser .section-kicker--light { color: var(--ultra-dim); }
.apps-teaser__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.2rem 0 2.6rem; }
.apps-teaser__chips span {
  border: 1px solid rgba(242,239,233,0.35); border-radius: 999px;
  padding: 0.4em 1em; font-size: 0.68rem;
}

/* ============ WORK PAGE ============ */
/* black hero: keyboard in the dark, dragonfly light, shooting stars */
.work-hero {
  position: relative;
  background: #0d0d10;
  color: #f2efe9;
  min-height: 94svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.work-hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.work-hero__inner {
  position: relative; z-index: 2;
  padding: 8rem var(--pad) 5rem;
  max-width: 44rem;
  pointer-events: none;
}
.work-hero__inner .section-kicker { color: var(--ultra-dim); }
.work-hero__title {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance;
  color: #f2efe9;
}
.work-hero__sub {
  margin-top: 1.8rem;
  max-width: 32rem;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: rgba(242, 239, 233, 0.78);
}

/* ============ 3D WAVE DIVIDER ============ */
.wave-divider {
  background: #0d0d10;
  height: clamp(110px, 16vh, 170px);
  position: relative;
  overflow: hidden;
}
.wave-divider canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* ============ DEVICE MOCKUPS ============ */
.laptop {
  max-width: 56rem;
  margin: 3.5rem 0 0;
  position: relative; z-index: 2;
}
.laptop__screen {
  background: #0a0a0d;
  border: 2px solid #2a2a30;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 12px 12px 0;
}
.laptop__screen canvas {
  width: 100%; height: auto; display: block;
  border-radius: 8px 8px 0 0;
}
.laptop__base {
  height: 16px;
  background: linear-gradient(180deg, #3a3a42, #232329);
  border-radius: 0 0 14px 14px;
  position: relative;
}
.laptop__base::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 14%; height: 6px;
  background: #18181d;
  border-radius: 0 0 8px 8px;
}

.iphone {
  width: clamp(220px, 24vw, 300px);
  aspect-ratio: 390 / 800;
  position: relative; z-index: 2;
  background: #0a0a0d;
  border: 3px solid #2a2a30;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 30px 60px rgba(13, 13, 16, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
  will-change: transform;
}
.iphone canvas {
  width: 100%; height: 100%; display: block;
  border-radius: 32px;
}
.iphone__notch {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 18px;
  background: #0a0a0d;
  border-radius: 10px;
}
.iphone-scene {
  perspective: 1100px;
  display: flex;
  justify-content: center;
  /* must sit above the hero's decorative accent circle */
  position: relative;
  z-index: 3;
}

.appland__hero--device {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 980px) {
  .appland__hero--device { grid-template-columns: 1fr; }
  .iphone-scene { justify-content: flex-start; }
}

/* ============ PLATFORM BADGES ============ */
.platform-badges { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 2.2rem; position: relative; z-index: 2; }
.platformbadge {
  display: inline-flex; align-items: center; gap: 0.6em;
  background: #0d0d10; color: #f2efe9;
  border-radius: 12px;
  padding: 0.75em 1.2em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}
.platformbadge svg { width: 1.5em; height: 1.5em; flex-shrink: 0; }

/* the stories section sits on pure white, whatever the theme */
body[data-page="business"] .work { background: #ffffff; }
body[data-page="business"] .case { background: #ffffff; }
body[data-page="business"] .case:hover { background: #f4f3f0; }

.process { padding: 6rem var(--pad) 8rem; border-top: 1px solid var(--ink); }
.process--dark {
  background: #0d0d10;
  color: #f2efe9;
  border-top: none;
}
.process--dark .section-title { color: #f2efe9; }
.process--dark .section-kicker { color: var(--ultra-dim); }
.process--dark .process__grid { background: #26262c; border-color: #26262c; }
.process--dark .process__step { background: #131318; }
.process--dark .process__step h3 { color: #f2efe9; }
.process--dark .process__step p { color: rgba(242, 239, 233, 0.72); }
.process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); margin-top: 3.5rem; }
.process__step { background: var(--bone); padding: 2.2rem 1.8rem; }
.process__num { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ultra); display: block; margin-bottom: 1.2rem; }
.process__step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.7rem; }
.process__step p { font-size: 0.95rem; color: var(--ink-soft); }

/* ============ ABOUT PAGE ============ */
.mission { padding: 7rem var(--pad); }
.mission__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ink); border: 1px solid var(--ink); margin-top: 3.5rem; }
.mission__cell { background: var(--bone); padding: 3rem clamp(1.5rem, 3vw, 3rem); }
.mission__cell--dark { background: var(--ink); color: var(--bone); }
.mission__cell .mono { color: var(--ultra); display: block; margin-bottom: 1.4rem; }
.mission__cell--dark .mono { color: var(--ultra-dim); }
/* about page — mono treatment: mission cells + how-we-work tracks (user request) */
.mission__cell h3,
body[data-page="about"] .track__head {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
  margin-bottom: 1rem; text-wrap: balance;
}
.mission__cell p,
body[data-page="about"] .track p:not(.track__label) {
  font-family: var(--font-mono);
  font-size: 0.9rem; line-height: 1.6; letter-spacing: -0.005em;
}

/* ============ CONTACT PAGE ============ */
.contact-page { padding: 11rem var(--pad) 7rem; min-height: 80svh; }
.contact-page__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 6rem); margin-top: 4rem; }
.cform { display: grid; gap: 1.4rem; }
.cform label { display: grid; gap: 0.5rem; }
.cform .mono { color: var(--grey); }
.cform input, .cform textarea, .cform select {
  font-family: var(--font-display); font-size: 1.05rem;
  background: transparent; color: var(--ink);
  border: none; border-bottom: 1px solid var(--ink);
  padding: 0.7em 0; border-radius: 0;
  transition: border-color 0.25s;
}
.cform input:focus, .cform textarea:focus, .cform select:focus { outline: none; border-bottom-color: var(--ultra); border-bottom-width: 2px; }
.cform textarea { resize: vertical; min-height: 7rem; }
.contact-aside { display: grid; gap: 2.4rem; align-content: start; }
.contact-aside__block .mono { color: var(--ultra); display: block; margin-bottom: 0.7rem; }
.contact-aside__block a { font-weight: 600; }
.contact-aside__block a:hover { color: var(--ultra); }

/* ============ LAUNCH LIST + FEEDBACK ============ */
.launchlist {
  padding: 7rem var(--pad);
  border-top: 1px solid var(--ink);
  background: var(--bone-dim);
}
.launchlist__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.launchlist__form { max-width: 32rem; }
/* mono treatment: launch-list intro, the "you are" select, the checkbox label */
#launch-list .section-sub {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.1vw, 0.98rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
}
#launch-list select { font-family: var(--font-mono); font-size: 0.95rem; }
.launchlist__check {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.86rem;
  font-family: var(--font-mono);
  line-height: 1.55;
}
.launchlist__check input {
  width: 1.1rem; height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--ultra);
  flex-shrink: 0;
}
.launchlist__status { min-height: 1.2em; }
.launchlist__ideas {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--ink);
}
.launchlist__ideah {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.apps .launchlist, body[data-page="apps"] .launchlist {
  background: var(--ink); color: var(--bone);
  border-top-color: var(--ink-soft);
}
body[data-page="apps"] .launchlist .section-title,
body[data-page="apps"] .launchlist .launchlist__ideah { color: var(--bone); }
body[data-page="apps"] .launchlist .section-sub { color: var(--bone-dim); }
body[data-page="apps"] .launchlist .cform input,
body[data-page="apps"] .launchlist .cform textarea,
body[data-page="apps"] .launchlist .cform select {
  color: var(--bone); border-bottom-color: var(--grey);
}
body[data-page="apps"] .launchlist .cform select option { color: var(--ink); }
body[data-page="apps"] .launchlist .btn--solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
body[data-page="apps"] .launchlist .btn--ghost { color: var(--bone); border-color: var(--bone); }
body[data-page="apps"] .launchlist .launchlist__ideas { border-top-color: var(--ink-soft); }

.appfeedback { padding: 6rem var(--pad); border-top: 1px solid var(--ink); }
.appfeedback__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2.5rem); margin: 3rem 0 1.5rem; }
.appfeedback h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.appfeedback .section-sub { margin-top: 1rem; }

/* ============ COMING SOON BANNER (app pages) ============ */
.appland__banner {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem;
  background: #0d0d10; color: #f2efe9;
  border-left: 5px solid var(--app-accent);
  border-radius: 10px;
  padding: 1rem 1.4rem;
  margin-bottom: 3rem;
  max-width: 62rem;
}
.appland__banner .mono { color: var(--app-soft); letter-spacing: 0.14em; }
.appland__banner p { font-size: 0.98rem; opacity: 0.9; }
.appland__banner a {
  font-weight: 700; font-size: 0.98rem;
  text-decoration: underline; text-underline-offset: 4px;
  transition: color 0.2s;
}
.appland__banner a:hover { color: var(--app-soft); }

/* ============ PRELOADER ============ */
html.is-loading { overflow: hidden; }
.preloader {
  position: fixed; inset: 0;
  z-index: 20000;
  background: #0d0d10;
  color: #f2efe9;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.4rem;
  transition: opacity 0.65s var(--ease-out), visibility 0.65s;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__mark {
  font-family: var(--font-display);
  font-weight: 900; font-size: 2.4rem; letter-spacing: -0.05em;
}
.preloader__num { color: rgba(242, 239, 233, 0.75); letter-spacing: 0.14em; }
.preloader__bar {
  width: min(320px, 60vw); height: 1px;
  background: rgba(242, 239, 233, 0.15);
  position: relative; overflow: hidden;
}
.preloader__bar i {
  position: absolute; inset: 0;
  background: var(--ultra);
  transform: scaleX(0); transform-origin: left;
}

/* ============ CONTACT PAGE — DARK EDITION ============ */
body[data-page="contact"].theme-dark .contact-page {
  position: relative;
  overflow: hidden;
}
.contact-page__glow {
  position: absolute;
  top: -18vw; right: -14vw;
  width: 56vw; height: 56vw;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(43, 50, 255, 0.34) 0%,
    rgba(43, 50, 255, 0.12) 40%,
    rgba(43, 50, 255, 0) 70%);
  pointer-events: none;
}
.contact-page__glow--bottom {
  top: auto; right: auto;
  bottom: -30vw; left: -18vw;
  opacity: 0.6;
}
.contact-page .page-hero__title em { color: var(--ultra); -webkit-text-stroke: 0; }
.contact-bigmail {
  display: inline-block;
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  font-weight: 700; letter-spacing: -0.02em;
  border-bottom: 2px solid var(--ultra);
  padding-bottom: 0.15em;
  transition: color 0.25s;
}
.contact-bigmail:hover { color: var(--ultra); }
.next-steps {
  position: relative; z-index: 2;
  padding: 5rem var(--pad) 6rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.next-steps__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 3rem;
}
.next-step { border-top: 2px solid var(--ultra); padding-top: 1.3rem; }
.next-step .mono { color: var(--ultra); display: block; margin-bottom: 0.8rem; }
.next-step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
.next-step p { color: var(--ink-soft); font-size: 0.96rem; }
.contact-big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 17vw, 17rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  padding: 2rem var(--pad) 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 239, 233, 0.3);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  transition: -webkit-text-stroke-color 0.4s;
}
.contact-big:hover { -webkit-text-stroke-color: rgba(43, 50, 255, 0.85); }

/* ============ LIGHT CURSOR + WATER SPLASH ============ */
html.has-glow-cursor, html.has-glow-cursor * { cursor: none !important; }
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 180px; height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  background: radial-gradient(circle,
    rgba(43, 50, 255, 0.28) 0%,
    rgba(43, 50, 255, 0.10) 38%,
    rgba(43, 50, 255, 0) 70%);
  will-change: transform;
}
.cursor-glow::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--ultra);
  box-shadow: 0 0 14px 3px rgba(43, 50, 255, 0.65);
}
/* over blue surfaces the light turns white */
.cursor-glow.is-white {
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.12) 38%,
    rgba(255, 255, 255, 0) 70%);
}
.cursor-glow.is-white::after {
  background: #ffffff;
  box-shadow: 0 0 14px 3px rgba(255, 255, 255, 0.7);
}
.splash--white .splash__ring { border-color: rgba(255, 255, 255, 0.7); }
.splash--white .splash__drop { background: #ffffff; box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.55); }
.splash {
  position: fixed;
  pointer-events: none;
  z-index: 10001;
  width: 0; height: 0;
}
.splash__ring {
  position: absolute; top: 0; left: 0;
  width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 2px solid rgba(43, 50, 255, 0.55);
  transform: scale(0.12);
  opacity: 1;
  animation: splash-ring 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.splash__ring--late {
  width: 170px; height: 170px;
  margin: -85px 0 0 -85px;
  border-width: 1px;
  animation-delay: 0.13s;
  animation-duration: 1s;
}
@keyframes splash-ring {
  0% { transform: scale(0.12); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}
.splash__drop {
  position: absolute; top: 0; left: 0;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--ultra);
  box-shadow: 0 0 10px 2px rgba(43, 50, 255, 0.5);
  opacity: 0;
}
.splash__drop--l { animation: drop-l 0.95s cubic-bezier(0.3, 0.6, 0.4, 1) 0.05s forwards; }
.splash__drop--r { animation: drop-r 0.85s cubic-bezier(0.3, 0.6, 0.4, 1) 0.1s forwards; }
@keyframes drop-l {
  0%   { transform: translate(0, 0) scale(1);    opacity: 0; }
  12%  { opacity: 1; }
  45%  { transform: translate(-16px, -44px) scale(0.9); opacity: 1; }
  100% { transform: translate(-24px, 6px) scale(0.55);  opacity: 0; }
}
@keyframes drop-r {
  0%   { transform: translate(0, 0) scale(1);    opacity: 0; }
  12%  { opacity: 1; }
  45%  { transform: translate(13px, -32px) scale(0.8); opacity: 1; }
  100% { transform: translate(20px, 5px) scale(0.5);   opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-glow, .splash { display: none; }
  html.has-glow-cursor, html.has-glow-cursor * { cursor: auto !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .nav__meta { display: none; }
  .nav__links { gap: 1rem; }
  .nav__word { display: none; }
  .process__grid { grid-template-columns: 1fr 1fr; }
  .mission__grid { grid-template-columns: 1fr; }
  .contact-page__grid { grid-template-columns: 1fr; }
  .launchlist__grid { grid-template-columns: 1fr; }
  .appfeedback__grid { grid-template-columns: 1fr; }
  .trust__row { grid-template-columns: repeat(2, 1fr); }
  .trust__stat:nth-child(2n) { border-right: none; }
  .trust__stat { border-bottom: 1px solid var(--ink); }
  .problem__tracks { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; gap: 1.4rem; }
  .case__step { grid-template-columns: 7.5rem 1fr; }
  .approach__cols { grid-template-columns: 1fr; gap: 2rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .appland__arc { grid-template-columns: 1fr; }
  .appland__features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .trust__row { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}
