/* ============================================================
   Ivan Zashov — Portfolio V.2
   Built from scratch. No Webflow.
   ============================================================ */

:root {
  --bg: #060710;
  --bg-2: #0a0c18;
  --surface: #11131f;
  --surface-2: #161927;
  --text: #f5f6fb;
  --muted: #9095ab;
  --muted-2: #5d6178;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #22d3ee;
  --accent-2: #67e8f9;
  --accent-grad: linear-gradient(105deg, #67e8f9 0%, #22d3ee 55%, #06b6d4 100%);

  --max: 1440px;
  --pad: clamp(20px, 5vw, 90px);

  --f-display: "Archivo", system-ui, sans-serif;
  --f-body: "Space Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }
strong { font-weight: 600; color: var(--text); }

::selection { background: var(--accent); color: #fff; }

/* ---------- Fixed floating dust background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.aurora__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; overflow: hidden; }
.loader__name {
  font-family: var(--f-display); font-weight: 500; letter-spacing: 0.04em;
  font-size: clamp(14px, 2vw, 18px); color: var(--muted); text-transform: uppercase;
}
.loader__count { font-family: var(--f-display); font-weight: 800; font-size: clamp(60px, 14vw, 150px); line-height: 1; letter-spacing: -0.04em; }
.loader__pct { font-size: 0.35em; vertical-align: super; color: var(--accent); }
.loader__bar { width: min(360px, 70vw); height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--accent-grad); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 800;
  padding: 22px 0; transition: background .4s, padding .4s, border-color .4s;
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.nav.is-scrolled { background: rgba(6,7,16,0.6); backdrop-filter: blur(14px); padding-top: 14px; padding-bottom: 14px; }
.nav__logo { display: flex; align-items: center; }
.nav__sig { height: 26px; width: auto; display: block; filter: brightness(0) invert(1); opacity: 0.95; }
/* minimal nav links with a small neon indicator on the active item */
.nav__pill { position: relative; display: flex; align-items: center; gap: 10px; }
.nav__pill-item { position: relative; z-index: 2; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .35s var(--ease); }
.nav__pill-item:hover { color: var(--text); }
.nav__pill-item.is-active { color: var(--text); }
.nav__lamp { position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 1; pointer-events: none; transition: left .4s var(--ease), width .4s var(--ease); }
.nav__lamp::before { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 18px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 7px 1px rgba(34,211,238,0.65); }
.nav__cta {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 100px;
  background: var(--accent); color: #042027; border: 1px solid var(--accent); font-size: 14px; font-weight: 600;
  box-shadow: 0 0 26px -8px rgba(34,211,238,0.6); transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.nav__cta-dot { width: 7px; height: 7px; border-radius: 50%; background: #042027; opacity: 0.85; }
.nav__cta:hover { background: #67e8f9; border-color: #67e8f9; box-shadow: 0 0 34px -5px rgba(34,211,238,0.85); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(54,224,126,.5)} 70%{box-shadow:0 0 0 8px rgba(54,224,126,0)} 100%{box-shadow:0 0 0 0 rgba(54,224,126,0)} }

/* ---------- Shared section ---------- */
section { position: relative; padding-left: var(--pad); padding-right: var(--pad); }
.section-label {
  display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 48px;
}
.section-label span { font-family: var(--f-display); color: var(--accent); font-weight: 600; }

/* ---------- HERO (LAMP) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lamp { position: relative; width: 100%; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
/* every lamp piece is sized from --ls, so the lamp is the exact same shape at any scale */
.lamp__lights { --ls: 1; position: relative; display: flex; width: 100%; flex: 1; align-items: center; justify-content: center; transform: scaleY(1.25); isolation: isolate; }

/* downward cone of light, brightest at the tube, smoothly falling off */
.lamp__bloom {
  position: absolute; inset: auto; width: calc(60rem * var(--ls)); height: calc(26rem * var(--ls)); transform: translateY(calc(6rem * var(--ls))); z-index: 25;
  background: radial-gradient(ellipse 42% 58% at 50% 0%, rgba(34,211,238,0.50), rgba(8,180,216,0.13) 38%, transparent 72%);
}
/* concentrated hotspot right under the tube */
.lamp__core { position: absolute; inset: auto; width: calc(24rem * var(--ls)); height: calc(6rem * var(--ls)); transform: translateY(calc(-5rem * var(--ls))); border-radius: 9999px; background: rgba(34,211,238,0.55); filter: blur(calc(45px * var(--ls))); z-index: 30; }
/* the glowing tube */
.lamp__line { position: absolute; inset: auto; height: 2px; width: calc(28rem * var(--ls)); transform: translateY(calc(-7rem * var(--ls))); background: #22d3ee; border-radius: 2px; box-shadow: 0 0 calc(20px * var(--ls)) 1px rgba(34,211,238,0.8), 0 0 calc(60px * var(--ls)) calc(6px * var(--ls)) rgba(34,211,238,0.35); z-index: 50; }
/* dark mask above the tube (always full-width so it never shows edges) */
.lamp__cover { position: absolute; inset: auto; height: calc(12rem * var(--ls)); width: 100%; transform: translateY(calc(-13rem * var(--ls))); background: var(--bg); z-index: 40; }

.lamp__content { position: relative; z-index: 50; transform: translateY(-11rem); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; width: 100%; max-width: 880px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted);
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px; margin-bottom: 30px; background: rgba(255,255,255,0.03);
}
.hero__status { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 12px #22d3ee; }
.hero__title {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(34px, 6.2vw, 82px); padding-bottom: 0.08em;
  background: linear-gradient(180deg, #eef0f6 10%, #8b91a7); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__title .accent { background: linear-gradient(180deg, #a5f3fc, #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { max-width: 580px; margin: 26px auto 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }
.hero__btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 100px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease), gap 0.35s var(--ease); }
.hero__btn--primary { background: #22d3ee; color: #042027; border: 1px solid #22d3ee; box-shadow: 0 0 34px -6px rgba(34,211,238,0.6); }
.hero__btn--primary:hover { background: #67e8f9; box-shadow: 0 0 44px -3px rgba(34,211,238,0.85); }
.hero__btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.hero__btn--ghost:hover { background: var(--text); color: var(--bg); gap: 13px; }
.hero__btn--ghost svg { transition: transform 0.35s var(--ease); }
.hero__btn--ghost:hover svg { transform: translateY(3px); }

.hero__results { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 44px; margin-top: 36px; }
.hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__stat-num { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(24px, 3vw, 36px); line-height: 1; color: var(--text); }
.hero__stat-num .prefix { color: var(--accent); font-size: 0.6em; }
.hero__stat-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* slow logo loop */
.hero__logos {
  width: 100%; max-width: 760px; margin: clamp(40px, 6vh, 64px) auto 0; overflow: hidden;
  /* bright in the centre, dim on the flanks, fading out at the edges — spotlights the middle logo */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.26) 12%, rgba(0,0,0,0.26) 41%, #000 50%, rgba(0,0,0,0.26) 59%, rgba(0,0,0,0.26) 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.26) 12%, rgba(0,0,0,0.26) 41%, #000 50%, rgba(0,0,0,0.26) 59%, rgba(0,0,0,0.26) 88%, transparent 100%);
}
.hero__logos-track { display: flex; align-items: center; gap: clamp(32px, 3.4vw, 46px); width: max-content; animation: logoscroll 32s linear infinite; }
.hero__logos-track:hover { animation-play-state: paused; }
.hero__logos-track img { height: 24px; width: auto; flex-shrink: 0; filter: brightness(0) invert(1); }
@keyframes logoscroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero__logos-track { animation: none; } }

/* ---------- IMPACT ---------- */
.impact { max-width: var(--max); margin: 0 auto; padding-top: clamp(90px, 14vh, 200px); padding-bottom: clamp(60px, 9vh, 120px); }
.impact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  position: relative; display: flex; flex-direction: column; min-height: 210px;
  padding: 30px 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(17,19,31,0.55), rgba(8,10,18,0.25));
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease);
}
.stat::before { content: ""; position: absolute; top: -1px; left: 28px; width: 34px; height: 2px; border-radius: 2px; background: var(--accent-grad); opacity: 0.9; }
.stat::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.45s var(--ease);
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.stat:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.stat:hover::after { opacity: 1; }
.stat__num { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 800; letter-spacing: -0.035em; font-size: clamp(34px, 4.2vw, 56px); line-height: 1; display: flex; align-items: baseline; }
.stat__num .prefix { color: var(--accent); font-size: 0.58em; margin-right: 2px; }
.stat__label { position: relative; z-index: 1; color: var(--muted); font-size: 14px; margin-top: auto; padding-top: 20px; }
.stat__label .ph { display: block; font-size: 11px; color: var(--muted-2); margin-top: 6px; font-style: italic; }

/* ---------- WORK ---------- */
.work { max-width: var(--max); margin: 0 auto; padding-top: clamp(60px, 9vh, 120px); padding-bottom: clamp(40px, 7vh, 90px); }
.work__head { margin-bottom: clamp(50px, 8vh, 90px); text-align: center; }
.work__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(32px, 5vw, 68px); }
.work__title em { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cards { display: flex; flex-direction: column; gap: clamp(30px, 6vh, 80px); }
.card {
  position: sticky; top: 90px;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px, 4vw, 70px);
  align-items: center; padding: clamp(28px, 4vw, 60px);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: 26px; overflow: hidden;
}
.card::before {
  content:""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--card-accent) 22%, transparent) 0%, transparent 55%);
}
.card__info { position: relative; z-index: 2; }
.card__meta { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.card__index { font-family: var(--f-display); font-weight: 700; font-size: 14px; color: var(--card-accent); }
.card__tag { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 5px 12px; border: 1px solid var(--line); border-radius: 100px; }
.card__name { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(26px, 3.2vw, 44px); line-height: 1; margin-bottom: 20px; }
.card__desc { color: var(--muted); max-width: 440px; margin-bottom: 26px; font-size: 16px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 30px; }
.card__tags li { font-size: 13px; color: var(--muted); padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; }
.card__stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; margin-bottom: 24px; border-top: 1px solid var(--line); }
.card__stat-num { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(26px, 3vw, 40px); line-height: 1; color: var(--text); }
.card__stat-label { font-size: 13px; color: var(--muted); }
.card__stat-label em { color: var(--muted-2); font-size: 11px; }
.card__link {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px;
  padding: 13px 22px; border-radius: 100px; border: 1px solid var(--line-strong);
  transition: background .35s, color .35s, gap .35s;
}
.card__link svg { transition: transform .35s var(--ease); }
.card__link:hover { background: var(--text); color: var(--bg); gap: 14px; }
.card__link:hover svg { transform: translate(2px,-2px); }

