/* ==========================================================================
   Sam-Xavier — design system
   Graphite base, restrained blue-violet accent, white type, generous space.
   Sections: 1 tokens · 2 base · 3 layout · 4 nav · 5 buttons · 6 hero
             7 featured work · 8 stats/cta · 9 footer · 10 legacy components
             11 forms · 12 motion
   ========================================================================== */

/* 1 · tokens ------------------------------------------------------------- */
:root {
  --bg: #08090c;
  --bg-raise: #0d0f14;
  --surface: #11141a;
  --surface2: #171b23;
  --line: #232833;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #f5f6f9;
  --muted: #9aa1b0;
  --faint: #6d7484;

  --accent: #8a93ff;           /* blue-violet, used sparingly */
  --accent-2: #a78bfa;
  --accent-dim: rgba(138, 147, 255, .14);
  --ok: #56d6a0;
  --warn: #e7bd63;

  /* legacy names still referenced by inner pages */
  --violet: var(--accent-2);
  --cyan: #8fd3ee;
  --green: var(--ok);
  --yellow: var(--warn);
  --red: #f0788c;

  --max: 1200px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --t-illustrative: "Ko‘rgazma"; --t-real: "Haqiqiy skrinshot"; --t-planned: " · rejalashtirilgan";
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* 2 · base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: #08090c; font-weight: 600; font-size: 14px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* 3 · layout ------------------------------------------------------------- */
.wrap { width: min(calc(100% - 48px), var(--max)); margin: auto; }
.section { padding: 96px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 28px; margin-bottom: 40px;
}
.section h2, .page-head h1 {
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 12px 0 0;
}
.sub { color: var(--muted); max-width: 640px; margin: 14px 0 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0; }

.eyebrow, .status {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--muted);
}
.status { color: var(--ok); letter-spacing: .1em; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}

