/* ============================================
   RESET + ПЕРЕМЕННЫЕ
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1115; 
  --card: #171a21; 
  --text: #f4f5f7;
  --muted: #9aa0ab; 
  --accent: #ff5c39; 
  --border: #2e3440; 
  --ok: #4ade80;
  --max-w: 1180px;
  --font-GreatVibes: 'Great Vibes', cursive;
  --font-Kapakana: 'Kapakana', cursive;
}

/* ============================================
   БАЗА
   ============================================ */
body {font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;   background: var(--bg);   color: var(--text);   line-height: 1.55;   -webkit-font-smoothing: antialiased; }

main {max-width: var(--max-w);  margin: 0 auto; padding: 4rem 1.5rem 2rem; }

h1 {font-family: var(--font-GreatVibes); font-weight: 400; font-size: clamp(2.2rem, 9vw, 6.9rem);  line-height: 1.05;  letter-spacing: 0;  text-shadow: 1px 1px 0 var(--accent);  text-align: center;  opacity: .8;}
h2 {  font-size: clamp(1.5rem, 3vw, 2rem);  letter-spacing: -0.02em;  margin-bottom: 0.8rem;}
h3 { font-size: 1rem; margin-bottom: 0.5rem; }
p { color: var(--muted); margin-bottom: 1rem; }
ul { list-style: none; }
a { color: inherit; }
img { max-width: 100%; }

/* ============================================
   ШАПКА
   ============================================ */


.site-header { border-bottom: 1px solid var(--border);  background: rgba(15, 17, 21, 0.95);  backdrop-filter: blur(8px);  position: sticky;  top: 0;  z-index: 50;}
.header-inner {  max-width: var(--max-w);  margin: 0 auto;  padding: 1.1rem 1.5rem;  display: flex;  align-items: center;  justify-content: space-between;  gap: 2rem;}

.brand {  display: inline-flex;  align-items: center;  text-decoration: none;  flex-shrink: 0;
  & img {  height: 50px;  width: auto;  display: block;  transition: opacity 0.2s;  }
  &:hover img { opacity: 0.85; }
}

