/* ============================================================
   STEELLERY — портфолио
   Цвета: #0E0E0E / #FFFFFF / акцент #7ABFDE
   Шрифт: Inter Tight (Regular / Medium / Bold)
   ============================================================ */

@font-face{
  font-family:"Inter Tight";
  src:url("fonts/InterTight-Regular.woff2") format("woff2"),
      url("fonts/InterTight-Regular.ttf") format("truetype");
  font-weight:400;font-display:swap;
}
@font-face{
  font-family:"Inter Tight";
  src:url("fonts/InterTight-Medium.woff2") format("woff2"),
      url("fonts/InterTight-Medium.ttf") format("truetype");
  font-weight:500;font-display:swap;
}
@font-face{
  font-family:"Inter Tight";
  src:url("fonts/InterTight-Bold.woff2") format("woff2"),
      url("fonts/InterTight-Bold.ttf") format("truetype");
  font-weight:700;font-display:swap;
}

:root{
  --bg:#0E0E0E;
  --fg:#FFFFFF;
  --accent:#7ABFDE;
  --line:rgba(255,255,255,.18);
  --muted:rgba(255,255,255,.55);
  --bar:44px;      /* высота шапки одного кейса */
  --topbar:72px;   /* высота верхней панели */
  --sans:"Inter Tight","Helvetica Neue",Arial,sans-serif;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:auto}
body{
  background:var(--bg);color:var(--fg);overflow-x:hidden;
  font-family:var(--sans);font-weight:400;
  -webkit-font-smoothing:antialiased;
}
::selection{background:var(--accent);color:var(--bg)}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible{
  outline:2px solid var(--accent);outline-offset:3px;border-radius:2px;
}

h1,h2,h3,.serif{font-family:var(--sans);font-weight:700}

/* ---------- ВЕРХНЯЯ ПАНЕЛЬ ---------- */
.topbar{
  position:fixed;top:0;left:0;width:100%;height:var(--topbar);
  padding:0 24px;display:flex;align-items:center;
  justify-content:space-between;gap:24px;
  font-size:16px;z-index:100;
  background:var(--bg);color:var(--fg);
}
.topbar .who{display:flex;align-items:center;gap:16px;min-width:0}
.topbar .who img{
  width:44px;height:44px;border-radius:50%;object-fit:cover;flex:none;
}
.topbar .who .nm{font-weight:500;white-space:nowrap}
.topbar .who .role{color:var(--muted);white-space:nowrap}
.topbar nav{
  position:absolute;left:50%;transform:translateX(-50%);
  display:flex;gap:44px;
}
.topbar a{position:relative;color:var(--muted);transition:color .3s}
.topbar a:hover{color:var(--fg)}
.topbar a::after{
  content:"";position:absolute;left:0;bottom:-4px;width:100%;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:right;
  transition:transform .35s cubic-bezier(.65,0,.35,1);
}
.topbar a:hover::after{transform:scaleX(1);transform-origin:left}

/* ---------- ГЛАВНЫЙ ЭКРАН ---------- */
#hero{
  position:relative;height:100vh;display:flex;flex-direction:column;
  justify-content:flex-end;overflow:hidden;
}
#ring-webgl{
  position:absolute;inset:var(--topbar) 0 0 0;z-index:1;
  cursor:grab;touch-action:pan-y;
}
#ring-webgl:active{cursor:grabbing}
#ring-webgl canvas{display:block;width:100%;height:100%}

/* логотип перекрывает webgl снизу */
.hero-logo{
  position:relative;z-index:2;display:block;
  width:min(88vw,1500px);margin:0 auto;
  padding-bottom:4vh;pointer-events:none;
}
.btn-cases{display:none}
.hero-socials{display:none}

/* ---------- СТЕК КЕЙСОВ ----------
   Каждый .case — sticky, top растёт с номером,
   шапки складываются стопкой. */
.cases{position:relative;z-index:3}
.case{
  position:sticky;height:100vh;overflow:hidden;background:var(--bg);
  top:calc(var(--topbar) + var(--i) * var(--bar));
  box-shadow:0 -10px 40px rgba(0,0,0,.5);
}
.case-link{position:absolute;inset:0;display:block}