/* 4 · nav ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 9, 12, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font: 600 17px/1 var(--font-display); letter-spacing: -.01em; }
.mark {
  display: block; width: 32px; height: 32px; flex: none;
  background: url("logo-s.svg") center / contain no-repeat;
}
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:not(.btn)[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent);
}
.nav-links .btn { padding: 0 18px; min-height: 40px; color: var(--text); }
.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: var(--text); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before {
  position: absolute; left: 11px; width: 22px; height: 1.5px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { content: ""; left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(-90deg); }

/* 5 · buttons ------------------------------------------------------------ */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--text);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); border-color: #4a5164; background: rgba(255, 255, 255, .06); }
.btn.primary { background: var(--text); color: #08090c; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn[aria-disabled="true"] { color: var(--faint); cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; border-color: var(--line); background: rgba(255, 255, 255, .03); }
.btn small { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.arrow { transition: transform .25s var(--ease); }
a:hover > .arrow, .btn:hover .arrow { transform: translateX(3px); }

/* 6 · hero (home) -------------------------------------------------------- */
.hero-home { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero-home::before {                          /* architectural gradient + one light source */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 76% 42%, rgba(120, 130, 255, .13), transparent 70%),
    linear-gradient(180deg, #0b0d12 0%, #08090c 62%);
}
.hero-home::after {                           /* horizon line */
  content: ""; position: absolute; left: 0; right: 0; top: 66%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, .10) 62%, rgba(255, 255, 255, .10) 88%, transparent);
}
.hero-grid {
  position: relative; z-index: 1;
  min-height: min(760px, calc(100vh - 72px));
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px; align-items: center; padding: 72px 0 88px;
}
.hero-copy h1 {
  font-weight: 600;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02; letter-spacing: -.045em;
  margin: 26px 0 26px;
}
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(110deg, #aab0ff 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy .lead { max-width: 500px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 40px;
  font: 500 12px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.hero-meta span::before { content: ""; display: inline-block; width: 14px; height: 1px; background: var(--faint); vertical-align: middle; margin-right: 10px; }

/* logo stage — static in this pass; the WebGL canvas mounts into [data-logo-stage] later */
.logo-stage { position: relative; aspect-ratio: 1 / 1; max-height: 560px; margin-inline: auto; width: 100%; }
.stage-plane {                                /* faint depth planes */
  position: absolute; border: 1px solid var(--line-soft); border-radius: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .025), transparent 60%);
}
.stage-plane.p1 { inset: 6% 8% 26% 30%; }
.stage-plane.p2 { inset: 16% 22% 14% 8%; opacity: .6; }
.stage-base {                                 /* circular geometric base */
  position: absolute; left: 50%; bottom: 10%; width: 74%; aspect-ratio: 3.4 / 1; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #1b1f2a 0%, #0d0f14 70%);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.stage-base::after {                          /* thin light ring on the base */
  content: ""; position: absolute; inset: 14% 12%; border-radius: 50%;
  border: 1px solid rgba(138, 147, 255, .45);
}
.stage-shadow {                               /* soft contact shadow */
  position: absolute; left: 50%; bottom: 20%; width: 34%; height: 7%; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .75), transparent 70%); filter: blur(6px);
}
.stage-logo {
  position: absolute; left: 50%; bottom: 24%; width: 46%; aspect-ratio: 1; transform: translateX(-50%);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)) drop-shadow(0 0 30px rgba(138, 147, 255, .12));
}
.stage-caption {
  position: absolute; left: 0; right: 0; bottom: 2%;
  text-align: center; font: 500 11px/1.8 var(--font-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}

/* 7 · featured work ------------------------------------------------------ */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.work-card {
  position: relative; grid-column: span 4;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raise);
  transition: border-color .25s;
}
.work-card.lead-card { grid-column: span 6; }
a.work-card:hover { border-color: #465066; }
.work-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(135deg, rgba(138, 147, 255, .07), transparent 55%),
    var(--surface);
}
.lead-card .work-media { aspect-ratio: 16 / 9; }
.work-media[data-media="pending"]::before {   /* honest placeholder until real screenshots exist */
  content: attr(data-index);
  position: absolute; right: 22px; bottom: -18px;
  font: 700 clamp(96px, 12vw, 150px)/1 var(--font-display); letter-spacing: -.06em;
  color: rgba(255, 255, 255, .035);
}
.work-media[data-media="pending"]::after {
  content: "Visual pending"; position: absolute; left: 20px; top: 18px;
  font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.work-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-top { display: flex; justify-content: space-between; align-items: center; }
.work-num { font: 500 12px/1 var(--font-mono); letter-spacing: .14em; color: var(--faint); }
.work-body h3 { margin: 4px 0 0; font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -.025em; }
.work-kind { margin: 0; color: var(--muted); font-size: 15px; }
.work-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 12px/1.4 var(--font-mono); color: var(--faint); letter-spacing: .04em; }
.work-go {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--text);
  transition: background .2s, color .2s, border-color .2s;
}
a.work-card:hover .work-go { background: var(--text); color: #08090c; border-color: var(--text); }
.work-go.off { color: var(--faint); border-style: dashed; }
.work-soon { font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* 8 · stats + cta -------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line-soft); }
.stat { padding: 34px 28px; }
.stat + .stat { border-left: 1px solid var(--line-soft); }
.stat b { display: block; font: 600 40px/1 var(--font-display); letter-spacing: -.04em; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }
.cta-band { text-align: center; padding: 120px 0 104px; }
.cta-band h2 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -.04em; margin: 16px auto 0; max-width: 780px; }
.cta-band .sub { margin-inline: auto; }
.cta-band .actions { justify-content: center; }