.main-nav { display: flex;  gap: 2rem;  align-items: center;
  & a {position: relative;  font-family: var(--font-GreatVibes);  font-weight: 400;  font-size: 2rem;  letter-spacing: 0.01em;  color: var(--muted);  text-decoration: none;  line-height: 1.4;  transition: color 0.2s;
    &::after {  content: "";  position: absolute;  left: 0;  right: 0;  bottom: 5px;  height: 2px;  background: var(--accent);  transform: scaleX(0);  transform-origin: left;  transition: transform 0.25s ease;}
  }
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.burger {  display: none;  position: relative;  width: 32px;  height: 24px;  cursor: pointer;  margin-left: auto;  z-index: 60;
  &::before, &::after {  content: "";  position: absolute;  left: 0;  right: 0;  top: 50%;  height: 2px;  background: var(--text);  transform: translateY(-50%);  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;}
  &::after {  box-shadow: 0 -8px 0 var(--text), 0 8px 0 var(--text);}
}
.burger-toggle:checked + .burger::before { transform: translateY(-50%) rotate(45deg); }
.burger-toggle:checked + .burger::after { transform: translateY(-50%) rotate(-45deg); box-shadow: none; }

/* ============================================
   ФУТЕР
   ============================================ */
.site-footer {  border-top: 1px solid var(--border);  margin-top: 5rem;  padding: 2.5rem 0;}
.footer-inner {  max-width: var(--max-w);  margin: 0 auto;  padding: 0 1.5rem;  display: flex;  align-items: center;  justify-content: space-between;  gap: 1.5rem;  flex-wrap: wrap;}

.footer-copy {  display: inline-flex;  align-items: flex-end;  gap: 0.75rem;  text-decoration: none;  transition: opacity 0.2s;
  &:hover { opacity: 0.85; }
  & img {height: 40px;  width: auto;  display: block;  opacity: 0.45;}
  & span {font-family: var(--font-Kapakana);  font-weight: 400;  font-size: 1.4rem;  color: var(--muted);  line-height: 1;}
}

.footer-contacts { display: flex; gap: 1.25rem; margin-top: 25px;
  & a { color: var(--muted); font-size: 1.9rem; text-decoration: none; transition: color 0.2s; display: inline-flex;
    &:hover { color: var(--accent); }
  }
}

/* ============================================
   HERO
   ============================================ */
.hero { margin-bottom: 2.5rem; }

.eyebrow {display: flex; align-items: center; gap: 1rem; font-weight: 400; font-size: clamp(.9rem, 3vw, 1.3rem); letter-spacing: 0.01em; color: var(--accent); margin-bottom: 1.8rem; line-height: 1.2; text-align: right; margin-top: -1.1rem;
  &::before {content: ""; flex: 1; height: 1px; background: var(--accent);}
}

.stack { margin-top: 1rem; color: #cfd3da; font-size: 0.95rem; }
.lead { color: var(--muted); font-size: 1.15rem; margin-bottom: 2rem; }

@media (max-width: 780px) {
 .hero h1 {text-align: center; text-shadow: none; opacity: 1;} 
  .eyebrow {margin-top: 1rem;}
}


/* ============================================
   НАВЫКИ
   ============================================ */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 4.5rem; }
.skill { padding: 1.3rem 1.4rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  & h3 { font-size: 1rem; margin-bottom: 0.5rem; }
  & p { color: var(--muted); font-size: 0.9rem; margin: 0; }
}

/* ============================================
   КЕЙСЫ НА ГЛАВНОЙ
   ============================================ */
.case { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; padding: 3rem 0; border-top: 1px solid var(--border);
  &:last-of-type { border-bottom: 1px solid var(--border); }
}
.case-page > .btn:first-child {display: block; width: fit-content; margin: 0 auto 1.5rem;}
.case-preview { display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0b0d11; transition: 0.3s;
  &:hover { transform: translateY(-4px); border-color: var(--accent); }
  & img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
}

.title-lift-link, .title-lift-expo { position: relative; padding-right: 130px; min-height: 48px; display: flex; align-items: center;
  &::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 110px; height: 44px; background-repeat: no-repeat; background-position: center; background-size: contain; opacity: 0.9; }
}
.title-lift-link::after { background-image: url(/assets/lift-nav-logo.webp); filter: brightness(0) invert(1); }
.title-lift-expo::after { background-image: url(/assets/450-logo-rus.svg);     filter: brightness(0) invert(1); }

.case-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem;
  & span { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #1f242d; color: var(--muted); }
  & span.accent { background: rgba(255,92,57,0.12); color: var(--accent); }
  & span.live { background: rgba(74,222,128,0.12); color: var(--ok); }
}

.case h2 { margin-bottom: 0.8rem; font-family: var(--font-GreatVibes); font-weight: 100; letter-spacing: 0.05em; }

.case-list { list-style: none; margin-bottom: 1.5rem;
  & li { position: relative; padding-left: 1.4rem; margin-bottom: 0.4rem; font-size: 0.95rem; color: #cfd3da;
    &::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  }
}
.case-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