.case-head{
  position:absolute;top:0;left:0;width:100%;height:var(--bar);
  z-index:5;display:grid;
  grid-template-columns:minmax(0,1.15fr) 1fr 170px auto;gap:24px;
  align-items:center;padding:0 24px;
  font-size:16px;
  background:var(--bg);border-top:1px solid var(--line);
}
.case-head .idx{display:flex;gap:16px;align-items:center;min-width:0}
.case-head .num{font-size:12px;color:var(--muted)}
.case-head .name{
  font-weight:500;text-transform:uppercase;letter-spacing:.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.case-head .cat{justify-self:start;color:rgba(255,255,255,.8);white-space:nowrap}
.case-head .year{color:var(--muted);white-space:nowrap;font-size:14px;justify-self:end}

/* анимированная кнопка «подробнее» */
.btn-more{
  position:relative;display:inline-flex;align-items:center;gap:8px;
  padding:6px 16px;border:1px solid var(--line);border-radius:999px;
  font-size:12px;letter-spacing:.06em;text-transform:uppercase;
  overflow:hidden;isolation:isolate;
  transition:color .35s,border-color .35s;
}
.btn-more::before{
  content:"";position:absolute;inset:0;z-index:-1;background:var(--accent);
  transform:translateY(101%);transition:transform .35s cubic-bezier(.65,0,.35,1);
}
.btn-more .arr{transition:transform .35s cubic-bezier(.65,0,.35,1)}
.case-link:hover .btn-more,.btn-more:hover{color:var(--bg);border-color:var(--accent)}
.case-link:hover .btn-more::before,.btn-more:hover::before{transform:translateY(0)}
.case-link:hover .btn-more .arr,.btn-more:hover .arr{transform:translate(3px,-3px)}

/* окно с превью (под шапкой), внутренний параллакс */
.case-media{
  position:absolute;left:0;right:0;top:var(--bar);bottom:0;overflow:hidden;
}
.case-media .img{
  position:absolute;top:-12%;left:0;width:100%;height:124%;
  background-size:cover;background-position:center;
  will-change:transform;
  transition:filter .5s;
}
.case-link:hover .img{filter:brightness(1.06)}

/* ---------- ОБО МНЕ ---------- */
#about{
  position:relative;z-index:10;background:var(--bg);
  border-top:1px solid var(--line);
  padding:120px 24px;
}
#about h2{
  font-size:clamp(44px,8vw,120px);line-height:.9;margin-bottom:64px;
  letter-spacing:-.02em;
}
#about h2 em{color:var(--accent);font-style:normal}

.about-lead{
  font-size:clamp(22px,3vw,42px);font-weight:400;line-height:1.15;
  text-transform:uppercase;max-width:1100px;margin-bottom:96px;
}
.about-lead b{font-weight:700}

.about-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:64px 40px;
}
.about-col h3{
  font-size:22px;font-weight:500;margin-bottom:24px;color:var(--accent);
}
.about-col ul{list-style:none}
.about-col li{
  padding:16px 0;border-top:1px solid var(--line);
  font-size:15px;line-height:1.5;
}
.about-col li b{display:block;font-weight:700;font-size:16px;margin-bottom:2px}
.about-col li span{color:var(--muted)}
.about-col li a{
  display:inline-block;margin-top:6px;color:var(--accent);
  border-bottom:1px solid transparent;transition:border-color .3s;
}
.about-col li a:hover{border-color:var(--accent)}

.about-facts{
  display:grid;grid-template-columns:repeat(3,1fr);gap:40px;
  margin:0 0 96px;
}
.fact{border-top:1px solid var(--line);padding-top:16px}
.fact .n{
  font-weight:700;font-size:clamp(36px,4.5vw,64px);line-height:1;
  letter-spacing:-.02em;
}
.fact p{margin-top:10px;font-size:14px;color:var(--muted);line-height:1.5}

