/* ==========================================================================
   WideMade — styles
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ebedf1;
  --ink: #0d1015;
  --ink-2: #2b3038;
  --muted: #6c727c;
  --line: rgba(13, 16, 21, 0.12);
  --blue: #1f5bff;
  --sky: #8cc8ff;

  --font-display: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-btn: 18px;
  --r-card: clamp(28px, 3vw, 44px);
  --r-lg: clamp(32px, 4vw, 56px);
  --r-sheet: clamp(40px, 5.5vw, 80px);
  --r-header: clamp(24px, 2.6vw, 34px);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1440px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 600;
  transition: top 0.3s var(--ease);
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  border-radius: var(--r-btn);
  font: 600 15px/1 var(--font-body);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn__arrow { width: 16px; height: 16px; transition: transform 0.5s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* brand gradient: black, blue, light blue, near-white */
/* CSS fallback; gl.js paints the animated WebGL gradient into .btn__glow */
@property --gx { syntax: '<percentage>'; inherits: false; initial-value: 80%; }
@property --gy { syntax: '<percentage>'; inherits: false; initial-value: 50%; }

.btn--grad {
  color: #fff;
  background-color: #0b1f6b;
  background-image:
    radial-gradient(40% 90% at var(--gx) 70%, rgba(150, 205, 255, 0.55) 0%, rgba(150, 205, 255, 0) 100%),
    radial-gradient(55% 130% at 0% var(--gy), rgba(31, 91, 255, 1) 0%, rgba(31, 91, 255, 0.45) 45%, rgba(31, 91, 255, 0) 85%),
    radial-gradient(45% 90% at 100% 0%, rgba(100, 170, 255, 0.6) 0%, rgba(100, 170, 255, 0) 80%);
  animation: grad-drift 5s ease-in-out infinite alternate;
}
/* with the WebGL gradient running, the canvas paints the button and gl.js animates the press:
   the canvas draws a smaller shape and the content shrinks via --press (no transform on the button) */
.btn--grad.is-glow { animation: none; background: transparent; transition: none; }
.btn--grad.is-glow:active { transform: none; }
.btn--grad.is-glow > :not(.btn__glow) { scale: var(--press, 1); }
@keyframes grad-drift {
  0% { --gx: 90%; --gy: 20%; }
  100% { --gx: 65%; --gy: 85%; }
}
.btn__glow {
  border-radius: inherit;
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  opacity: 0;
}
.is-glow > .btn__glow { opacity: 1; }

.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #f7f8fa; }

.btn--line { color: #fff; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.28); }
.btn--line:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

.btn--sm { --h: 44px; padding: 0 18px; border-radius: 15px; font-size: 14px; }
.btn--lg { --h: 60px; padding: 0 30px; border-radius: 21px; font-size: 16px; }
.btn--wide { min-width: 240px; padding: 0 48px; }

/* ---------- Header ---------- */
/* attached to the top of the window: square top corners, rounded bottom corners */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: transform 0.6s var(--ease);
}
.header.is-hidden { transform: translateY(-100%); }

