/* Kites Labs v3 — Desyre-style monochrome build */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0a0a0a;
  --paper: #fafafa;
  --mut: rgba(250, 250, 250, 0.62);
  --mut-d: rgba(10, 10, 10, 0.62);
  --hair: rgba(250, 250, 250, 0.22);
  --hair-d: rgba(10, 10, 10, 0.16);
  --pad: clamp(20px, 2.8vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-transform: uppercase; font-weight: 700; line-height: 1.04; letter-spacing: -0.01em; }
sup { font-size: 0.32em; font-weight: 600; vertical-align: super; }
canvas { display: block; }

section, footer { scroll-margin-top: 0; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ================= PRELOADER ================= */
.preload {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.preload.gone { transform: translateY(-101%); }
.preload-in { text-align: center; }
.preload-brand {
  display: block; font-size: clamp(30px, 5vw, 54px); font-weight: 800;
  letter-spacing: 0.02em;
  animation: prepulse 1.4s var(--ease) both;
}
.preload-sub { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mut); animation: prepulse 1.4s 0.15s var(--ease) both; }
@keyframes prepulse { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ================= NAV ================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--pad);
  color: #fff; transition: color 0.35s var(--ease);
}
.nav.on-light { color: var(--ink); }
.nav-brand { font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 44px); }
.nav-links a, .nav-burger {
  font-weight: 700; font-size: 14.5px; letter-spacing: 0.04em;
  position: relative; overflow: hidden; display: inline-block;
}
.nav-links a span, .nav-burger span { opacity: 0.7; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-burger { display: none; background: none; border: 0; color: inherit; font-family: inherit; cursor: pointer; }

.menu-pop {
  position: fixed; inset: 0; z-index: 95; background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: var(--pad); gap: 8px;
  transform: translateY(-101%); transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}
.menu-pop.open { transform: none; }
.menu-close { position: absolute; top: 30px; right: var(--pad); background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; color: inherit; }
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a { font-size: clamp(38px, 9vw, 64px); font-weight: 800; text-transform: uppercase; line-height: 1.1; }

/* ================= HERO ================= */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  filter: saturate(0.5) brightness(0.96) contrast(1.04);
  animation: heroken 34s ease-in-out infinite alternate;
}
@keyframes heroken { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(10,10,10,0.55), rgba(10,10,10,0.1) 30%, rgba(10,10,10,0.08) 55%, rgba(10,10,10,0.78) 92%);
}
.hero-grain, .about > .about-canvas { pointer-events: none; }
.hero-grain {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-bottom { position: absolute; left: 0; right: 0; bottom: 3vh; padding: 0 var(--pad); }
.hero-role { font-size: clamp(17px, 1.9vw, 26px); font-weight: 700; margin: 0 0 -1vw 0.5vw; }
.hero-display {
  font-size: clamp(52px, 14.3vw, 218px);
  font-weight: 800; letter-spacing: -0.015em; line-height: 0.95;
  white-space: nowrap;
}
.hero-line { display: inline-block; animation: heroup 1.2s 1.15s var(--ease) both; }
@keyframes heroup { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
.scroll-pill {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 10px; border-radius: 99px; border: 1.5px solid rgba(255,255,255,0.7);
  animation: pillfade 2.2s ease-in-out infinite;
}
@keyframes pillfade { 0%,100% { opacity: 0.9; } 50% { opacity: 0.3; } }

/* ================= ABOUT ================= */
.about { position: relative; padding: 16vh 0 10vh; overflow: hidden; }
.about-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.about-rows { position: relative; }
.about-row {
  position: relative; border-bottom: 1px solid var(--hair);
  padding: clamp(14px, 2vw, 26px) var(--pad);
  cursor: default;
}
.about-row:first-child { border-top: 1px solid var(--hair); }
.about-row h2 {
  position: relative; z-index: 2;
  font-size: clamp(34px, 6.6vw, 96px); font-weight: 800; letter-spacing: -0.01em;
  transition: color 0.35s var(--ease), padding-left 0.5s var(--ease);
}
.about-bar {
  position: absolute; inset: 0; z-index: 1; background: var(--paper);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.55s var(--ease);
}
.about-row:hover .about-bar { transform: scaleX(1); }
.about-row:hover h2 { color: var(--ink); padding-left: clamp(120px, 14vw, 220px); }
.about-thumb {
  position: absolute; left: var(--pad); top: 50%; z-index: 2;
  width: clamp(88px, 10vw, 150px); height: auto; aspect-ratio: 4/5; object-fit: cover;
  transform: translateY(-50%) scale(0.6); opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.about-row:hover .about-thumb { opacity: 1; transform: translateY(-50%) scale(1) rotate(-3deg); }
.about-feet {
  display: flex; justify-content: space-between; gap: 30px;
  padding: 12vh var(--pad) 0; font-size: 15px; color: var(--mut);
}
.about-feet p:last-child { text-align: right; }

/* ================= GAUNTLET ================= */
.gauntlet { position: relative; padding: 18vh 0 14vh; }
.gauntlet-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0 var(--pad);
}
.kicker { font-size: 15px; letter-spacing: 0.02em; }
.sec-label { font-size: clamp(19px, 2vw, 27px); font-weight: 800; text-transform: uppercase; }
.sec-label-dark { color: var(--ink); }

.scatter {
  padding: 10vh var(--pad) 12vh;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.scatter-word {
  display: block; font-weight: 800; text-transform: uppercase;
  font-size: clamp(56px, 11vw, 168px); line-height: 0.98; letter-spacing: -0.01em;
}
.scatter-word b { display: inline-block; font-weight: inherit; }

.acc { border-top: 1px solid var(--hair); margin: 0 var(--pad); }
.acc-row { border-bottom: 1px solid var(--hair); }
.acc-top {
  display: grid; grid-template-columns: 90px 1fr 60px; align-items: center;
  padding: clamp(20px, 2.6vw, 34px) 4px; cursor: pointer; gap: 10px;
}
.acc-no { font-size: 15px; font-weight: 600; color: var(--mut); }
.acc-mid { display: flex; align-items: center; gap: 26px; min-width: 0; }
.acc-mid h3 { font-size: clamp(22px, 2.6vw, 38px); letter-spacing: 0.01em; flex-shrink: 0; }
.acc-thumb {
  width: 104px; height: 62px; flex-shrink: 0; object-fit: cover;
  opacity: 0; transform: scaleX(0.4); transform-origin: left center;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.acc-hint {
  font-size: 14px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateX(-14px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.acc-row:hover .acc-thumb, .acc-row.open .acc-thumb { opacity: 1; transform: none; }
.acc-row:hover .acc-hint, .acc-row.open .acc-hint { opacity: 1; transform: none; }
.acc-chev { position: relative; width: 26px; height: 26px; justify-self: end; transition: transform 0.45s var(--ease); }
.acc-chev::before, .acc-chev::after {
  content: ""; position: absolute; top: 12px; width: 14px; height: 2px; background: var(--paper);
}
.acc-chev::before { left: 1px; transform: rotate(38deg); }
.acc-chev::after { right: 1px; transform: rotate(-38deg); }
.acc-row.open .acc-chev { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.6s var(--ease); }
.acc-body p { padding: 0 4px 30px 90px; max-width: 62ch; color: var(--mut); font-size: 16.5px; }

/* ================= BENCH CUBE ================= */
.bench-wrap { position: relative; height: 380vh; background: var(--paper); color: var(--ink); }
.bench {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.bench-side { position: absolute; top: 50%; transform: translateY(-50%); font-size: clamp(15px, 1.8vw, 26px); font-weight: 800; text-transform: uppercase; }
.bench-side-l { left: var(--pad); }
.bench-side-r { right: var(--pad); }
.cube-scene { perspective: 1300px; }
.cube {
  position: relative; transform-style: preserve-3d;
  width: min(560px, 84vw); height: min(560px, 84vw);
  max-height: 74vh; max-width: 74vh;
}
.cube-face {
  position: absolute; inset: 0; overflow: hidden;
  background: #101010; color: var(--paper);
  backface-visibility: hidden;
}
.cube-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cube-cap {
  position: absolute; inset: 0; background: #0b0b0b;
  backface-visibility: hidden; overflow: hidden;
}
.cube-top img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.42) saturate(0.7);
}
.cube-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(6,6,6,0.55), rgba(6,6,6,0.2)); }
.face-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(6,6,6,0.18), rgba(6,6,6,0) 38%, rgba(6,6,6,0.86) 88%); }
.cube-meta { position: absolute; inset: auto 0 0 0; padding: clamp(18px, 3.4vw, 34px); z-index: 2; }
.cube-code { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; color: var(--mut); display: block; margin-bottom: 8px; }
.cube-meta h3 { font-size: clamp(21px, 3.2vw, 34px); margin-bottom: 8px; }
.cube-meta p { font-size: 13.5px; color: var(--mut); max-width: 46ch; margin-bottom: 14px; }
.cube-prog { height: 2px; background: rgba(250,250,250,0.22); position: relative; margin-bottom: 8px; }
.cube-prog i { position: absolute; inset: 0 auto 0 0; background: var(--paper); }
.cube-pct { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; color: var(--mut); }
.bench-count { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; }

/* ================= FAMILY ================= */
.family { padding: 16vh 0; overflow: hidden; }
.family > .sec-label { display: block; padding: 0 var(--pad); margin-bottom: 7vh; }
.marquee { overflow: hidden; }
.marquee-track {
  display: flex; gap: clamp(24px, 3vw, 48px); width: max-content;
  padding: 0 var(--pad);
  animation: marq 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fam-card {
  width: clamp(300px, 34vw, 470px); flex-shrink: 0;
  border: 1px solid var(--hair); padding: clamp(24px, 2.6vw, 40px);
}
.fam-card h3 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 16px; }
.fam-card p { color: var(--mut); font-size: 15.5px; }

/* ================= CREED / CAPABILITIES ================= */
.creed { padding: 10vh var(--pad) 16vh; }
.creed-head { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; }
.creed-big { font-size: clamp(30px, 5.2vw, 76px); font-weight: 800; max-width: 12em; }
.creed-cite { margin-top: 3vh; color: var(--mut); font-size: 14px; letter-spacing: 0.06em; }
.cap-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; margin-top: 14vh; }
.cap-kicker, .cap-list-title { font-size: clamp(20px, 2.2vw, 30px); font-weight: 800; }
.cap-zero { font-size: clamp(150px, 22vw, 330px); font-weight: 800; line-height: 0.9; color: rgba(250,250,250,0.85); overflow: hidden; }
.digit-roll { display: inline-block; }
.cap-stat p { color: var(--mut); font-size: 15px; margin-top: 12px; }
.cap-tools h3 { font-size: clamp(24px, 2.6vw, 38px); color: rgba(250,250,250,0.5); }
.cap-sub { color: var(--mut); font-size: 15px; margin: 14px 0 46px; }
.cap-list ul { list-style: none; margin-top: 18px; }
.cap-list li {
  font-size: clamp(19px, 1.9vw, 26px); font-weight: 600; text-transform: uppercase;
  padding: 14px 0; border-bottom: 1px solid var(--hair);
}
.cap-list li:first-child { border-top: 1px solid var(--hair); }
.cap-systems { margin-top: 52px; }
.cap-sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 38px 30px; margin-top: 26px; }
.cap-sys svg { width: 40px; height: 40px; color: var(--paper); margin-bottom: 14px; }
.cap-sys p { color: var(--mut); font-size: 14.5px; max-width: 30ch; }