/* browser mockup */
.card__visual { position: relative; z-index: 2; }
.browser {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong);
  background: var(--surface-2); box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg); transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.card:hover .browser { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--line); }
.browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--muted-2); opacity: 0.6; }
.browser__bar i:first-child { background: #ff5f57; } .browser__bar i:nth-child(2){ background: #febc2e; } .browser__bar i:nth-child(3){ background: #28c840; }
.browser__bar span { margin-left: 12px; font-size: 12px; color: var(--muted); }
.browser__shot {
  position: relative; aspect-ratio: 16/10.5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center;
  background:
    radial-gradient(80% 80% at 30% 10%, color-mix(in srgb, var(--card-accent) 45%, transparent), transparent 60%),
    radial-gradient(70% 70% at 90% 100%, color-mix(in srgb, var(--card-accent-2) 40%, transparent), transparent 60%),
    linear-gradient(160deg, #0d0f1c, #05060e);
  background-size: cover;
}
.browser__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.browser__wordmark { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(28px, 4vw, 48px); }
.browser__sub { font-size: 14px; color: rgba(255,255,255,0.75); max-width: 360px; }

/* ---------- TILT PROJECT REVEALS ---------- */
.tprojs { display: flex; flex-direction: column; gap: clamp(80px, 14vh, 200px); }
.tproj { position: relative; width: 100%; max-width: 1060px; margin: 0 auto; }

.tproj__head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 5vh, 60px); will-change: transform; }
.tproj__meta { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 20px; }
.tproj__index { font-family: var(--f-display); font-weight: 700; font-size: 14px; color: var(--accent); }
.tproj__tag { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 5px 12px; border: 1px solid var(--line); border-radius: 100px; }
.tproj__name { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-size: clamp(32px, 5vw, 64px); margin-bottom: 16px; }
.tproj__desc { color: var(--muted); max-width: 540px; margin: 0 auto; }

