/* ==========================================================================
   WisePerformer portfolio site - dark, minimal, premium.
   Full-screen animated splash + dark project portfolio.
   Montserrat self-hosted (no CDN). Zero external requests.
   ========================================================================== */

/* ---- Self-hosted Montserrat (no Google Fonts CDN) ---------------------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-variable-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: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-variable-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---- Design tokens (dark) --------------------------------------------- */
:root {
  --bg:        #070b12;
  --bg-2:      #0a0e17;
  --bg-3:      #0e141f;
  --panel:     rgba(255, 255, 255, .035);
  --panel-2:   rgba(255, 255, 255, .05);
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .14);
  --ink:       #eaf1fb;
  --ink-2:     #c3cfdf;
  --muted:     #8593a8;
  --muted-2:   #6c7a8f;

  --brand-a:   #04489B;
  --brand-b:   #0EAEEC;
  --brand-c:   #0F8ED2;
  --brand-neon:#3D7CFF;
  --grad: linear-gradient(120deg, var(--brand-a) 0%, var(--brand-c) 55%, var(--brand-b) 100%);

  --maxw: 1160px;
  --radius: 18px;
  --radius-sm: 12px;
  --ff: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  /* per-project accents */
  --acc-retail: #E8A838;
  --acc-inventory: #f97316;
  --acc-unit: #3b82f6;
  --acc-wp: #3D7CFF;
  --acc-web3d: #d4af37;
}

/* ---- Reset / base ------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-b); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(61, 124, 255, .35); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }

/* ==========================================================================
   Animated aurora background (CSS only, shared by splash + portfolio)
   ========================================================================== */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(1200px 800px at 50% -10%, #0c1626 0%, transparent 60%),
    var(--bg);
  pointer-events: none;
}
.bg__blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .55; will-change: transform, opacity;
}
.bg__blob--a {
  width: 46vw; height: 46vw; min-width: 420px; min-height: 420px;
  left: -8vw; top: -10vh;
  background: radial-gradient(circle at 40% 40%, rgba(14,174,236,.55), rgba(14,174,236,0) 68%);
  animation: drift-a 22s ease-in-out infinite;
}
.bg__blob--b {
  width: 42vw; height: 42vw; min-width: 380px; min-height: 380px;
  right: -6vw; top: 6vh;
  background: radial-gradient(circle at 50% 50%, rgba(4,72,155,.6), rgba(4,72,155,0) 70%);
  animation: drift-b 26s ease-in-out infinite;
}
.bg__blob--c {
  width: 38vw; height: 38vw; min-width: 340px; min-height: 340px;
  left: 28vw; bottom: -16vh;
  background: radial-gradient(circle at 50% 50%, rgba(61,124,255,.4), rgba(61,124,255,0) 70%);
  animation: drift-c 30s ease-in-out infinite;
}
/* faint engineering grid + vignette on top of the blobs */
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 78%);
}
.bg__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 42%, transparent 55%, rgba(3,6,11,.85) 100%);
}
.bg--dim .bg__blob { opacity: .32; }

@keyframes drift-a {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50%     { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}
@keyframes drift-b {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50%     { transform: translate3d(-5vw, 7vh, 0) scale(1.15); }
}
@keyframes drift-c {
  0%,100% { transform: translate3d(0,0,0) scale(1); opacity: .4; }
  50%     { transform: translate3d(4vw, -6vh, 0) scale(1.1); opacity: .55; }
}

/* ---- Shared small controls -------------------------------------------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 13px; font-weight: 600; font-size: 13px; letter-spacing: .04em;
  color: var(--ink-2); background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px); transition: border-color .18s, color .18s, background .18s;
}
.lang-switch:hover { border-color: var(--brand-b); color: #fff; background: rgba(14,174,236,.12); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .18s ease, background .18s, border-color .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 30px rgba(14,110,180,.4), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary:hover { color: #fff; box-shadow: 0 16px 40px rgba(14,110,180,.55); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { color: #fff; border-color: var(--brand-b); background: rgba(14,174,236,.1); }

/* ==========================================================================
   SPLASH (index)
   ========================================================================== */
.splash { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; }

.splash__top {
  position: relative; z-index: 3;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 22px 30px 0;
}

.splash__center {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px 120px;
  position: relative; z-index: 2;
}
.splash__logo {
  width: 128px; height: auto; margin-bottom: 22px;
  filter: drop-shadow(0 0 30px rgba(14,174,236,.5)) drop-shadow(0 0 60px rgba(4,72,155,.35));
  animation: logo-glow 6s ease-in-out infinite;
}
@keyframes logo-glow {
  0%,100% { filter: drop-shadow(0 0 26px rgba(14,174,236,.4)) drop-shadow(0 0 54px rgba(4,72,155,.3)); }
  50%     { filter: drop-shadow(0 0 40px rgba(14,174,236,.62)) drop-shadow(0 0 80px rgba(61,124,255,.42)); }
}
.splash__word {
  font-size: clamp(38px, 8vw, 82px); font-weight: 800; letter-spacing: -.02em;
  line-height: 1; margin: 0;
  background: linear-gradient(120deg, #eaf1fb 0%, #bfe4fb 50%, #7fbef0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.splash__sub {
  margin: 20px 0 0; font-size: clamp(13px, 2.4vw, 17px); font-weight: 400;
  letter-spacing: .34em; text-transform: uppercase; color: var(--muted);
}
.splash__cta { margin-top: 42px; }
.splash__cta .btn { padding: 15px 40px; font-size: 17px; letter-spacing: .01em; }

/* contacts, small, bottom-right */
.splash__contacts {
  position: absolute; right: 30px; bottom: 26px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  font-size: 13px;
}
.splash__contacts a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-weight: 500; letter-spacing: .01em;
  transition: color .16s;
}
.splash__contacts a:hover { color: var(--brand-b); }
.splash__contacts .ico { width: 15px; height: 15px; fill: currentColor; flex: none; opacity: .9; }

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */
.pf { position: relative; z-index: 1; min-height: 100vh; }
.pf__header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px 0 6px;
}
.pf__brand { display: inline-flex; align-items: center; gap: 12px; }
.pf__brand img { width: 30px; height: 30px;
  filter: drop-shadow(0 0 12px rgba(14,174,236,.5)); }
