/* ============================================================
   AlekLabs 3D — лендинг
   Токены: слайсер-вьюпорт в светлой теме, голубой фон / зелёные акценты / жёлтый филамент
   ============================================================ */

:root {
  --bg: #EAF4F6;          /* голубоватый светлый, фон вьюпорта */
  --surface: #FFFFFF;
  --ink: #0F2A2E;         /* тёмный сине-зелёный */
  --ink-2: #4A6663;
  --line: #CBDEE1;
  --accent: #FFD226;      /* филаментовый жёлтый */
  --accent-deep: #D9A400;
  --teal: #17857B;        /* зеленоватый — текстовые акценты */
  --sky: #7FC0E8;         /* голубой — мороз, детали */
  --dark: #0F2E2A;        /* тёмно-зелёный для тёмных секций */
  --dark-line: #26473F;

  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --container: 1180px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 860px; }

/* ---------- типографика ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
}

h1 em {
  font-style: normal;
  color: var(--teal);
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 40px;
}

h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.eyebrow span { color: var(--teal); }

.eyebrow-dark { color: #92ABA5; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 2px;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--accent-deep);
}

.btn-accent:hover { background: #FFDC4A; box-shadow: 0 3px 0 var(--accent-deep); }

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover { background: var(--surface); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn-lg { padding: 14px 28px; font-size: 1.02rem; }

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.brand-name em {
  font-style: normal;
  color: var(--teal);
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s;
}

.nav a:hover { color: var(--ink); }

.topbar-phone {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.topbar-phone:hover { color: var(--teal); }

.nav-phone { display: none; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero { padding: 72px 0 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-sub {
  margin: 22px 0 30px;
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.hero-stats {
  gap: 8px 0;
}

.hero-stats li {
  padding: 16px 18px 0 0;
  margin-right: 18px;
}

.hero-stats li:not(:last-child) { border-right: 1px solid var(--line); }

.hero-stats li:last-child { padding-right: 0; margin-right: 0; }

.hero-stats b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.hero-stats span {
  font-size: 0.82rem;
  color: var(--ink-2);
}

/* вьюпорт с сеткой стола */
.hero-visual {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px, 28px 28px, auto;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px 12px;
  position: relative;
}

.hero-visual-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-align: center;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.svg-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--ink-2);
}

/* анимация печати: деталь проявляется снизу вверх */
.part {
  clip-path: inset(100% 0 0 0);
  animation: print-part 2.4s cubic-bezier(0.3, 0, 0.4, 1) 0.4s forwards;
}

@keyframes print-part {
  to { clip-path: inset(0 0 0 0); }
}

.printhead {
  transform: translateY(402px);
  animation:
    print-head 2.4s cubic-bezier(0.3, 0, 0.4, 1) 0.4s forwards,
    head-out 0.5s ease 2.9s forwards;
}

@keyframes print-head {
  from { transform: translateY(402px); }
  to { transform: translateY(140px); }
}

@keyframes head-out { to { opacity: 0; } }

.dims {
  opacity: 0;
  animation: dims-in 0.7s ease 3s forwards;
}

@keyframes dims-in { to { opacity: 1; } }

/* ---------- бегущая строка ---------- */

.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  user-select: none;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
  min-width: 100%;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  animation: marquee 36s linear infinite;
}

.marquee-track i {
  font-style: normal;
  color: var(--teal);
  font-size: 0.5rem;
}

@keyframes marquee {
  to { transform: translateX(calc(-100% - 28px)); }
}

/* ---------- секции ---------- */

.section { padding: 88px 0; }

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-dark {
  background: var(--dark);
  color: #E6F0ED;
}

.section-dark h2 { color: #fff; }

/* ---------- боль ---------- */

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

.pain-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.pain-card h3 { margin-bottom: 10px; }

.pain-card p {
  font-size: 0.94rem;
  color: var(--ink-2);
}

.frost-note {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding: 26px 30px;
  background: var(--dark);
  color: #E6F0ED;
  border-radius: var(--radius);
}

.frost-note b { color: var(--accent); }

.frost-temp {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--sky);
  white-space: nowrap;
}

.frost-note p { max-width: 52em; }

/* ---------- работы ---------- */

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

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  transition: border-color 0.2s, transform 0.2s;
}

.work-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
}

.work-icon {
  width: 48px;
  height: 48px;
  color: var(--teal);
  margin-bottom: 18px;
}

.work-card h3 { margin-bottom: 8px; }

.work-card > p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

.work-spec {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
  color: var(--ink);
}

.works-note {
  margin-top: 32px;
  color: var(--ink-2);
}

.works-note a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- услуги ---------- */

.services-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 280px 1fr 130px;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.service-row p { color: var(--ink-2); font-size: 0.96rem; }

.service-price {
  text-align: right;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- материалы ---------- */

.table-wrap { overflow-x: auto; }

.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.materials-table th,
.materials-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dark-line);
  white-space: nowrap;
}

.materials-table td:nth-child(3),
.materials-table td:nth-child(4) { white-space: normal; }

.materials-table th {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #92ABA5;
}

.materials-table td:first-child {
  color: var(--accent);
  font-weight: 700;
}

.materials-note {
  margin-top: 26px;
  color: #92ABA5;
  font-size: 0.94rem;
  max-width: 46em;
}

/* ---------- процесс ---------- */

.process-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.process-step {
  border-top: 3px solid var(--accent);
  padding-top: 18px;
}

.step-num {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
}

.process-step h3 { margin-bottom: 8px; }

.process-step p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ---------- faq ---------- */

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child { border-top: 1px solid var(--line); }

.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  font-weight: 600;
  font-size: 1.02rem;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p {
  padding: 0 4px 22px;
  color: var(--ink-2);
  max-width: 60em;
}

/* ---------- финальный CTA ---------- */

.cta-final { padding-bottom: 96px; }

.cta-final-inner {
  background: var(--dark);
  color: #E6F0ED;
  border-radius: 14px;
  padding: clamp(36px, 6vw, 72px);
  background-image:
    linear-gradient(var(--dark-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--dark-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.cta-final h2 {
  color: #fff;
  margin-bottom: 32px;
  max-width: 22em;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin-top: 36px;
  font-size: 0.88rem;
  color: #92ABA5;
}

.contact-list a {
  color: #fff;
  text-decoration: none;
}

.contact-list a:hover { color: var(--accent); }

/* ---------- футер ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.footer-dim { color: #92ABA5; }

.footer-phone {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.footer-phone:hover { color: var(--teal); }

/* ---------- появление при скролле ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- адаптив ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 40px; }
  .pain-grid, .works-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .service-row { grid-template-columns: 1fr; gap: 8px; }
  .service-price { text-align: left; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .pain-grid, .works-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .frost-note { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-stats li { margin-right: 18px; padding-right: 18px; }

  .nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }

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

  .nav a {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .burger { display: flex; }
  .topbar-cta { display: none; }
  .topbar-phone { display: none; }

  .nav a.nav-phone {
    display: block;
    font-weight: 600;
    color: var(--teal);
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .part { animation: none; clip-path: none; }
  .printhead { animation: none; opacity: 0; }
  .dims { animation: none; opacity: 1; }
  .marquee-track { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn, .work-card { transition: none; }
}