.tproj__stage { perspective: 1000px; }
.tproj__frame {
  position: relative; width: 100%; padding: 10px; border-radius: 26px;
  border: 4px solid rgba(255,255,255,0.07); background: #14161f; transform-origin: center bottom; will-change: transform;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 50px 70px -30px rgba(0,0,0,0.65), 0 140px 100px -50px rgba(0,0,0,0.55);
}
.tproj__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px 14px; }
.tproj__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--muted-2); opacity: 0.7; }
.tproj__bar i:first-child { background: #ff5f57; } .tproj__bar i:nth-child(2) { background: #febc2e; } .tproj__bar i:nth-child(3) { background: #28c840; }
.tproj__bar span { margin-left: 12px; font-size: 12px; color: var(--muted); }
.tproj__screen { position: relative; border-radius: 16px; overflow: hidden; background: #0a0b12; border: 1px solid var(--line); }
.tproj__screen img { width: 100%; height: auto; display: block; }

.tproj__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px;
  margin-top: clamp(24px, 3.5vh, 40px); padding: clamp(22px, 2.8vw, 32px);
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, rgba(20,22,34,0.6), rgba(8,10,18,0.25));
}
.tproj__stat { display: flex; flex-direction: column; gap: 6px; }
.tproj__stat-num { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(38px, 5vw, 62px); line-height: 1;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tproj__stat-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tproj__stat-label em { color: var(--muted-2); font-size: 10px; font-style: italic; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.tproj__tags { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; list-style: none; margin: 22px auto 0; }
.tproj__tags li { font-size: 12.5px; color: var(--muted); padding: 6px 14px; border: 1px solid var(--line); border-radius: 100px; }
.tproj__link {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; white-space: nowrap;
  padding: 14px 24px; border-radius: 100px; background: var(--accent); color: #042027; border: 1px solid var(--accent);
  box-shadow: 0 0 34px -8px rgba(34,211,238,0.55); transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), gap 0.35s var(--ease);
}
.tproj__link svg { transition: transform 0.35s var(--ease); }
.tproj__link:hover { background: #67e8f9; box-shadow: 0 0 44px -5px rgba(34,211,238,0.8); gap: 14px; }
.tproj__link:hover svg { transform: translate(2px, -2px); }

/* ---------- SYSTEM SHOWCASE ---------- */
.showcase { position: relative; max-width: var(--max); margin: 0 auto; padding-top: clamp(100px, 15vh, 200px); padding-bottom: clamp(70px, 11vh, 150px); overflow: hidden; --sc: var(--accent); }
.showcase[data-active="system"] { --sc: var(--accent-2); }
.showcase::before {
  content: ""; position: absolute; top: 12%; bottom: 6%; width: 65%; pointer-events: none; opacity: 0.55; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--sc) 24%, transparent), transparent 70%);
  transition: left 1s var(--ease), background 1s var(--ease);
}
.showcase[data-active="funnel"]::before { left: -12%; }
.showcase[data-active="system"]::before { left: 48%; }