.header__bar {
  position: relative;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  /* content lines up with the page container */
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  border-radius: 0 0 var(--r-header) var(--r-header);
  transition: background-color 0.5s, -webkit-backdrop-filter 0.5s, backdrop-filter 0.5s;
}
.header.is-scrolled .header__bar,
.menu-open .header__bar {
  background: rgba(244, 245, 248, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
}

.logo { display: inline-flex; align-items: center; }
.logo__img { display: block; width: auto; height: 26px; flex: none; }

.nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.nav a {
  padding: 10px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: color 0.3s;
}
.nav a:hover { color: var(--blue); }

.header__actions { display: flex; align-items: center; gap: 8px; }

.lang { display: flex; gap: 2px; padding: 3px; border-radius: 20px; background: rgba(13, 16, 21, 0.06); }
.lang a { display: grid; place-items: center; padding: 4px; border-radius: 50%; transition: background-color 0.3s; }
.lang img {
  width: 24px; height: 24px; border-radius: 50%;
  outline: 1px solid rgba(13, 16, 21, 0.1); outline-offset: -1px;
  opacity: 0.55; filter: saturate(0.5);
  transition: opacity 0.3s, filter 0.3s;
}
.lang a:hover img,
.lang a[aria-current='true'] img { opacity: 1; filter: none; }
.lang a[aria-current='true'] { background: #fff; }

.burger {
  display: none; position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff;
}
.burger span {
  position: absolute; left: 13px; right: 13px; top: 50%; height: 1.5px; margin-top: -0.75px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { transform: translateY(-5px); }
.burger span:nth-child(3) { transform: translateY(5px); }
.menu-open .burger span:nth-child(1) { transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.menu-open .burger span:nth-child(3) { transform: rotate(-45deg); }

.menu {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
  display: none; flex-direction: column; gap: 24px;
  padding: 20px;
  border-radius: var(--r-card);
  /* opaque: a backdrop-filter nested inside the blurred header bar is not rendered */
  background: #f4f5f8;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
}
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  font: 400 26px/1.1 var(--font-display); letter-spacing: -0.04em;
}
.menu .btn { width: 100%; }
.menu-open .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

@media (max-width: 899px) {
  .nav, .header__cta { display: none; }
  .burger { display: block; }
  .menu { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
@media (max-height: 559px) { .hero { position: relative; } }

.hero__fallback, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__fallback {
  background:
    radial-gradient(150% 82% at 50% 122%, #0a2a8a 0%, #1f5bff 48%, #a9c6ff 66%, rgba(235, 237, 241, 0) 68.5%),
    var(--bg);
}
/* the CSS dome is only a fallback: with JS it shows up only if WebGL failed */
.js .hero__fallback { display: none; }
.js .gl-failed > .hero__fallback { display: block; }
/* the canvas sky matches the page, the dome itself animates in from the shader (uIntro) */
.hero__canvas { opacity: 0; transition: opacity 0.3s; }
.gl-ready > .hero__canvas { opacity: 1; }

.hero__content {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 88px; padding-bottom: max(30svh, 190px);
  text-align: center;
  opacity: calc(1 - var(--p, 0) * 1.6);
  transform: translate3d(0, calc(var(--p, 0) * -90px), 0);
  will-change: transform, opacity;
}

.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 8.8vw, 140px);
  line-height: 0.98; letter-spacing: -0.05em;
}
.display__line { display: block; overflow: hidden; padding: 0.02em 0.06em 0.1em; margin-bottom: -0.1em; }
.display__line > span { display: block; animation: rise 1.4s var(--ease) both; }
.display__line:nth-of-type(3) > span { animation-delay: 0.09s; }

/* rotating word: fade + slide, timing in main.js */
.rotator {
  display: inline-block;
  color: var(--blue);
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lead {
  max-width: 42ch; margin-top: clamp(22px, 2.6vw, 34px);
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--ink-2);
  text-wrap: pretty;
  animation: fade-up 1.2s var(--ease) 0.25s both;
}

.hero__cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: clamp(26px, 3vw, 40px);
  animation: fade-up 1.2s var(--ease) 0.38s both;
}

@keyframes rise { from { transform: translate3d(0, 110%, 0); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

/* ---------- Sheet (content sliding over the hero) ---------- */
.sheet {
  position: relative; z-index: 1;
  background: var(--bg);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -30px 60px -34px rgba(13, 16, 21, 0.3);
}

.section { padding-block: clamp(80px, 10vw, 140px); }
.section + .section { padding-top: 0; }

.section-head {
  display: grid; justify-items: start;
  gap: clamp(14px, 1.6vw, 20px);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section-head__note { max-width: 34ch; font-size: 15px; color: var(--muted); }
.section-head__note a { color: var(--ink); font-weight: 600; border-bottom: 1px solid currentColor; transition: color 0.3s; }
.section-head__note a:hover { color: var(--blue); }

.h2 {
  font: 400 clamp(34px, 5.2vw, 76px)/1 var(--font-display);
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.h2 .soft { color: var(--muted); }

/* ---------- Approach: AI cascade ---------- */
.cascade {
  --node-r: clamp(20px, 2vw, 28px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-lg);
  background: #f5f6f9;
  overflow: hidden;
  isolation: isolate;
}
.cascade__wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wire { fill: none; stroke: rgba(13, 16, 21, 0.12); stroke-width: 1.5; }
.wire__beam { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.cascade__col { position: relative; display: grid; gap: 12px; }

.node {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  padding: clamp(18px, 1.6vw, 24px) clamp(18px, 1.7vw, 26px);
  border-radius: var(--node-r);
  border: 1px solid transparent;
  background: #fff;
  font-size: clamp(16px, 1.25vw, 18px); font-weight: 600; line-height: 1.25;
  min-width: 0; overflow-wrap: anywhere; /* never spill out of the card on very narrow screens */
  transition: border-color 0.4s;
}
.node::before {
  content: ''; flex: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(13, 16, 21, 0.18);
  transition: background-color 0.3s, transform 0.5s var(--ease);
}
.node.is-hit { border-color: rgba(31, 91, 255, 0.5); }
.node.is-hit::before { background: var(--blue); transform: scale(1.4); }
/* ---------- Final: the product node pops, lights up and rays shine behind it ---------- */
.node--out {
  z-index: 4;
  overflow: hidden; isolation: isolate;
  border: 0; /* a transparent border let the dark background show as an outline */
  background: var(--ink); color: #fff;
  transition: transform 0.9s var(--ease), background-color 0.9s var(--ease);
}
.node--out::before { background: rgba(255, 255, 255, 0.3); }
/* the badge keeps a fixed 20px box (so text never re-wraps) and only scales: dot -> check mark */
.node--out::before {
  width: 20px; height: 20px;
  scale: 0.5;
  transition: scale 0.5s var(--ease), background-color 0.3s;
}
.node--out.is-hit::before {
  transform: none; scale: 1;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%231f5bff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: scale 0.45s cubic-bezier(0.3, 1.6, 0.5, 1), background-color 0.2s;
}
/* its own gradient: static blue to dark blue */
.node--out::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(130% 180% at 25% 20%, #3a74ff 0%, #1f5bff 38%, #0d2d9e 78%, #0a2280 100%);
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.node--out.is-hit {
  transform: scale(1.08);
  background-color: #163fc4;
  transition: transform 0.55s cubic-bezier(0.3, 1.8, 0.5, 1), background-color 0.25s ease-out;
}
.node--out.is-hit::after { opacity: 1; transition: opacity 0.25s ease-out; }

.cascade__burst { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* soft blue bloom behind the node */
.cascade__burst::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 150%; height: 340%;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(31, 91, 255, 0.42), rgba(31, 91, 255, 0.16) 50%, rgba(31, 91, 255, 0) 100%);
  filter: blur(12px);
  opacity: 0; scale: 0.6;
  transition: opacity 1.3s var(--ease), scale 1.5s var(--ease);
}
.cascade.is-final .cascade__burst::before {
  opacity: 1; scale: 1;
  transition: opacity 0.4s ease-out, scale 0.9s var(--ease);
}
/* two thin ripples in the node's own shape */
.cascade__burst i {
  position: absolute; inset: 0;
  border: 1.5px solid rgba(31, 91, 255, 0.55);
  border-radius: var(--node-r);
  opacity: 0;
}
.cascade.is-final .cascade__burst i { animation: node-ripple 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cascade.is-final .cascade__burst i:nth-child(2) { animation-delay: 0.25s; }
@keyframes node-ripple {
  0% { inset: 0; opacity: 0.9; border-radius: var(--node-r); }
  100% { inset: -26px -38px; opacity: 0; border-radius: calc(var(--node-r) + 26px); }
}

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 4vw, 56px);
  margin-top: clamp(28px, 4vw, 48px);
}
.fact { padding-top: 20px; border-top: 1px solid var(--line); }
.fact__value { font: 400 clamp(28px, 3.2vw, 44px)/1.05 var(--font-display); letter-spacing: -0.045em; }
.fact__text { margin-top: 10px; max-width: 34ch; font-size: 15px; color: var(--ink-2); }

/* ---------- Difference: comparison ---------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compare__card {
  padding: clamp(24px, 3.4vw, 48px);
  border-radius: var(--r-card);
  background: #f5f6f9;
  color: var(--ink-2);
}
.compare__card--us {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff;
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(31, 91, 255, 0.35), rgba(31, 91, 255, 0) 70%),
    var(--ink);
}
.compare__card--us > canvas {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.4s var(--ease);
}
.compare__card--us.gl-ready > canvas { opacity: 1; }
.compare__title {
  margin-bottom: clamp(20px, 2.6vw, 36px);
  font: 400 clamp(24px, 2.4vw, 34px)/1.1 var(--font-display);
  letter-spacing: -0.035em;
  color: var(--ink);
}
.compare__card--us .compare__title { color: #fff; }
.compare__list li {
  display: flex; align-items: center; gap: 14px;
  padding-block: clamp(14px, 1.4vw, 18px);
  border-top: 1px solid var(--line);
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.35;
}
.compare__card--us .compare__list li { border-top-color: rgba(255, 255, 255, 0.12); }
.compare__list li::before {
  content: ''; flex: none; width: 20px; height: 20px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.compare__card--us .compare__list li::before {
  background: var(--sky);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Process: steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.step {
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: clamp(220px, 22vw, 300px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-card);
  background: #f5f6f9;
}
.step__num { font: 500 14px/1 var(--font-display); color: var(--blue); }
.step__title { font: 400 clamp(24px, 2.4vw, 34px)/1.1 var(--font-display); letter-spacing: -0.035em; }
.step__text { margin-top: 12px; max-width: 34ch; font-size: 15px; color: var(--ink-2); }

/* ---------- Works ---------- */
.works { display: flex; gap: 10px; height: clamp(500px, 42vw, 620px); }

.work {
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, 0.64);
  --fg-line: rgba(255, 255, 255, 0.18);
  position: relative;
  flex: 1 1 0; min-width: 0;
  border-radius: var(--r-card);
  overflow: hidden; isolation: isolate;
  color: var(--fg);
  background: var(--ink);
  transition: flex-grow 0.9s var(--ease);
}
.work.is-open { flex-grow: 4; }

/* project screenshot, 1700×1300, cropped by the card: wide when open, a narrow strip when closed */
.work__cover {
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #11151d, #06080d);
  transition: transform 1.4s var(--ease);
}
.work__cover img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--crop, 50% 50%);
  transition: filter 0.7s var(--ease), transform 1.2s var(--ease);
}
/* closed, the card is a 160px strip: a sharp screenshot there is just sliced words,
   so it blurs into a texture and sharpens as the card opens */
.work:not(.is-open) .work__cover img {
  object-position: var(--crop-strip, var(--crop, 50% 50%));
  filter: blur(7px) saturate(0.75);
  transform: scale(1.08);
}
/* flat layer: heavy while the card is closed, fading to --veil when it opens
   (0 for the dark shots, higher for a light one that would otherwise blow out) */
.work__cover::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: #06080d;
  opacity: 0.58;
  transition: opacity 0.7s var(--ease);
}
.work.is-open .work__cover::before { opacity: var(--veil, 0); }
/* scrim: the shots are busy, the text on top has to stay readable */
.work__cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.46) 0%, rgba(6, 8, 13, 0.22) 24%, rgba(6, 8, 13, 0.74) 62%, rgba(6, 8, 13, 0.95) 100%);
}
.work.is-open .work__cover { transform: scale(1.04); }

