/* Kurben — landing, dark / Tiffany accent */
:root {
  --bg-deep: #050506;
  --bg: #0a0a0c;
  --bg-elevated: #111114;
  --bg-card: #131316;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

main {
  min-width: 0;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: #5eead4;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

/* Grain overlay */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(5, 5, 6, 0.88);
}

.header-inner {
  width: min(1200px, calc(100% - 40px));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  min-width: 0;
  flex-shrink: 1;
}

.logo-mark {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(140px, 28vw);
  object-fit: contain;
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

/* Мобильный хедер: только марка логотипа, компактные иконки — без налезания на логотип */
@media (max-width: 959px) {
  .header-inner {
    gap: 10px;
  }

  .logo {
    flex: 0 1 auto;
    overflow: hidden;
    gap: 0;
  }

  .logo-text {
    display: none;
  }

  .logo-mark {
    max-width: 32px;
  }

  .header-actions {
    align-items: center;
    margin-left: auto;
    gap: 8px;
  }

  .quick-links {
    gap: 2px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .icon-btn--max svg {
    width: 17px;
    height: 17px;
  }

  .header-actions > .btn.btn-primary {
    flex: 0 0 auto;
    align-self: center;
    height: auto;
    min-height: 0;
    max-height: none;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.8125rem;
    line-height: 1.25;
  }
}

@media (max-width: 380px) {
  .header-inner {
    width: min(1200px, 100% - 24px);
    gap: 6px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions > .btn.btn-primary {
    font-size: 0.75rem;
    padding: 7px 8px;
  }
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}




.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent);
  background: var(--accent-dim);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn--max svg {
  width: 18.5px;
  height: 18.5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 100%);
  color: #042f2e;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.3), 0 8px 32px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.5), 0 12px 40px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

@media (min-width: 960px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* Mobile nav */
.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 999;
  background: rgba(5, 5, 6, 0.98);
  backdrop-filter: blur(12px);
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-mobile a:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.nav-mobile .btn-primary {
  margin-top: 8px;
  text-align: center;
}

body.nav-open {
  overflow: hidden;
}

/* Hero */
main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  padding: 72px 0 48px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.15), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(20, 184, 166, 0.08), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-main {
  display: grid;
  gap: 28px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

@media (min-width: 900px) {
  .hero-main {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 40px 52px;
    align-items: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(45, 212, 191, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 20em;
}

@media (min-width: 900px) {
  .hero h1 {
    max-width: none;
  }
}

.hero-lead {
  margin: 0 0 24px;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 38em;
  line-height: 1.55;
}

@media (min-width: 900px) {
  .hero-lead {
    max-width: none;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-promo-card {
  margin: 0;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, rgba(45, 212, 191, 0.07) 0%, var(--bg-card) 42%, var(--bg-elevated) 100%);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.06) inset,
    0 24px 56px rgba(0, 0, 0, 0.4);
}

.hero-promo-card__label {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

.hero-promo-card__headline {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.hero-promo-card__text {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.58;
  color: var(--text-muted);
}

.hero-promo-card__text--last {
  margin-bottom: 0;
}

.hero-promo__price {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-code {
  margin-top: 56px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.hero-code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.hero-code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3f3f46;
}

.hero-code-dot:nth-child(1) {
  background: #ef4444;
}

.hero-code-dot:nth-child(2) {
  background: #eab308;
}

.hero-code-dot:nth-child(3) {
  background: #22c55e;
}

.hero-code-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.hero-code-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-muted);
  overflow-x: auto;
  max-width: 100%;
}

.hero-code-body .kw {
  color: #c084fc;
}

.hero-code-body .fn {
  color: var(--accent);
}

.hero-code-body .str {
  color: #86efac;
}

.hero-code-body .cmt {
  color: var(--text-dim);
}

/* Ходовые кейсы (сразу после hero) */
.section--hot {
  background:
    radial-gradient(ellipse 85% 55% at 100% -10%, rgba(45, 212, 191, 0.11), transparent 52%),
    radial-gradient(ellipse 45% 50% at 0% 110%, rgba(20, 184, 166, 0.07), transparent 48%),
    var(--bg);
}

.hot-head {
  margin-bottom: 40px;
  max-width: 760px;
}

.hot-head .section-label {
  margin-bottom: 10px;
}

.section--hot .hot-head h2 {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hot-sub {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.hot-scream {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82em;
}

.hot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hot-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--bg-deep);
  background: linear-gradient(125deg, #99f6e4, var(--accent) 45%, #0d9488);
  border: 1px solid rgba(45, 212, 191, 0.55);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.hot-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .hot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .hot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.hot-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(168deg, rgba(45, 212, 191, 0.07) 0%, var(--bg-card) 38%, var(--bg-elevated) 100%);
  padding: 22px 22px 24px;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.04) inset;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hot-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--accent), rgba(20, 184, 166, 0.65));
  opacity: 0.9;
}

.hot-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(45, 212, 191, 0.06);
}

.hot-card__num {
  display: block;
  margin: 0 0 10px 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hot-card h3 {
  margin: 0 0 10px;
  padding-left: 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
}

.hot-card p {
  margin: 0;
  padding-left: 6px;
  font-size: 0.9375rem;
  line-height: 1.58;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .hot-card {
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .hot-card:hover {
    transform: none;
  }
}

/* Sections */
.section {
  padding: 88px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 48px;
  max-width: 640px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* About */
.about-text {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 720px;
  line-height: 1.75;
}

.about-text p {
  margin: 0 0 1em;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-bullets {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.about-bullets li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: 0.4em;
}

.about-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.about-bullets li:last-child {
  margin-bottom: 0;
}

/* Services grid */
.services-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 28px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  border-color: rgba(45, 212, 191, 0.25);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.08);
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-card > p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.service-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}

/* Process */
.process-track {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .process-track {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }
}

.process-step {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 20px 18px;
  text-align: center;
}

.process-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.process-step strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.process-step span {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

@media (min-width: 900px) {
  .process-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.75rem;
    z-index: 1;
  }
}

/* Portfolio */
.portfolio-block {
  margin-bottom: 64px;
}

.portfolio-block:last-child {
  margin-bottom: 0;
}

.portfolio-block h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.portfolio-block .sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.web-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .web-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.web-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s;
}

.web-card:hover {
  border-color: rgba(45, 212, 191, 0.3);
}

.web-card__link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.web-card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.web-card-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.web-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-18,
.badge-vpn {
  position: absolute;
  top: clamp(8px, 2vw, 12px);
  right: clamp(8px, 2vw, 12px);
  padding: clamp(5px, 1.2vw, 7px) clamp(10px, 2.8vw, 14px);
  border-radius: clamp(6px, 1vw, 8px);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 2.1vw, 0.8125rem);
  font-weight: 700;
  line-height: 1.2;
  z-index: 2;
}

.badge-18 {
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
}

.badge-vpn {
  background: rgba(13, 116, 110, 0.95);
  color: #ecfdf5;
  border: 1px solid rgba(45, 212, 191, 0.45);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.badge-vpn--start {
  right: auto;
  left: clamp(8px, 2vw, 12px);
}

.web-card-body {
  position: relative;
  z-index: 0;
  padding: 18px 20px;
}

.web-card-title {
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.web-card:hover .web-card-title {
  color: var(--accent);
}

.web-card-title svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.project-detail {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 32px;
  margin-top: 24px;
}

.project-detail h4 {
  margin: 24px 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.project-detail h4:first-of-type {
  margin-top: 0;
}

.project-detail p,
.project-detail li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.project-detail ul {
  margin: 0;
  padding-left: 1.2em;
}

.project-detail .task-list {
  list-style: none;
  padding: 0;
}

.project-detail .task-list li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}

.project-detail .task-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-detail code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
}

.project-gallery {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 600px) {
  .project-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.project-gallery img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Portfolio: zoom hint только для галерей проектов (превью сайтов — клик по карточке) */
#portfolio .project-gallery img {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.portfolio-lightbox[hidden] {
  display: none !important;
}

.portfolio-lightbox:not([hidden]) {
  display: flex;
}

.portfolio-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
}

.portfolio-lightbox__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  right: max(12px, env(safe-area-inset-right, 12px));
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(17, 17, 20, 0.95);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.portfolio-lightbox__close:hover {
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--accent);
  background: var(--bg-card);
}

.portfolio-lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.portfolio-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 24px);
  max-height: min(100dvh - 24px, 100vh - 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.portfolio-lightbox__img {
  max-width: 100%;
  max-height: min(calc(100dvh - 88px), calc(100vh - 88px));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  pointer-events: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

@media (max-width: 480px) {
  .portfolio-lightbox__close {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .portfolio-lightbox__img {
    max-height: min(calc(100dvh - 96px), calc(100vh - 96px));
  }
}

.pre-arch {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #0c0c0e;
  border: 1px solid var(--border);
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}

/* Reviews */
.reviews-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.review-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.review-avatar.placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
}

.review-meta strong {
  display: block;
  font-size: 0.9375rem;
}

.review-meta span {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.review-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Advantages */
.adv-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 600px) {
  .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .adv-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.adv-item {
  padding: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.adv-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.adv-item span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Approach */
.approach-list {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.approach-list div {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.06);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Stack */
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.stack-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stack-pill svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 40px;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 500;
}

.contact-link:hover {
  border-color: rgba(45, 212, 191, 0.35);
  color: var(--accent);
}

.contact-link svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.contact-link__icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent);
  background-color: currentColor;
}

.contact-link__icon--email {
  -webkit-mask: url("../icons/email.svg") center / contain no-repeat;
  mask: url("../icons/email.svg") center / contain no-repeat;
}

.contact-link__icon--max {
  -webkit-mask: url("../icons/Max_logo.svg") center / contain no-repeat;
  mask: url("../icons/Max_logo.svg") center / contain no-repeat;
}

.contact-link__icon--vk {
  -webkit-mask: url("../icons/vk.svg") center / contain no-repeat;
  mask: url("../icons/vk.svg") center / contain no-repeat;
}

.contact-link__icon--whatsapp {
  -webkit-mask: url("../icons/whatsapp.svg") center / contain no-repeat;
  mask: url("../icons/whatsapp.svg") center / contain no-repeat;
}

.contact-link__icon--call {
  -webkit-mask: url("../icons/call.svg") center / contain no-repeat;
  mask: url("../icons/call.svg") center / contain no-repeat;
}

.contact-form {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: clamp(18px, 4vw, 28px);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.5);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group--captcha {
  margin-bottom: 20px;
}

.form-group__label-recaptcha {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* reCAPTCHA: не обрезать iframe (раньше мешали overflow:hidden и крошечный min-height) */
.contact-form__captcha-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 20px 16px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.contact-form .contact-form__submit {
  width: 100%;
  margin-top: 4px;
}

.form-status {
  margin-top: 14px;
  font-size: 0.875rem;
  min-height: 1.4em;
}

.form-status.ok {
  color: var(--accent);
}

.form-status.err {
  color: #f87171;
}

/* Согласие с политикой: без flex — чекбокс слева, текст нормальным абзацем */
.form-group--privacy {
  margin-bottom: 20px;
  max-width: 100%;
}

.form-checkbox-row {
  position: relative;
  padding-left: 32px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Специфичнее .form-group input { width:100% }, иначе чекбокс тянется на всю строку и перехватывает клики по ссылке */
.form-group--privacy .form-checkbox__input {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.form-checkbox__text {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.form-group--privacy .form-checkbox__label {
  display: inline;
  margin-bottom: 0;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.form-checkbox__link {
  display: inline;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.45);
  text-underline-offset: 3px;
  cursor: pointer;
}

.form-checkbox__link:hover {
  color: #5eead4;
  text-decoration-color: rgba(45, 212, 191, 0.75);
}

/* Модальное окно: политика конфиденциальности */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.legal-modal[hidden] {
  display: none !important;
}

.legal-modal:not([hidden]) {
  display: flex;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(45, 212, 191, 0.12);
}

.legal-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.legal-modal__title {
  margin: 0;
  font-size: clamp(1.125rem, 3vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  padding-right: 8px;
}

.legal-modal__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -8px -10px 0 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.legal-modal__close:hover {
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--accent);
  background: var(--accent-dim);
}

.legal-modal__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.legal-modal__body {
  padding: 18px 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-modal__body a {
  color: var(--accent);
}

.legal-modal__lead {
  margin: 0 0 1.25em;
}

.legal-modal__h {
  margin: 1.25em 0 0.5em;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.legal-modal__h:first-of-type {
  margin-top: 0;
}

.legal-modal__body p {
  margin: 0 0 0.85em;
}

.legal-modal__list {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal-modal__list li {
  margin-bottom: 0.35em;
}

@media (max-width: 480px) {
  .legal-modal__header {
    padding: 16px 16px 14px;
  }

  .legal-modal__body {
    padding: 14px 16px 20px;
    font-size: 0.875rem;
  }

  .legal-modal__dialog {
    max-height: min(88vh, 100dvh - 32px);
  }
}

body.privacy-modal-open {
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-width: 100%;
}

.site-footer a {
  color: var(--text-muted);
}