.showcase__head { position: relative; z-index: 2; margin-bottom: clamp(36px, 6vh, 80px); }
.showcase__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(32px, 5vw, 68px); margin-top: 18px; }
.showcase__title em { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.showcase__intro { color: var(--muted); max-width: 520px; margin-top: 22px; }

.showcase__stage { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(40px, 8vw, 120px); transition: all 0.8s var(--ease); }
.showcase[data-active="system"] .showcase__stage { flex-direction: row-reverse; }

/* Orbit */
.orbit { position: relative; flex-shrink: 0; width: clamp(240px, 30vw, 380px); height: clamp(240px, 30vw, 380px); display: grid; place-items: center; }
.orbit__ring { position: absolute; inset: -9%; border-radius: 50%; border: 1px dashed rgba(255,255,255,0.12); animation: scspin 22s linear infinite; }
.orbit__glow { position: absolute; inset: 6%; border-radius: 50%; filter: blur(34px); opacity: 0.55; transition: background 0.8s var(--ease); animation: scglow 4s ease-in-out infinite;
  background: radial-gradient(circle, color-mix(in srgb, var(--sc) 65%, transparent), transparent 65%); }
.orbit__core { position: relative; width: 78%; height: 78%; border-radius: 50%; border: 1px solid var(--line); background: rgba(8,10,18,0.5); backdrop-filter: blur(8px); display: grid; place-items: center; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.05); }
.orbit__visual { grid-area: 1 / 1; width: 60%; opacity: 0; transform: scale(0.7) rotate(-12deg); filter: blur(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), filter 0.6s var(--ease); pointer-events: none; }
.orbit__visual.is-active { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
.orbit__float { color: var(--sc); animation: scfloat 6s ease-in-out infinite; }
.orbit__float svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--sc) 45%, transparent)); }
.orbit__status { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 4;
  display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  background: rgba(8,10,18,0.85); padding: 9px 16px; border-radius: 100px; border: 1px solid var(--line); backdrop-filter: blur(6px); }
.orbit__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 10px var(--sc); animation: scdot 2s infinite; }