.work__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(18px, 1.8vw, 26px);
}
.work__num { font: 500 13px/1 var(--font-display); color: var(--fg-2); }

.work__title { font: 400 clamp(22px, 2.1vw, 32px)/1.1 var(--font-display); letter-spacing: -0.035em; }
.work__toggle { font: inherit; letter-spacing: inherit; text-align: left; }
.work__toggle::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-card); }
.work__toggle:focus-visible { outline: none; }
.work__toggle:focus-visible::after { outline: 2px solid var(--blue); outline-offset: -3px; }

.work__body {
  display: grid; grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.7s var(--ease), opacity 0.2s;
}
.work__body > div { min-height: 0; overflow: hidden; }
.work.is-open .work__body {
  grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows 0.7s var(--ease), opacity 0.6s var(--ease) 0.35s;
}
.work__type { margin-top: 10px; font-size: 14px; color: var(--fg-2); }
.work__desc { margin-top: 16px; max-width: 46ch; font-size: 16px; line-height: 1.5; }
.work__facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--fg-line);
}
.work__facts dt { font-size: 12px; color: var(--fg-2); }
.work__facts dd { margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.35; }

/* link to the live product: sits above the card-wide toggle overlay, hidden while the card is closed */
.work__link { position: relative; z-index: 2; margin-top: 24px; visibility: hidden; }
.work.is-open .work__link { visibility: visible; }
.work__link:hover .btn__arrow { transform: translate(2px, -2px); }

