/* =========================================================
   Павел Аушев — Light Gallery + Violet accent
   ========================================================= */

:root {
  --bg:        #f7f5f2;
  --bg-2:      #efece6;
  --paper:     #ffffff;
  --fg:        #0e0e0e;
  --fg-2:      #2a2a2a;
  --muted:     #6c6c6c;
  --faint:     #aeaeae;
  --hairline:  #e2dfd9;
  --hairline-strong: #d2cec5;
  --accent:    #6c4dff;
  --accent-2:  #f4ff5b;

  --display: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body:    'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:    'Martian Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1440px;
  --pad:  clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- micro labels / kicker ---------- */
.micro {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 16px;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.022em;
}

/* ---------- TOP NAV ---------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, padding .25s ease;
}
.topnav.scrolled {
  border-bottom-color: var(--hairline);
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
  max-width: 56vw;
}
.brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}
.links a {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .3s var(--ease);
}
.links a:hover,
.links a.is-current {
  color: var(--fg);
}
.links a:hover::after,
.links a.is-current::after { right: 0; }

/* ---------- HERO ---------- */
.hero {
  padding: clamp(180px, 22vh, 260px) 0 clamp(60px, 8vh, 100px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -22%; right: -14%;
  width: 70vw; height: 70vw;
  max-width: 860px; max-height: 860px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(108, 77, 255, .26), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 4vw, 80px);
  align-items: center;
}
.hero-stats {
  justify-self: end;
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.hero-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  padding: clamp(22px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--hairline);
}
.hero-stat:last-child { border-bottom: 0; }
.hero-stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(72px, 9vw, 128px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--fg);
  position: relative;
}
.hero-stat:nth-child(2) .hero-stat-num { color: var(--accent); }
.hero-stat-sup {
  font-size: .55em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: top;
  margin-left: 4px;
  color: var(--accent);
}
.hero-stat:nth-child(2) .hero-stat-sup { color: var(--fg); }
.hero-stat-cap {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
  padding-bottom: 8px;
}
h1.title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(68px, 11vw, 184px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: clamp(30px, 4vw, 52px);
}
h1.title .accent { color: var(--accent); }
.lede {
  max-width: 640px;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg-2);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ---------- block ---------- */
.block {
  padding-block: clamp(90px, 11vw, 160px);
  border-top: 1px solid var(--hairline);
  position: relative;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.about-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.about-portrait::after {
  content: '';
  position: absolute;
  inset: auto -10px -10px auto;
  width: 60%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(108, 77, 255, .25), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.about-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.96);
}
.about-text p {
  max-width: 56ch;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--fg-2);
}
.about-text p + p { margin-top: 16px; }

/* ---------- WORKS ---------- */
.works-head {
  margin-bottom: clamp(40px, 5vw, 64px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 28px);
}
.work {
  display: block;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
}
.work:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px -20px rgba(108, 77, 255, .35);
  border-color: var(--accent);
}
.work-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  overflow: hidden;
}
.work-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.work:hover .work-cover img { transform: scale(1.04); }
.work-play {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: var(--fg);
  display: grid;
  place-items: center;
  font-size: 14px;
  backdrop-filter: blur(6px);
  transition: background .25s ease, color .25s ease;
}
.work:hover .work-play {
  background: var(--accent);
  color: #fff;
}
.work-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.work-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(16px, 1.3vw, 19px);
  letter-spacing: -0.005em;
  color: var(--fg);
}
.work-year {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--muted);
}
.work-role {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- CLIENTS ---------- */
.clients .h2 { margin-bottom: clamp(36px, 5vw, 56px); }
.brand-wall {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.brand-wall li {
  padding: clamp(28px, 3.6vw, 48px) clamp(20px, 2vw, 28px);
  border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  color: var(--fg);
  transition: background .25s ease, color .25s ease;
}
.brand-wall li:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- CONTACT ---------- */
.contact {
  background: var(--fg);
  color: var(--bg);
  border-top: 0;
  padding-block: clamp(110px, 14vw, 200px);
}
.contact .micro { color: var(--accent-2); margin-bottom: 32px; }
.contact-mail {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 6.5vw, 104px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--bg);
  margin-bottom: clamp(32px, 4vw, 56px);
  transition: color .25s ease;
  word-break: break-all;
}
.contact-mail-text { display: inline; }
.contact-mail-at {
  color: var(--accent-2);
}
.contact-mail-arrow {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 48px);
  color: var(--accent-2);
  flex-shrink: 0;
  transition: transform .35s var(--ease);
}
.contact-mail:hover { color: var(--accent-2); }
.contact-mail:hover .contact-mail-arrow { transform: translate(6px, -6px); }
.contact-sub {
  color: rgba(255,255,255,.55);
  max-width: 480px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1.5;
}

/* ---------- FOOTER ---------- */
.foot {
  padding: 28px 0;
  background: var(--fg);
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.08);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
}

/* ---------- VIDEO MODAL ---------- */
.vmodal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 6, 18, .82);
  backdrop-filter: blur(12px) saturate(1.2);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
}
.vmodal.is-open { display: flex; }
.vmodal-close {
  position: fixed;
  top: clamp(12px, 2vw, 28px);
  right: clamp(12px, 2vw, 28px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.vmodal-close:hover { background: var(--accent); transform: rotate(90deg); }
.vmodal-stage {
  position: relative;
  width: min(100%, 1280px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(108, 77, 255, .35);
}
.vmodal-spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.7);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}
.vmodal-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.vmodal-fallback {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: none;
  padding: 8px 14px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s ease;
  z-index: 2;
}
.vmodal.is-open .vmodal-fallback { display: inline-block; }
.vmodal-fallback:hover { background: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .about-body { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { max-width: 420px; }
  .links { gap: 14px; }
  .links a { font-size: 10.5px; letter-spacing: .14em; }
  .brand-text { display: none; }
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-stats { justify-self: start; max-width: 100%; }
}
@media (max-width: 640px) {
  .works-grid { grid-template-columns: 1fr; }
  .topnav { padding: 14px var(--pad); }
}