/* Panels */
.showcase__panels { position: relative; z-index: 2; width: 100%; max-width: 430px; display: grid; }
.sc-panel { grid-area: 1 / 1; opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), filter 0.5s var(--ease); pointer-events: none; }
.sc-panel.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.sc-panel__label { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sc); }
.sc-panel__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(28px, 3.4vw, 44px); margin: 10px 0 14px; background: linear-gradient(180deg, #fff, #9aa0b5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-panel__desc { color: var(--muted); margin-bottom: 28px; max-width: 400px; }
.sc-metrics { display: flex; flex-direction: column; gap: 20px; background: rgba(17,19,31,0.5); padding: 24px; border-radius: 18px; border: 1px solid var(--line); backdrop-filter: blur(8px); }
.sc-bar__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; font-size: 14px; }
.sc-bar__top span { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.sc-bar__top span svg { width: 15px; height: 15px; color: var(--sc); flex-shrink: 0; }
.sc-bar__top i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-bar__track { height: 6px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.sc-bar__fill { height: 100%; width: 0; border-radius: 100px; transition: width 0.9s var(--ease); background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 55%, #ffffff), var(--sc)); }
.showcase.is-inview .sc-panel.is-active .sc-bar__fill { width: var(--v); }
.sc-panel.is-active .sc-bar:nth-child(1) .sc-bar__fill { transition-delay: 0.1s; }
.sc-panel.is-active .sc-bar:nth-child(2) .sc-bar__fill { transition-delay: 0.22s; }
.sc-panel.is-active .sc-bar:nth-child(3) .sc-bar__fill { transition-delay: 0.34s; }
.sc-panel__foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.sc-panel__foot svg { width: 16px; height: 16px; color: var(--sc); flex-shrink: 0; }

/* Switcher */
.sc-switch { position: relative; z-index: 3; margin: clamp(48px, 8vh, 88px) auto 0; width: fit-content; display: flex; padding: 6px; border-radius: 100px; background: rgba(17,19,31,0.7); border: 1px solid var(--line-strong); backdrop-filter: blur(16px); box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7); }
.sc-switch__pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px); border-radius: 100px; transition: transform 0.45s var(--ease), background 0.45s var(--ease), border-color 0.45s var(--ease);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 30%, transparent), color-mix(in srgb, var(--sc) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--sc) 45%, transparent); }
.showcase[data-active="system"] .sc-switch__pill { transform: translateX(100%); }
.sc-switch__btn { position: relative; z-index: 2; min-width: clamp(118px, 15vw, 158px); padding: 13px 20px; border: none; background: none; cursor: pointer; border-radius: 100px;
  font-family: var(--f-body); font-size: 15px; font-weight: 500; color: var(--muted); transition: color 0.35s; }
.sc-switch__btn.is-active { color: var(--text); }
.sc-switch__btn:hover { color: var(--text); }

@keyframes scspin { to { transform: rotate(360deg); } }
@keyframes scglow { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.08); opacity: 0.65; } }
@keyframes scfloat { 0%,100% { transform: translateY(-7px); } 50% { transform: translateY(7px); } }
@keyframes scdot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- ABOUT ---------- */
.about { max-width: var(--max); margin: 0 auto; padding-top: clamp(110px, 16vh, 220px); padding-bottom: clamp(60px, 9vh, 120px); }
.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.about__photo { position: sticky; top: 110px; }
.about__photo-inner {
  aspect-ratio: 4/5; border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
  display: grid; place-items: center; color: var(--muted-2); font-size: 14px;
  background: linear-gradient(160deg, var(--surface-2), #0a0b14);
}
.about__photo-inner img { width: 100%; height: 100%; object-fit: cover; }
.about__big { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.16; font-size: clamp(21px, 2.5vw, 34px); margin-bottom: 36px; }
.about__big em { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about__p { color: var(--muted); max-width: 560px; margin-bottom: 44px; font-size: 17px; }
.about__list { list-style: none; }
.about__list li { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); font-family: var(--f-display); font-weight: 600; font-size: clamp(16px, 1.5vw, 20px); letter-spacing: -0.01em; }
.about__list li:last-child { border-bottom: 1px solid var(--line); }
.about__list li span { font-size: 13px; color: var(--accent); font-weight: 500; }

/* ---------- APPROACH ---------- */
.approach { max-width: var(--max); margin: 0 auto; padding-top: clamp(60px, 9vh, 120px); padding-bottom: clamp(60px, 9vh, 120px); }
.approach__rows { border-top: 1px solid var(--line); }
.approach__row {
  display: grid; grid-template-columns: 80px 0.7fr 1.3fr; gap: 30px; align-items: baseline;
  padding: clamp(28px, 4vw, 50px) 0; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--ease);
}
.approach__row:hover { padding-left: 18px; }
.approach__num { font-family: var(--f-display); font-weight: 700; font-size: 15px; color: var(--accent); }
.approach__h { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(22px, 2.3vw, 32px); }
.approach__p { color: var(--muted); max-width: 480px; }

