/* =========================================================================
   DevCore — дизайн-система в стилистике Apple.
   Крупная типографика, много воздуха, приглушённая палитра, мягкие тени,
   плавные reveal-анимации при скролле, стеклянная навигация.
   ========================================================================= */

:root {
  --bg: #ffffff;
  --bg-dim: #f5f5f7;
  --bg-dark: #000000;
  --bg-dark-2: #0a0a0c;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --text-on-dark: #f5f5f7;
  --text-on-dark-dim: #a1a1a6;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: #e8f2fd;
  --success: #2ea043;
  --danger: #ff3b30;
  --line: #d2d2d7;
  --line-dark: #29292c;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 980px;

  --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 20px 48px rgba(0, 0, 0, 0.12);

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

.section-pad { padding: 120px 0; }
@media (max-width: 734px) {
  .section-pad { padding: 72px 0; }
}

.eyebrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 12px;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0; }

.display-1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.display-2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.headline {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.2;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--text-dim);
  font-weight: 400;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-head p { margin-top: 16px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { text-decoration: underline; }

.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { box-shadow: var(--shadow-card-hover); }

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.2); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------------------------------------------------------------------
   Навигация
   --------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s var(--ease);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-mark {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0071e3, #6c5ce7);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}

.nav-links a { opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

.nav-cta { display: flex; align-items: center; gap: 16px; font-size: 12px; }

.nav-toggle { display: none; }

@media (max-width: 734px) {
  .nav-links { display: none; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 160px 24px 100px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 60%);
}

.hero-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
.hero-glow--1 {
  width: 560px; height: 560px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
}
.hero-glow--2 {
  width: 640px; height: 640px;
  bottom: -280px; right: -200px;
  background: radial-gradient(circle, #7dd3fc, transparent 70%);
}

.hero-content { position: relative; z-index: 1; max-width: 820px; }

.hero-content .display-1 { margin-bottom: 20px; }

.hero-content .lede {
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 64px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 14px;
}
.hero-badges strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------------
   Код-мокап (визуальный акцент вместо фотографий)
   --------------------------------------------------------------------- */

.code-window {
  margin-top: 72px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #1e1e24;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.28);
  text-align: left;
  position: relative;
  z-index: 1;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #26262e;
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot--red { background: #ff5f56; }
.code-dot--yellow { background: #ffbd2e; }
.code-dot--green { background: #27c93f; }
.code-window-title {
  margin-left: 10px;
  font-size: 13px;
  color: #8a8a92;
  font-family: var(--font-mono);
}

.code-window-body {
  padding: 24px 28px 32px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.code-window-body .ln { color: #5c5c66; display: inline-block; width: 26px; user-select: none; }
.tok-kw { color: #ff7ab2; }
.tok-fn { color: #82aaff; }
.tok-str { color: #c3e88d; }
.tok-com { color: #6c6c78; font-style: italic; }
.tok-num { color: #f78c6c; }
.tok-prop { color: #ffcb6b; }

/* ---------------------------------------------------------------------
   Логотипы клиентов / маркер доверия
   --------------------------------------------------------------------- */

.trustbar {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trustbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------
   Услуги — сетка карточек
   --------------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-dim);
  border-radius: var(--radius-l);
  padding: 40px 32px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.service-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--accent), #6c5ce7);
  color: #fff;
}
.service-icon svg { width: 26px; height: 26px; }

.service-card h3 { font-size: 20px; margin-bottom: 10px; }
.service-card p { color: var(--text-dim); font-size: 15px; line-height: 1.55; margin: 0; }

/* ---------------------------------------------------------------------
   Продукт-спотлайт (тёмная секция, как страницы товаров Apple)
   --------------------------------------------------------------------- */

.spotlight {
  background: radial-gradient(circle at 20% 20%, #14141a, var(--bg-dark) 55%);
  color: var(--text-on-dark);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .spotlight-grid { grid-template-columns: 1fr; gap: 40px; }
}

.spotlight-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-on-dark);
  margin-bottom: 20px;
}

.spotlight h2 { color: var(--text-on-dark); margin-bottom: 18px; }
.spotlight .lede { color: var(--text-on-dark-dim); margin-bottom: 32px; }

.spotlight-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.spotlight-list li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-on-dark-dim); font-size: 15px; line-height: 1.5;
}
.spotlight-list svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }

.spotlight-visual {
  border-radius: var(--radius-l);
  overflow: hidden;
  background: linear-gradient(155deg, #1c1c24, #0d0d12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px;
}

.mini-dash-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mini-dash-title { font-size: 13px; color: var(--text-on-dark-dim); }
.mini-dash-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 10px; }
.mini-dash-bar > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #6c5ce7); }
.mini-dash-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-s);
  padding: 16px;
  margin-bottom: 12px;
}
.mini-dash-card .num { font-size: 22px; font-weight: 700; color: #fff; }
.mini-dash-card .label { font-size: 12px; color: var(--text-on-dark-dim); margin-top: 2px; }
.mini-dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------------
   Магазин расширений
   --------------------------------------------------------------------- */

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 800px) { .store-grid { grid-template-columns: 1fr; } }

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 36px;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-4px); }

.product-badge {
  position: absolute;
  top: 24px; right: 24px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.product-card h3 { font-size: 24px; margin-bottom: 8px; }
.product-tagline { color: var(--text-dim); font-size: 15px; margin-bottom: 18px; line-height: 1.5; }
.product-desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }

.product-features { display: flex; flex-direction: column; gap: 9px; margin-bottom: 28px; }
.product-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--text);
}
.product-features svg { flex-shrink: 0; margin-top: 2px; color: var(--success); }

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price-block { display: flex; flex-direction: column; }
.price-old { font-size: 14px; color: var(--text-dim); text-decoration: line-through; }
.price-now { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.price-period { font-size: 12px; color: var(--text-dim); }

/* ---------------------------------------------------------------------
   Тарифы разработки
   --------------------------------------------------------------------- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card {
  border-radius: var(--radius-l);
  padding: 36px 32px;
  background: var(--bg-dim);
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}
.plan-card.highlighted {
  background: var(--text);
  color: #fff;
  transform: scale(1.03);
  box-shadow: var(--shadow-card-hover);
}
.plan-card.highlighted .plan-desc,
.plan-card.highlighted .plan-period { color: rgba(255,255,255,0.7); }
.plan-card.highlighted .plan-features li { color: rgba(255,255,255,0.9); }
.plan-card.highlighted .plan-features svg { color: #7dd3fc; }

.plan-name { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; margin-bottom: 14px; }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.plan-period { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.plan-desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.55; margin-bottom: 24px; }
.plan-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; flex: 1; }
.plan-features li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.plan-features svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* ---------------------------------------------------------------------
   Отзывы
   --------------------------------------------------------------------- */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--bg-dim);
  border-radius: var(--radius-l);
  padding: 32px;
}
.testimonial-quote { font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6c5ce7);
  flex-shrink: 0;
}
.testimonial-name { font-weight: 600; font-size: 14px; }
.testimonial-role { font-size: 13px; color: var(--text-dim); }

/* ---------------------------------------------------------------------
   Процесс работы
   --------------------------------------------------------------------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }

.process-step { position: relative; padding-top: 8px; }
.process-num {
  font-size: 44px;
  font-weight: 700;
  color: var(--line);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.process-step h3 { font-size: 17px; margin-bottom: 8px; }
.process-step p { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin: 0; }

/* ---------------------------------------------------------------------
   Контакты / финальный CTA
   --------------------------------------------------------------------- */

.cta-section {
  background: linear-gradient(160deg, #0071e3, #6c5ce7);
  color: #fff;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 16px; }
.cta-section .lede { color: rgba(255,255,255,0.85); margin-bottom: 40px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-field {
  padding: 14px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
  width: 100%;
}
.form-field:focus { outline: none; border-color: var(--accent); }
textarea.form-field { resize: vertical; min-height: 120px; }

.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-info h4 { font-size: 15px; margin-bottom: 4px; }
.contact-info p { font-size: 14.5px; color: var(--text-dim); margin: 0; }

.form-status { font-size: 14px; min-height: 20px; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }

/* ---------------------------------------------------------------------
   Футер
   --------------------------------------------------------------------- */

footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-dim);
  padding: 56px 0 32px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 24px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

.footer-col h5 { color: var(--text-on-dark); font-size: 13px; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------------
   Reveal-анимации при скролле.
   Работают ТОЛЬКО если сработал <html class="has-js"> (см. main.js) —
   если по какой-то причине JS не выполнился (сбой сети, блокировщик,
   старый браузер), контент остаётся полностью видимым по умолчанию,
   а не пропадает навсегда с opacity:0. Это осознанное решение для
   отказоустойчивости, а не просто эстетика.
   --------------------------------------------------------------------- */

.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.has-js .reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ---------------------------------------------------------------------
   Модальное окно оформления заказа
   --------------------------------------------------------------------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: #fff;
  border-radius: var(--radius-l);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  transform: scale(0.94) translateY(10px);
  transition: transform 0.25s var(--ease);
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  position: relative;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  font-size: 22px; color: var(--text-dim);
}

.modal h3 { font-size: 22px; margin-bottom: 6px; }
.modal p.modal-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }

/* Утилиты */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