@media (min-width: 900px) {
  .work__body > div { width: min(540px, 38vw); }
  .work .work__title { animation: title-in-a 0.8s var(--ease) both; }
  .work.is-open .work__title { animation-name: title-in-b; }
  .work:not(.is-open) .work__title {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: 18px; white-space: nowrap;
  }
}
@keyframes title-in-a { 0%, 35% { opacity: 0; } 100% { opacity: 1; } }
@keyframes title-in-b { 0%, 35% { opacity: 0; } 100% { opacity: 1; } }

/* ---------- FAQ ---------- */
.faq__list { border-bottom: 1px solid var(--line); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: clamp(22px, 2.8vw, 38px);
  font: 400 clamp(20px, 2.5vw, 38px)/1.15 var(--font-display);
  letter-spacing: -0.035em;
  cursor: pointer; list-style: none;
  transition: color 0.3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .faq__item summary:hover { color: var(--blue); } }

.faq__icon { position: relative; flex: none; width: clamp(20px, 2vw, 30px); aspect-ratio: 1; }
.faq__icon::before, .faq__icon::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; margin-top: -1px; border-radius: 2px;
  background: currentColor;
  transition: transform 0.6s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::before { transform: rotate(45deg); }
.faq__item[open] .faq__icon::after { transform: rotate(135deg); }