/* ================= COLLABORATE ================= */
.collab { background: var(--paper); color: var(--ink); padding: 16vh 0 10vh; }
.collab-head { display: flex; justify-content: space-between; gap: 40px; padding: 0 var(--pad); }
.collab-big { font-size: clamp(30px, 5.2vw, 76px); font-weight: 800; max-width: 13em; }
.ticker { overflow: hidden; border-top: 1px solid var(--hair-d); border-bottom: 1px solid var(--hair-d); margin-top: 9vh; padding: 14px 0; }
.ticker-track { display: flex; width: max-content; animation: marq 28s linear infinite; }
.ticker-track span { font-size: 14px; font-weight: 600; letter-spacing: 0.16em; white-space: nowrap; color: var(--mut-d); }
.serv-cards { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 40px); padding: 9vh var(--pad) 0; }
.serv-card {
  position: relative; display: block; height: clamp(300px, 58vh, 620px); overflow: hidden;
  background: #101010; color: var(--paper);
}
.serv-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.serv-card:hover img { transform: scale(1.045); }
.serv-card h3 { position: absolute; top: clamp(20px, 3vw, 40px); left: clamp(20px, 3vw, 40px); font-size: clamp(34px, 5.4vw, 78px); font-weight: 800; z-index: 2; }
.serv-view {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) translateY(14px);
  font-size: 14.5px; font-weight: 700; letter-spacing: 0.1em; z-index: 2;
  opacity: 0; transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.serv-view i { font-style: normal; background: var(--paper); color: var(--ink); width: 22px; height: 22px; display: grid; place-items: center; font-size: 10px; }