.pf__brand span { font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.pf__nav { display: inline-flex; align-items: center; gap: 12px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2); font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 15px 6px 12px;
  background: rgba(255,255,255,.04); transition: border-color .18s, color .18s, background .18s;
}
.back-link:hover { color: #fff; border-color: var(--brand-b); background: rgba(14,174,236,.1); }
.back-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.pf__title { padding: 30px 0 8px; }
.pf__title .eyebrow {
  text-transform: uppercase; letter-spacing: .28em; font-size: 12px; font-weight: 700;
  color: var(--brand-b); margin: 0 0 12px;
}
.pf__title h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.02em; margin: 0; }
.pf__title p { color: var(--muted); font-size: 17px; margin: 14px 0 0; max-width: 60ch; }

.pf__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  padding: 40px 0 70px;
}

/* ---- project tile (styled per project) -------------------------------- */
.tile {
  --acc: var(--brand-neon);
  position: relative; display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--acc) 9%, transparent), transparent 42%),
    var(--bg-3);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px rgba(0,0,0,.4);
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.tile::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 30%, transparent));
  z-index: 3;
}
.tile:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--acc) 55%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset,
              0 26px 60px rgba(0,0,0,.5),
              0 0 0 1px color-mix(in srgb, var(--acc) 22%, transparent),
              0 18px 60px color-mix(in srgb, var(--acc) 26%, transparent);
}

.tile__shot {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(150deg, #10161f, #0b0f17);
  border-bottom: 1px solid var(--line);
}
.tile__shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: .92; transition: transform .3s ease, opacity .3s ease;
}
.tile:hover .tile__shot img { transform: scale(1.04); opacity: 1; }
.tile__shot::after { /* accent wash + missing-image fallback tint */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(7,11,18,.55) 100%);
}

.tile__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.tile__badge {
  align-self: flex-start; margin-bottom: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  color: var(--acc);
  background: color-mix(in srgb, var(--acc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent);
}
.tile__title { font-size: 20px; line-height: 1.2; margin: 0 0 10px; color: #fff; }
.tile__desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; flex: 1; }

.tile__stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 15px 0 17px; margin: 0 0 16px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tile__stat b {
  display: block; font-size: 19px; font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--acc) 78%, #ffffff);
}
.tile__stat span { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

.tile__actions { display: flex; gap: 10px; }
.tile__btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 14px; border-radius: 11px; font-weight: 700; font-size: 14px;
  transition: transform .14s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.tile__btn svg { width: 15px; height: 15px; flex: none; }
.tile__btn--demo {
  color: #0a0e17;
  background: color-mix(in srgb, var(--acc) 88%, #ffffff);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--acc) 30%, transparent);
}
.tile__btn--demo:hover { transform: translateY(-2px); background: var(--acc);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--acc) 45%, transparent); }
.tile__btn--slides {
  color: var(--ink); background: rgba(255,255,255,.05);
  border: 1px solid var(--line-2);
}
.tile__btn--slides:hover { transform: translateY(-2px); color: #fff;
  border-color: color-mix(in srgb, var(--acc) 60%, transparent);
  background: color-mix(in srgb, var(--acc) 12%, transparent); }

/* ---- portfolio footer ------------------------------------------------- */
.pf__foot {
  border-top: 1px solid var(--line); padding: 24px 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; font-size: 13px; color: var(--muted-2);
}
.pf__foot .contacts { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.pf__foot .contacts a { color: var(--muted); font-weight: 500; }
.pf__foot .contacts a:hover { color: var(--brand-b); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .pf__grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .splash__center { padding: 30px 20px 130px; }
  .splash__logo { width: 96px; }
  .splash__sub { letter-spacing: .24em; }
  .splash__contacts { right: 20px; bottom: 20px; }
  .pf__title p { font-size: 15px; }
}
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .splash__top { padding: 16px 18px 0; }
  .splash__contacts { left: 18px; right: 18px; align-items: center; }
  .tile__actions { flex-direction: column; }
  .splash__cta .btn { width: 100%; }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bg__blob, .splash__logo { animation: none !important; }
  html { scroll-behavior: auto; }
  .btn:hover, .tile:hover, .tile__btn:hover { transform: none; }
}