/* 9 · footer ------------------------------------------------------------- */
.footer { margin-top: 0; padding: 36px 0; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .mark { width: 26px; height: 26px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* 10 · legacy components (inner pages awaiting rebuild) ----------------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.hero { padding: 96px 0 80px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 60px; align-items: center; }
.hero h1 { font-weight: 600; font-size: clamp(42px, 6vw, 72px); line-height: 1.04; letter-spacing: -.045em; margin: 20px 0 24px; max-width: 850px; }
.gradient { background: linear-gradient(120deg, #fff 5%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-panel, .card {
  position: relative;
  background: linear-gradient(150deg, rgba(23, 27, 35, .9), rgba(13, 15, 20, .9));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mini-panel { padding: 24px; font: 13px/1.8 var(--font-mono); color: var(--muted); }
.mini-panel b { color: var(--accent); font-weight: 500; }
.mini-panel em { color: var(--ok); font-style: normal; }
.project { grid-column: span 6; padding: 28px; min-height: 340px; display: flex; flex-direction: column; overflow: hidden; }
.project.featured { grid-column: span 12; min-height: 420px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.project h3 { font-weight: 600; font-size: 28px; line-height: 1.1; letter-spacing: -.025em; margin: 15px 0 12px; }
.project p { color: var(--muted); margin: 0; }
.project .actions { margin-top: auto; padding-top: 26px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font: 500 12px/1 var(--font-mono); color: #c3c9d6; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .025);
}
.visual { min-height: 290px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.ui-window { width: 88%; border: 1px solid #2c3342; background: #0d1016; border-radius: 14px; padding: 14px; }
.ui-top { height: 8px; width: 56px; border-radius: 8px; background: linear-gradient(90deg, var(--red) 0 28%, var(--yellow) 28% 62%, var(--ok) 62%); }
.ui-line { height: 10px; background: #1f2431; border-radius: 7px; margin-top: 14px; }
.ui-line.short { width: 56%; }
.ui-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.ui-box { height: 72px; border: 1px solid #2a3040; border-radius: 10px; background: rgba(138, 147, 255, .06); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fact { padding: 20px; }
.fact b { display: block; font: 600 25px var(--font-display); margin-bottom: 5px; }
.fact span { color: var(--muted); font-size: 13px; }
.page-head { padding: 88px 0 48px; }
.filterbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 25px; }
.filter { border: 1px solid var(--line); color: var(--muted); background: var(--bg-raise); border-radius: 999px; padding: 10px 16px; cursor: pointer; font-size: 14px; }
.filter:hover { color: var(--text); border-color: #4a5164; }
.filter.active { background: var(--text); border-color: var(--text); color: #08090c; }
.case-hero { padding: 80px 0 46px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px; align-items: center; }
.case-hero h1 { font-weight: 600; font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: -.045em; margin: 16px 0; }
.case-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.meta { padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.meta small { display: block; color: var(--muted); }
.content-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 35px; }
.content-grid h2 { font-size: 27px; }
.content-grid p, .content-grid li { color: var(--muted); }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; list-style: none; }
.feature-list li { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.notice { padding: 18px 20px; border: 1px solid rgba(231, 189, 99, .35); background: rgba(231, 189, 99, .06); border-radius: 15px; color: #f1d9a4; }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.demo { padding: 22px; }
.demo h3 { font: 600 21px var(--font-display); margin: 12px 0 7px; }
.demo p { color: var(--muted); font-size: 14px; }
.empty { display: none; }

/* 11 · forms ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form { padding: 32px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13px; color: #c7cddb; }
.field label .opt { color: var(--faint); }
.field input, .field textarea, .field select {
  width: 100%; color: var(--text); background: #0a0c10;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #3a4152; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-status { margin: 16px 0 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.form-status[data-state="ok"] { color: var(--ok); }
.form-status[data-state="error"] { color: var(--red); }

/* 11b · 3D logo layer + interaction polish ------------------------------- */
.logo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.logo-canvas--fixed { position: fixed; z-index: 40; width: 100vw; height: 100vh; }
.logo-3d .stage-logo { opacity: 0; }                  /* static <img> stays as the no-WebGL / mobile fallback */
.stage-shadow { opacity: var(--sh, 1); }
.logo-anchor { flex: none; width: clamp(140px, 12vw, 176px); align-self: stretch; min-height: 130px; }
.logo-readout {
  position: fixed; left: 0; top: 0; z-index: 41; pointer-events: none; opacity: 0; white-space: nowrap;
  font: 500 11px/1 var(--font-mono); letter-spacing: .1em; color: #cfd5ff; will-change: transform;
  transition: opacity .25s;
}
.logo-stage .logo-readout { position: absolute; left: auto; right: 4%; top: 6%; transform: none; }

[data-magnetic] { will-change: transform; }
.btn-in { display: inline-flex; align-items: center; gap: 10px; pointer-events: none; will-change: transform; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; transition: border-color .25s; }
.work-media > .work-media-in { position: absolute; inset: 0; will-change: transform; }

/* 12 · motion ------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .work-card, .work-card.lead-card { grid-column: span 6; }
  .work-card:last-child:nth-child(odd) { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 820px) {
  .wrap { width: min(calc(100% - 40px), var(--max)); }
  .section { padding: 72px 0; }
  .nav-inner { height: 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 20px; right: 20px; top: 70px;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 14px;
    border: 1px solid var(--line); border-radius: 16px; background: #0c0e13;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 16px; }
  .nav-links .btn { margin-top: 8px; }
  .hero-grid { grid-template-columns: 1fr; padding: 48px 0 56px; min-height: 0; gap: 20px; }
  .logo-stage { max-width: 380px; order: -1; margin-bottom: 12px; }
  .hero, .project.featured, .case-hero, .content-grid, .contact { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .project { grid-column: span 12; }
  .project.featured { display: flex; }
  .facts, .demo-grid, .feature-list { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .work-card, .work-card.lead-card { grid-column: span 12; }
  .cta-band { padding: 88px 0 72px; }
  .form { padding: 22px; }
}
@media (max-width: 520px) {
  .stat { padding: 26px 18px; }
  .stat b { font-size: 24px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-media.illustrative::after, .work-media.real-shot::after { top: 14px; right: 14px; }
.work-media.real-shot img { object-position: top; }

/* Showreel dialog */
.reel { width: min(1100px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #050609; color: var(--text); overflow: visible; }
.reel::backdrop { background: rgba(4, 5, 8, .82); backdrop-filter: blur(6px); }
.reel video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px 18px 0 0; background: #000; }
.reel-note { margin: 0; padding: 14px 18px; font-size: 13px; color: var(--muted); }
.reel-close { position: absolute; right: 10px; top: -46px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8, 9, 12, .9); color: var(--text); cursor: pointer; font-size: 14px; }
.reel-close:hover { border-color: #4a5164; }

/* language-dependent pseudo-element text */
:root:lang(ru) { --t-illustrative: "Иллюстрация"; --t-real: "Реальный скриншот"; --t-planned: " · в планах"; }
:root:lang(en) { --t-illustrative: "Illustrative"; --t-real: "Real screenshot"; --t-planned: " · planned"; }
.i18n-wait body { opacity: 0; }
body { transition: opacity .2s; }

/* language switcher */
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .02); }
.lang-switch button { min-width: 38px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 11px/1 var(--font-mono); letter-spacing: .08em; cursor: pointer; transition: color .2s, background .2s; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: #08090c; }

/* footer: links + social icons */
.footer .wrap { justify-content: space-between; }
.footer-links { align-items: center; }
.socials { display: flex; gap: 10px; }
.social { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); transition: color .2s, border-color .2s, background .2s, transform .25s var(--ease); }
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { color: var(--text); border-color: #4a5164; background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
@media (max-width: 820px) { .lang-switch { align-self: flex-start; margin: 6px 10px; } .footer .wrap { flex-direction: column; align-items: flex-start; } }

/* 2D companion (phones, tablets, no-WebGL, reduced motion): a small S that follows the scroll */
.companion-2d { position: fixed; right: 14px; bottom: 18px; z-index: 40; width: 44px; height: 44px; pointer-events: none; opacity: .9; transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); transition: transform .35s var(--ease); }
@media (prefers-reduced-motion: reduce) { .companion-2d { transition: none; transform: none; } }

.work-top { align-items: flex-start; gap: 12px; }
.work-top .status { text-align: right; line-height: 1.35; align-items: flex-start; }
.work-top .status .dot { margin-top: 4px; }

/* Home: frontend showcase teaser */
.fe-teaser { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin: 24px auto 0; padding: clamp(28px, 4vw, 52px); border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(70% 90% at 90% 40%, rgba(120, 130, 255, .10), transparent 70%), var(--bg-raise); }
.fe-teaser h2 { font-weight: 600; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.035em; margin: 14px 0 0; }
.teaser-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.teaser-chips span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: #c3c9d6; background: rgba(255, 255, 255, .02); }
.fe-teaser-live { position: relative; }
.fe-teaser-live canvas { display: block; width: 100%; height: 260px; border: 1px solid var(--line-soft); border-radius: 18px; background: #0a0c11; cursor: crosshair; }
.fe-teaser-live small { display: block; margin-top: 10px; font: 500 11px/1.3 var(--font-mono); letter-spacing: .08em; color: var(--faint); }
@media (max-width: 900px) { .fe-teaser { grid-template-columns: 1fr; } .fe-teaser-live canvas { height: 200px; } }

/* language switcher in the top bar on narrow layouts (the copy inside the collapsed menu is hidden there) */
.lang-switch--bar { display: none; }
@media (max-width: 820px) {
  .lang-switch--bar { display: inline-flex; margin-left: auto; margin-right: 8px; }
  .lang-switch--bar button { min-width: 34px; height: 28px; padding: 0 8px; }
  .nav-links .lang-switch { display: none; }
}
/* the 2D companion gently floats so it never looks frozen */
@keyframes c2d-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.companion-2d { animation: c2d-float 4.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .companion-2d { animation: none; } }