.serv-card:hover .serv-view { opacity: 1; transform: translate(-50%, -50%); }

/* ================= CTA ================= */
.cta-wrap { height: 300vh; position: relative; background: var(--paper); }
.cta { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cta-card { position: absolute; inset: 84px clamp(12px, 2.6vw, 38px) clamp(12px, 2.6vw, 38px); overflow: hidden; background: #060606; }
.cta-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-shade { background: linear-gradient(rgba(6,6,6,0.5), rgba(6,6,6,0.28) 45%, rgba(6,6,6,0.62)); }
.cta-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px; }
.cta-swap { position: relative; height: clamp(60px, 9vw, 130px); width: 100%; }
.cta-word {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(44px, 8.4vw, 122px); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; color: #efe9e4; white-space: nowrap;
  opacity: 0; transform: translateY(40px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.cta-word.is-on { opacity: 1; transform: none; }
.cta-in > p { margin: 26px 0 34px; font-size: 16.5px; color: rgba(250,250,250,0.85); }
.cta-btn {
  background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 15px; letter-spacing: 0.08em;
  padding: 17px 34px; display: inline-flex; align-items: center; gap: 12px;
  transition: transform 0.4s var(--ease);
}
.cta-btn:hover { transform: scale(1.05); }
.cta-btn i { font-style: normal; background: var(--ink); color: var(--paper); width: 20px; height: 20px; display: grid; place-items: center; font-size: 9px; }

/* ================= FOOTER ================= */
.foot { background: var(--paper); color: var(--ink); padding: 12vh var(--pad) 30px; }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 0.6fr; gap: 50px; align-items: start; }
.foot-mail { font-size: clamp(24px, 2.6vw, 38px); font-weight: 800; text-transform: uppercase; line-height: 1.08; letter-spacing: -0.01em; }
.foot-mail:hover { text-decoration: underline; text-underline-offset: 6px; }
.foot-mid > p { font-size: 16px; }
.foot-build { margin-top: 22px; font-weight: 700; }
.foot-links { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; font-weight: 700; font-size: 15px; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-base {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 12vh; padding-top: 22px; border-top: 1px solid var(--hair-d);
  font-size: 13px; color: var(--mut-d);
}

/* form */
.lead-form { margin-top: 36px; display: flex; flex-direction: column; gap: 0; max-width: 520px; }
.form-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; margin-bottom: 16px; }
.lead-form input, .lead-form textarea {
  background: none; border: 0; border-bottom: 1.5px solid var(--ink);
  font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: 0.05em;
  padding: 14px 2px; color: var(--ink); border-radius: 0; resize: vertical;
}
.lead-form input::placeholder, .lead-form textarea::placeholder { color: var(--mut-d); }
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-bottom-width: 2.5px; }
.lead-form button {
  margin-top: 26px; align-self: flex-start; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 0;
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: 0.08em;
  padding: 16px 30px; display: inline-flex; align-items: center; gap: 12px;
  transition: transform 0.4s var(--ease);
}
.lead-form button:hover { transform: scale(1.04); }
.lead-form button:disabled { opacity: 0.5; }
.lead-form button i { font-style: normal; background: var(--paper); color: var(--ink); width: 20px; height: 20px; display: grid; place-items: center; font-size: 9px; }
.form-msg { margin-top: 14px; font-size: 14px; font-weight: 600; min-height: 20px; }
.form-msg.ok { color: #0a0a0a; }
.form-msg.err { color: #b3261e; }

/* ================= RESPONSIVE ================= */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-block; }
  .about-feet { flex-direction: column; }
  .about-feet p:last-child { text-align: left; }
  .cap-grid { grid-template-columns: 1fr; gap: 80px; }
  .foot-grid { grid-template-columns: 1fr; gap: 46px; }
  .foot-links { align-items: flex-start; }
  .acc-hint { display: none; }
  .acc-top { grid-template-columns: 56px 1fr 40px; }
  .acc-body p { padding-left: 56px; }
  .creed-head, .collab-head { flex-direction: column-reverse; gap: 18px; }
  .hero-display { font-size: 13.4vw; }
  .cube { max-width: none; max-height: none; }
  .bench-side-l { top: 12vh; }
  .bench-side-r { top: auto; bottom: 10vh; transform: none; }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .hero-line, .preload-brand, .preload-sub { animation: none; transition: none; opacity: 1; transform: none; }
  .marquee-track, .ticker-track, .scroll-pill, .hero-img { animation: none; }
  .scatter-word b { transform: none !important; opacity: 1 !important; }
}