.faq__item::details-content {
  height: 0; overflow: clip;
  transition: height 0.6s var(--ease), content-visibility 0.6s allow-discrete;
}
.faq__item[open]::details-content { height: auto; }

.faq__answer {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px;
  padding-bottom: clamp(26px, 3vw, 44px);
}
.faq__answer p { grid-column: 2; max-width: 56ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(16px, 2vw, 24px); }

.contact__card {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(520px, 72vh, 720px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 5vw, 72px);
  border-radius: var(--r-lg);
  color: #fff;
  background:
    radial-gradient(60% 90% at 0% 30%, rgba(31, 91, 255, 0.6), transparent 60%),
    radial-gradient(50% 80% at 100% 60%, rgba(110, 180, 255, 0.5), transparent 60%),
    radial-gradient(40% 40% at 100% 100%, rgba(235, 244, 255, 0.7), transparent 70%),
    #04060b;
}
.contact__card > canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1.4s var(--ease); }
.contact__card.gl-ready > canvas { opacity: 1; }

.contact__title {
  font: 400 clamp(38px, 6.6vw, 108px)/1 var(--font-display);
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.contact__title .soft { color: rgba(255, 255, 255, 0.5); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 3.5vw, 44px); }
.contact__note { margin-top: 18px; max-width: 56ch; font-size: 15px; color: rgba(255, 255, 255, 0.66); }

/* ---------- Footer ---------- */
.footer { padding-top: clamp(40px, 5vw, 64px); overflow: hidden; }
.footer__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  font-size: 14px; color: var(--muted);
}
.footer__row a { color: var(--ink); font-weight: 600; transition: color 0.3s; }
.footer__row a:hover { color: var(--blue); }
.footer__meta { display: flex; flex-wrap: wrap; gap: 6px 24px; }
/* solid wordmark whose lower part dissolves into the page background */
.footer__word {
  margin-top: clamp(24px, 4vw, 48px);
  padding-inline: var(--gutter);
  /* the artwork is cropped to the letters, so the fade ends just shy of their bottom edge */
  -webkit-mask-image: linear-gradient(180deg, #000 15%, rgba(0, 0, 0, 0.7) 51%, rgba(0, 0, 0, 0) 95%);
  mask-image: linear-gradient(180deg, #000 15%, rgba(0, 0, 0, 0.7) 51%, rgba(0, 0, 0, 0) 95%);
  user-select: none;
}
.footer__word img { display: block; width: 100%; height: auto; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .works { flex-direction: column; height: auto; }
  .work { flex: none; }
  .work__inner { position: relative; inset: auto; min-height: 220px; gap: 132px; }
  .faq__answer { grid-template-columns: minmax(0, 1fr); }
  .faq__answer p { grid-column: 1; }
  .cascade { grid-template-columns: minmax(0, 1fr); gap: 40px; justify-items: center; }
  .cascade__col { width: 100%; max-width: 300px; }
  .cascade__col--models { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .compare, .steps { grid-template-columns: minmax(0, 1fr); }
  .step { min-height: 0; gap: 28px; }
}

@media (max-width: 599px) {
  /* cascade: two model columns must fit a phone */
  .cascade { --node-r: 16px; padding: 20px 16px; gap: 32px; }
  .cascade__col, .cascade__col--models { gap: 8px; }
  .node { gap: 8px; padding: 13px 12px; font-size: 13.5px; }
  .node::before { width: 7px; height: 7px; }
  .node--out::before { width: 18px; height: 18px; scale: 0.4; }
  .node--out.is-hit::before { scale: 1; background-size: 12px; }
  .hero__content { padding-bottom: max(24svh, 150px); }
  .display { font-size: 13.4vw; }
  .contact__actions .btn { width: 100%; }
  .logo__img { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

@media (max-width: 360px) {
  .node { padding: 11px 10px; font-size: 12.5px; }
}