/* ---------- ПОДВАЛ ---------- */
footer{
  position:relative;z-index:10;background:var(--bg);
  padding:120px 24px 32px;border-top:1px solid var(--line);
}
.footer-status{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:24px;font-size:16px;
}
.footer-status .dot{
  width:10px;height:10px;border-radius:50%;background:var(--accent);
  flex:none;margin-top:6px;
}
.footer-status .note{display:flex;gap:14px;line-height:1.5;margin:0}
.footer-status .resume{
  display:flex;gap:14px;align-items:baseline;color:var(--accent);
  text-decoration:underline;text-underline-offset:4px;
}
.footer-status .resume .dot{margin-top:4px}
.footer-status .resume:hover{opacity:.75}
.footer-hero{
  position:relative;width:min(700px,84vw);margin:96px auto 160px;
}
.footer-hero .backdrop{width:100%;display:block}
.footer-hero .logo{
  position:absolute;left:-7%;bottom:-9%;width:114%;max-width:none;display:block;
  will-change:transform;transition:transform .1s linear;
}
.footer-bottom{
  display:flex;justify-content:space-between;align-items:flex-end;
  flex-wrap:wrap;gap:28px;font-size:16px;
}
.footer-bottom .mail-row{display:flex;gap:64px;margin-bottom:40px}
.footer-bottom .mail-row .lbl{color:var(--muted)}
.footer-bottom .mail-row a:hover{color:var(--accent)}
.footer-bottom nav{display:flex;gap:44px}
.footer-bottom nav a{color:var(--muted);transition:color .3s}
.footer-bottom nav a:hover{color:var(--fg)}
.footer-bottom .rights{color:var(--muted)}

/* ---------- АДАПТИВ (минимальный) ---------- */
@media(max-width:1250px){
  .topbar .who .role{display:none}
}
@media(max-width:900px){
  .about-grid,.about-facts{grid-template-columns:1fr;gap:40px}
  .case-head{grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .case-head .cat,.case-head .year{display:none}
  .topbar{font-size:13px}
  .topbar .who .role{display:none}
  .topbar nav{position:static;transform:none;gap:16px}
  .footer-bottom .mail-row{gap:24px}
}

/* ---------- МОБИЛЬНАЯ ВЕРСИЯ ---------- */
@media(max-width:700px){
  .topbar{font-size:13px;padding:0 16px;gap:12px}
  .topbar .who{gap:10px}
  .topbar .who img{width:36px;height:36px}
  .topbar .who .nm{font-size:13px}
  .topbar .who .role{display:inline;font-size:11px;white-space:normal;line-height:1.2}
  .topbar nav{display:none}
  .btn-cases{
    display:inline-block;font-size:14px;color:var(--fg);
    text-decoration:underline;text-underline-offset:4px;white-space:nowrap;
  }
  .btn-cases::after{display:none}

  /* кольцо по центру, не перекрывает хедер и лого с соцсетями */
  #ring-webgl{inset:calc(var(--topbar) + 8px) 0 205px 0}
  .hero-logo{width:100%;padding:0 10px 10px}
  .hero-socials{
    display:flex;justify-content:space-between;align-items:center;
    position:relative;z-index:2;padding:0 16px 20px;
    font-size:15px;color:var(--muted);
  }
  .hero-socials a{transition:color .3s}
  .hero-socials a:active,.hero-socials a:hover{color:var(--fg)}

  /* футер: компактные ряды */
  .footer-status{font-size:14px}
  .footer-bottom{font-size:14px}
  .footer-bottom .mail-row{gap:20px;margin-bottom:28px}
  .footer-bottom nav{gap:14px 22px;flex-wrap:wrap}
  .footer-hero{margin:64px auto 110px}

  /* вертикальные обложки кейсов для мобильных */
  .case:nth-of-type(1) .img{background-image:url('img/case-1-mobile.jpg')!important}
  .case:nth-of-type(2) .img{background-image:url('img/case-2-mobile.jpg')!important}
  .case:nth-of-type(3) .img{background-image:url('img/case-3-mobile.jpg')!important}
  .case:nth-of-type(4) .img{background-image:url('img/case-4-mobile.jpg')!important}
}

/* ---------- reduced motion ---------- */
@media(prefers-reduced-motion:reduce){
  .btn-more::before,.btn-more .arr,.topbar a::after,
  .footer-hero .logo,.case-media .img{transition:none}
}
