/* ═══════════════════════════════════════════════
   camarik — portfolio landing
   Editorial · flat · near-black + mint
   Референс: айдентика IT-компании (Behance)
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0c0c;
  --surface: #161817;
  --mint: #33f5b8;
  --green: #1abc79;
  --green-deep: #128559;
  --green-dark: #0a3b2e;
  --text: #fefefe;
  --muted: #9aa3a1;
  --line: rgba(254, 254, 254, 0.14);
  --white-card: #e9eaea;
  --grad: linear-gradient(92deg, #33f5b8 0%, #1abc79 55%, #128559 100%);
  --font: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1200px, 92%); margin: 0 auto; }

::selection { background: rgba(51, 245, 184, 0.35); }

a { color: inherit; }

/* ─────────── фирменный лейбл в скобках ─────────── */
.label {
  color: var(--mint);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.label-dark { color: var(--green-deep); }

/* ─────────── шапка ─────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  transition: background 0.25s, padding 0.25s;
}

.header.scrolled {
  background: rgba(10, 12, 12, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo-dot { color: var(--mint); }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav > a:not(.pill-nav) {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
  transition: color 0.2s;
}

.nav > a:not(.pill-nav):hover { color: var(--mint); }

/* ─────────── пиллюли-кнопки ─────────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
}

.pill:hover { border-color: var(--mint); color: var(--mint); }

.pill-nav { padding: 9px 22px; font-size: 15px; }

.pill-solid {
  background: var(--mint);
  border-color: var(--mint);
  color: #0a0c0c;
  padding: 15px 34px;
  font-size: 17px;
}

.pill-solid:hover { background: var(--text); border-color: var(--text); color: #0a0c0c; }

.pill-ghost { padding: 15px 34px; font-size: 17px; }

.pill-dark {
  background: #0a0c0c;
  border-color: #0a0c0c;
  color: var(--white-card);
  padding: 16px 38px;
  font-size: 17px;
}

.pill-dark:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white-card); }

/* ─────────── бургер ─────────── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────── hero ─────────── */
.hero {
  padding: 170px 0 0;
}

.hero-title {
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 15ch;
  margin-bottom: 28px;
}

.hero-sub {
  max-width: 52ch;
  color: var(--muted);
  font-size: 19px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 72px;
}

/* гигантский мятно-зелёный болт */
.hero-stage {
  position: relative;
  width: min(1000px, 100%);
  margin: 0 auto;
}

.hero-bolt {
  display: block;
  width: 100%;
  height: auto;
}

.chip {
  position: absolute;
  background: #0a3b2e;
  color: var(--text);
  border: 1px solid rgba(254, 254, 254, 0.16);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 100px;
}

.chip-1 { top: 12%; left: 16%; }
.chip-2 { top: 38%; right: 12%; }
.chip-3 { bottom: 22%; left: 26%; }
.chip-4 { bottom: 8%; right: 30%; }

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
  padding: 28px 0 72px;
  color: var(--muted);
  font-size: 16px;
}

.facts li { display: flex; align-items: center; gap: 12px; }

.facts li::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--mint);
  flex-shrink: 0;
}

/* ─────────── бегущая строка ─────────── */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 30px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-right: 56px;
}

.marquee-group span {
  font-size: 34px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.m-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
  display: block;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ─────────── секции ─────────── */
.section { padding: 130px 0 0; }

.head-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: end;
}

.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 44ch;
  padding-bottom: 6px;
}

/* ─────────── проекты: редакционные строки ─────────── */
.works { margin-top: 64px; }

.work {
  display: grid;
  grid-template-columns: 280px 1.1fr 1fr;
  gap: 40px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}

.work:hover .work-title { color: var(--mint); }

.work-visual {
  display: flex;
  flex-direction: column;
  align-self: start;
  background: #ff7f50;
  border-radius: 20px;
  padding: 18px 18px 12px;
  text-decoration: none;
  transition: transform 0.3s;
}

.work:nth-child(odd) .work-visual { transform: rotate(-2deg); }
.work:nth-child(even) .work-visual { transform: rotate(1.6deg); }

.work .work-visual:hover { transform: rotate(0deg) scale(1.03); }

.work-visual img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.work-visual.vt img { object-position: top; }

.work-cap {
  color: #0a0c0c;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 4px 2px;
}

.work-left { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.flag {
  background: #0a3b2e;
  color: var(--text);
  border: 1px solid rgba(254, 254, 254, 0.16);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mint);
  font-size: 14px;
  font-weight: 500;
}

.live i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.work-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.15;
  transition: color 0.2s;
}

.work-tags {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.work-right { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }

.work-right p:first-child { color: var(--muted); font-size: 17px; }

.work-link {
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.work-link:hover { color: var(--mint); border-color: var(--mint); }

.work-note {
  font-size: 14px;
  color: var(--muted);
  opacity: 0.75;
}

/* ─────────── подход: сетка 2×2 ─────────── */
.tiles {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px 64px;
}

.tile-ico {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  background: var(--mint);
  color: #0a0c0c;
  margin-bottom: 22px;
}

.tile-ico svg { width: 20px; height: 20px; }

.tile h3 {
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 12px;
}

.tile p { color: var(--muted); font-size: 17px; max-width: 44ch; }

/* ─────────── процесс: горизонтальный степпер ─────────── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 64px;
}

.step-label {
  color: var(--mint);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}

.step p { color: var(--muted); font-size: 16px; }

.step-bar {
  height: 4px;
  background: var(--grad);
  margin-top: 56px;
}

/* ─────────── контакт: белая инверсия ─────────── */
.cta-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  padding-bottom: 130px;
}

.cta-panel {
  border-radius: 24px;
  background: var(--grad);
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.panel-bolt { width: 70%; height: auto; }

.cta-card {
  background: var(--white-card);
  color: #0a0c0c;
  border-radius: 24px;
  padding: clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.cta-card h2 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
}

.cta-card p { font-size: 18px; max-width: 46ch; color: #3c4240; }

/* ─────────── футер ─────────── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-grid .label { margin-bottom: 16px; }

.footer-grid a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-grid a:hover { color: var(--mint); }

.footer-note { color: var(--muted); font-size: 16px; margin-bottom: 8px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ─────────── reveal ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.works .reveal:nth-child(2),
.tiles .reveal:nth-child(2),
.steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.works .reveal:nth-child(3),
.tiles .reveal:nth-child(3),
.steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.works .reveal:nth-child(4),
.tiles .reveal:nth-child(4),
.steps .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ─────────── адаптив ─────────── */
@media (max-width: 960px) {
  .head-grid { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .work { grid-template-columns: 1fr; gap: 22px; padding: 40px 0; }
  .work-visual img { height: 200px; }
  .tiles { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .cta-wrap { grid-template-columns: 1fr; padding-bottom: 96px; }
  .cta-panel { min-height: 220px; }
  .section { padding: 96px 0 0; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 32px;
    gap: 28px;
    background: var(--bg);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav.open { transform: translateX(0); }
  .nav > a:not(.pill-nav) { font-size: 19px; }
  .burger { display: flex; z-index: 110; position: relative; }

  body { font-size: 16px; }
  .hero { padding-top: 120px; }
  .hero-actions .pill { width: 100%; }
  .facts { gap: 10px 24px; }
  .marquee-group span { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
  .chip { font-size: 13px; padding: 7px 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