/* ---------- CONTACT ---------- */
.contact { padding-top: clamp(110px, 16vh, 220px); padding-bottom: 0; }
.contact__inner { max-width: var(--max); margin: 0 auto; }
.contact__grid { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact__photo { position: relative; width: 100%; }
.contact__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); display: block; }
.contact__photo::after { content: ""; position: absolute; inset: -1px; border-radius: 20px; pointer-events: none; box-shadow: 0 0 40px -30px rgba(34,211,238,0.35); }
.contact__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(34px, 5.2vw, 66px); }
.contact__title .line { display: block; overflow: hidden; }
.contact__title .w { display: inline-block; }
.contact__title .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.contact__sub { color: var(--muted); margin-top: 30px; font-size: clamp(16px, 1.6vw, 20px); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 50px; margin-top: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.contact__email { display: inline-flex; align-items: center; gap: 14px; font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(22px, 3vw, 40px); }
.contact__email svg { transition: transform .4s var(--ease); }
.contact__email:hover svg { transform: translate(4px,-4px); }
.contact__phone { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(18px, 2vw, 24px); color: var(--muted); }
.contact__phone svg { width: 19px; height: 19px; flex-shrink: 0; }
.contact__num i { display: none; } /* zero-width breaks so phone-detector extensions can't match the number */
/* hide call buttons injected by Skype / Viber "Click to Call" browser extensions */
[id^="skype_pnh"], .skype_pnh_container, .skype_pnh_text_span, .skype_pnh_dropdown_container,
.skype_pnh_mark, .skype_pnh_print_container, [class*="vbr_"], [id^="vbr_"] { display: none !important; }
.contact__socials { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.contact__socials a {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  transition: color .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}
.contact__socials a svg { width: 19px; height: 19px; }
.contact__socials a:hover { color: #042027; background: var(--accent); border-color: var(--accent); }

.footer {
  max-width: var(--max); margin: 0 auto; margin-top: clamp(70px, 12vh, 140px);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  padding: 30px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}

/* ---------- Reveal states ---------- */
.reveal-up { opacity: 0; transform: translateY(28px); }
.reveal-line { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card { grid-template-columns: 1fr; }
  .card__visual { order: -1; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 360px; }
  .approach__row { grid-template-columns: 60px 1fr; }
  .approach__p { grid-column: 2; max-width: none; }
  .impact__grid { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 180px; }
  .showcase__stage, .showcase[data-active="system"] .showcase__stage { flex-direction: column; gap: 56px; }
  .showcase__panels { max-width: 480px; }
  .showcase::before { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav__pill-item { padding: 7px 13px; font-size: 13px; }
  .nav__cta { padding: 10px 16px; }
  /* mobile hero: the whole lamp is scaled down as one piece (keeps the line
     and glow connected), sat below the nav; content flows below it */
  .lamp { justify-content: flex-start; }
  .lamp__lights { --ls: 0.58; flex: 0 0 auto; height: calc(30rem * var(--ls)); margin-top: 96px; transform: scaleY(1.25); }
  .lamp__content { transform: none; margin-top: calc(10rem * var(--ls)); padding-top: 0; }
  .hero__title { line-height: 1.06; }
  .tproj__frame { border-width: 3px; border-radius: 18px; }
  .tproj__foot { flex-direction: column; align-items: flex-start; }
  .tproj__stat { margin-left: 0; text-align: left; }
  /* contact centered on mobile */
  .contact__grid { grid-template-columns: 1fr; gap: 30px; }
  .contact__photo { max-width: 300px; margin: 0 auto; }
  .contact__info { text-align: center; }
  .contact__actions { justify-content: center; }
  .contact__socials { justify-content: center; }
}
/* phones: drop the pill nav (no room beside the signature + CTA) */
@media (max-width: 640px) {
  .nav__pill { display: none; }
}
/* phones: same lamp, one notch smaller */
@media (max-width: 480px) {
  .lamp__lights { --ls: 0.5; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal-up, .reveal-line { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
  .bg-canvas { display: none; }
}