@media (max-width: 920px) {
  .case-page > .btn:first-child {width: 100%; text-align: center;}
  .case-page .eyebrow {text-align: center;border-bottom: 1px solid var(--accent);padding-bottom: .5em; display: block;}
  .case-page .eyebrow::before {display: none;}
  .case-page .hero h1 {text-align: center;font-size: 300%;text-shadow: none;opacity: 1;}
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn { padding: 0.7rem 1.3rem; border-radius: 10px; font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: 0.2s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff;
  &:hover {background: #ff7050; }
}
.btn-ghost { color: var(--text); border: 1px solid var(--border);
  &:hover { border-color: var(--accent); color: var(--accent); }
}

.contacts-actions {display: flex; gap: 1em; flex-wrap: wrap; margin-top: 1.5rem;}
/* ============================================
   СТРАНИЦА КЕЙСА
   ============================================ */
.case-page {
  & .back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 2rem; transition: 0.2s;
    &:hover { color: var(--accent); }
  }

  /*& h1 { font-family: var(--font-GreatVibes); font-weight: 200; font-size: clamp(1.8rem, 4vw, 3.5rem); letter-spacing: 0.03em; margin-bottom: 1rem; text-align: center; text-shadow: none; opacity: 1; }*/
  & h1 {font-weight: 200; font-size: clamp(1.8rem, 4vw, 4rem); letter-spacing: 0.03em;text-align: left;margin-bottom: 0;}

  & .lead { color: var(--muted); font-size: 1.15rem; margin: 2rem 0; }

  & h2 { position: relative; font-size: 2.4rem; margin: 2.5rem 0 1rem; letter-spacing: 0.02em; font-family: var(--font-GreatVibes); font-weight: 200;
    &::after { content: ""; position: absolute; left: 0; bottom: 5px; width: 30%; max-width: 100px; height: 1px; background: var(--accent); }
  }

  & h3 { font-size: 1.05rem; margin-bottom: 0.8rem; text-transform: none; letter-spacing: 0; color: var(--text); border-bottom: none; padding-bottom: 0; }

  & p { color: #cfd3da; margin-bottom: 1rem; }

  & ul { list-style: none; margin-bottom: 1.5rem;
    & li { position: relative; padding-left: 1.4rem; margin-bottom: 0.5rem; color: #cfd3da;
      &::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
    }
  }

  & .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }

  & .two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.5rem 0 2rem; }

  & .col { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem 1.5rem;
    & h3 { font-size: 1.05rem; margin-bottom: 0.8rem; }
    & ul { margin-bottom: 0;
      & li { font-size: 0.92rem; }
    }
  }

  & .col-tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(255,92,57,0.12); color: var(--accent); margin-bottom: 0.7rem;
    &.live { background: rgba(74,222,128,0.12); color: var(--ok); }
  }

  & .cta { margin-top: 3rem; padding: 2rem; background: var(--card); border: 1px solid var(--border); border-radius: 16px; text-align: center;
    & h3 { font-size: 1.3rem; margin-bottom: 0.6rem; border-bottom: none; padding-bottom: 0; }
    & p { color: var(--muted); margin-bottom: 1.3rem; }
  }

  & .cta-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
}

/* Факты */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.fact-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.fact-value { font-weight: 600; margin-top: 0.2rem; }

/* Две колонки */
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.5rem 0 2rem; }
.col { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem 1.5rem;
  & h3 { font-size: 1.05rem; margin-bottom: 0.8rem; }
  & ul { margin-bottom: 0;
    & li { font-size: 0.92rem; }
  }
}
.col-tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(255,92,57,0.12); color: var(--accent); margin-bottom: 0.7rem;
  &.live { background: rgba(74,222,128,0.12); color: var(--ok); }
}

/* Скриншоты */
.screens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0;
  & a { display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: 0.2s;
    &:hover { border-color: var(--accent); transform: translateY(-2px); }
    & img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
  }
}

/* CTA */
.cta { margin-top: 3rem; padding: 2rem; background: var(--card); border: 1px solid var(--border); border-radius: 16px; text-align: center;
  & h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
  & p { color: var(--muted); margin-bottom: 1.3rem; }
}
.cta-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   ФОРМА
   ============================================ */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.5rem 0 0;
  & .form-row { display: grid; gap: 0.4rem;
    & label { color: var(--muted); font-size: 0.9rem; }
    & input, & textarea { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 1rem; color: var(--text); font-family: inherit; font-size: 0.95rem; transition: 0.2s; box-sizing: border-box;
      &:focus { outline: none; border-color: var(--accent); }
    }
    & input { height: 44px; }
    & input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 30px var(--card) inset; -webkit-text-fill-color: var(--text); transition: background-color 5000s ease-in-out 0s; }
    & textarea { resize: vertical; min-height: 120px; }
  }
  & .form-row:nth-last-child(2) { grid-column: 1 / -1; }
  & button { grid-column: 1 / -1; justify-self: start; cursor: pointer; border: none; }
}

@media (max-width: 780px) { .contact-form { grid-template-columns: 1fr; } }

/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 780px) {
  .case { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0; }
  main { padding: 1.5rem 1.2rem 2rem; }
  .contacts-grid { grid-template-columns: 1fr; gap: 2rem; }
 
}

@media (max-width: 780px) {
  .two-cols,
  .case-page .two-cols,
  .case-page .screens,
  .contacts-grid { grid-template-columns: 1fr; }
   .btn.btn-primary {width: 100%;text-align: center;}
   
}

@media (max-width: 768px) {
  .header-inner { padding: 0.9rem 1.2rem; gap: 1rem; }
  .brand img { height: 56px; }

  .burger { display: block; }

  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: row; gap: 3.5rem; background: #1f242d; border-top: 2px solid var(--accent); border-bottom: 1px solid #6b75898f; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0.7rem 1.5rem 0.3rem; z-index: 45;
    & a { padding: 0.85rem 0; font-size: 1.3rem; border-bottom: 1px solid var(--border);
      &:last-child { border-bottom: none; }
      &::after { display: none; }
    }
  }

  .burger-toggle:checked ~ .main-nav { display: flex; }

  .case-actions { flex-direction: column; text-align: center; }

  .title-lift-link, .title-lift-expo { padding-right: 90px;
    &::after { width: 80px; height: 34px; }
  }
}

@media (max-width: 780px) {
  .brand img { height: 48px; }
  .footer-inner {align-items: flex-start; gap: 1rem; flex-direction: column; align-items: center;}
  .footer-copy span { font-size: 1.15rem; }
  .footer-contacts { gap: 1rem; }
}


.collage { width: 100%;  height: 730px;  display: grid;  grid-template-columns: repeat(6, 1fr);  grid-template-rows: repeat(12, 1fr);  gap: 3px;  max-width: 1560px;  margin: 1.5rem auto;}
  .collage-item {  background-size: cover;  background-position: top center;  border-radius: 0px;  border: 1px solid var(--border);}


.collage-item:nth-child(1) { grid-area: 1 / 1 / 7 / 3; }
.collage-item:nth-child(2) { grid-area: 7 / 1 / 13 / 3; }
.collage-item:nth-child(3) { grid-area: 1 / 3 / 5 / 5; }
.collage-item:nth-child(4) { grid-area: 5 / 3 / 9 / 5; }
.collage-item:nth-child(5) { grid-area: 9 / 3 / 13 / 5; }
.collage-item:nth-child(6) { grid-area: 1 / 5 / 4 / 5; }
.collage-item:nth-child(7) { grid-area: 4 / 5 / 7 / 5; }
.collage-item:nth-child(8) { grid-area: 1 / 6 / 7 / 7; }
.collage-item:nth-child(9) { grid-area: 7 / 5 / 13 / 7; }

.collage-item {transition: transform 0.25s, box-shadow 0.25s;
    &:hover {transform: translateY(-3px);  box-shadow: 0 0 0 1px var(--accent); }
}

@media (max-width: 1100px) {
  .collage {    height: auto;    grid-template-columns: repeat(3, 1fr);    grid-template-rows: auto;  }
  .collage-item {    aspect-ratio: 4 / 3;    grid-area: auto !important;     border-radius: 8px;  }
}

@media (max-width: 1080px) {
  .collage {    grid-template-columns: repeat(2, 1fr); gap:1rem }
  .collage-item {    aspect-ratio: 16 / 10;      border-radius: 12px; 
  }
}

@media (max-width: 780px) {  
  .collage {    grid-template-columns: 1fr;  }
  .collage-item {    aspect-ratio: 16 / 10;      border-radius: 12px;   }
}

.firmstyle-link {background: none; border: none; border-bottom: 1px dashed var(--accent); padding: 0; margin: 0; font: inherit; color: var(--text); cursor: pointer; transition: 0.2s;}
.firmstyle-link:hover {color: var(--accent);}

/* Поповер */
[popover] {position: fixed; inset: 0; margin: auto; padding: 2rem; max-width: 600px; max-height: 90vh; width: 90%; background: var(--card); border: 1px solid var(--border); border-radius: 16px; color: var(--text); overflow-y: auto;}
[popover]::backdrop {background: rgba(15, 17, 21, 0.8); backdrop-filter: blur(4px);}
[popover] h3 {font-family: var(--font-GreatVibes); font-weight: 200; font-size: 2rem; margin-bottom: 1.5rem;}
.popover-close {position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; transition: 0.2s;}
.popover-close:hover {color: var(--accent);}
@media (max-width: 780px) {
  [popover] {width: calc(100% - 2rem); max-width: calc(100% - 2rem); height: fit-content; max-height: calc(100vh - 2rem); border-radius: 16px; border: 1px solid var(--border); padding: 1.5rem;}
}