:root {
    --bg-main: #f8fafc;        /* основной фон сайта */
    --bg-section: #ffffff;    /* фон карточек / блоков */
    --bg-soft: #f1f5f9;       /* альтернативный фон секций */
  
    --text-color: #0f172a;    /* основной текст */
    --text-muted: #475569;    /* вторичный текст */
  
    --accent: #2563eb;        /* основной акцент (синий) */
    --nav-height: 72px;
    --nav-bg: transparent;
    --nav-bg-scrolled: rgba(255,255,255,0.9);
    --nav-border: transparent;
  }

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

html {
  scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    color: var(--text-color);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
  }

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 96px 24px;
  }
  
  .section.light {
    background: var(--bg-main);
  }
  
  .section.white {
    background: var(--bg-section);
  }
  
  .section.soft {
    background: var(--bg-soft);
  }

  h1, h2, h3 {
    color: #020617;
  }
  
  p {
    color: var(--text-muted);
  }

/* ================= HEADER ================= */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
  
    height: 72px; /* ← ВАЖНО */
    background: var(--nav-bg);
    backdrop-filter: none;
    border-bottom: 1px solid var(--nav-border);
  
    transition: background 0.4s ease, border 0.4s ease;
}

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

.nav-logo img {
    height: 32px;
    transform: scale(2.0);
    width: auto;
    transform-origin: left center;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  .nav-logo:hover img {
    transform: scale(1.35);
    opacity: 0.9;
  }

nav a {
    margin-left: 20px;
    font-size: 0.95rem;
}

.nav-menu {
    display: flex;
    gap: 28px;
  }
  
  .nav-menu a {
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
  
    transition: color 0.3s ease;
  }

  .navbar.scrolled {
    background: var(--nav-bg-scrolled);
    border-bottom: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
  }

  .nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
  }
  
  .nav-menu a:hover {
    color: var(--accent);
  }
  
  .nav-menu a:hover::after {
    width: 100%;
    box-shadow: 0 0 8px rgba(79, 124, 255, 0.6);
  }

/* ================= HERO ================= */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh; /* ВСЯ ВЫСОТА ЭКРАНА */
    background: var(--bg-main);
    overflow: hidden;
    padding-top: var(--nav-height);
  
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  
  .hero-content {
    max-width: 1100px;
    margin-left: 290px; /* регулируешь смещение */
    text-align: left;
    z-index: 2;
  
    animation: fadeHero 0.8s ease forwards;
    opacity: 0;
  }


@keyframes fadeHero {
  to {
    opacity: 1;
  }
}

  .hero h1 {
    font-size: clamp(2.6rem, 4vw, 3.8rem);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 520px;
    color: #0f172a; /* глубокий тёмно-синий */
  
  }
  
  .hero p {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    max-width: 720px;
    margin: 0 0 40px 0;
    color: var(--text-muted);
    max-width: 520px;
  }

  .hero h1 span {
    color: var(--accent);
  }

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    max-width: 520px;
}

.btn {
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
  }
  
  .btn.primary {
    background: var(--accent);
    color: #fff;
  }
  
  .btn.secondary {
    border: 1px solid #cbd5f5;
    color: #1e3a8a;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
  
    background:
      linear-gradient(
        180deg,
        rgba(248,250,252,0.80) 0%,
        rgba(248,250,252,0.60) 40%,
        rgba(248,250,252,1) 100%
      ),
      url("assets/images/hero-bg.webp");
  
    background-size: cover;
    background-position: center;
  }

/* ================= ABOUT ================= */
.about {
  background: #ffffff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 {
  margin-bottom: 20px;
}

.about-lead {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 18px;
  color: var(--text-main);
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Cards */
.about-cards {
  display: grid;
  gap: 20px;
}

.about-card {
  padding: 22px 26px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.about-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}  

.about-icon {
  margin-bottom: 12px;
}

.about-icon img {
  width: 28px;
  height: 28px;
  opacity: 0.8;
}

/* ================= SECTIONS ================= */
.section {
    padding: 80px 0;
}

.section.light {
    background: #f9fafb;
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

/* ================= SERVICES ================= */
.services {
  background: #f8fafc;
}

.section-subtitle {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ← 4 карточки в ряд */
  gap: 32px;
}

/* Card */
.service-card {
  background: #ffffff;
  padding: 32px 26px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  text-align: center; /* ← центрируем текст и иконку */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

/* Icon */
.service-icon {
  font-size: 1.8rem;
  line-height: 1;
}

/* Text */
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

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


.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* контейнер иконки */
.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

/* сама иконка */
.service-icon img {
  width: 48px;
  height: 48px;
  opacity: 0.9;
}

/* Tablet */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= PROJECTS ================= */

.projects {
  background: #ffffff;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}


.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-image {
  height: 180px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.project-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================= CONTACT ================= */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}

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

.contact-info h3 {
  margin-bottom: 12px;
}

.contact-info p {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-message {
  font-size: 0.9rem;
  margin-top: 10px;
  color: green;
}

/* ================= FORM ALERT ================= */

.form-alert {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: none;
  transition: all 0.3s ease;
}

.form-alert.success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.form-alert.error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #7f1d1d;
}

.form-alert.show {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= FOOTER ================= */

.footer {
  background: #0b1120;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 16px 0;
  margin-top: 80px;
  text-align: center;
}

.footer-bottom {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer a {
  color: #93c5fd;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ================= MOBILE / RESPONSIVE ================= */
:root{
  /* чтобы якоря не прятались под фикс-навбар */
  scroll-padding-top: var(--nav-height, 72px);
}

/* ---------- <= 1024px (tablet) ---------- */
@media (max-width: 1024px) {

  .nav-container{
    padding: 12px 18px;
  }

  /* HERO */
  .hero{
    justify-content: flex-start;
  }

  .hero-content{
    max-width: 900px;
    padding-left: 48px;
    padding-right: 18px;
  }

  .hero h1{
    max-width: 560px;
  }

  .hero p{
    max-width: 560px;
  }

  /* SERVICES: 2 колонки */
  .services-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  /* PROJECTS: 2 колонки */
  .projects-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

/* ---------- <= 768px (mobile) ---------- */
@media (max-width: 768px) {

  /* NAVBAR */
  .nav-container{
    max-width: 100%;
    padding: 10px 14px;
  }

  .nav-logo img{
    height: 30px; /* компактнее логотип на мобиле */
  }

  /* Если меню в одну строку не помещается — делаем перенос/уменьшаем */
  .nav-menu{
    gap: 14px;
  }

  .nav-menu a{
    font-size: 14px;
    letter-spacing: 0.2px;
  }

  /* HERO */
  .hero{
    min-height: 100vh;
    padding-top: var(--nav-height, 72px);
    align-items: center;
    justify-content: center;
  }

  .hero-content{
    margin: 0 auto;
    padding-left: 16px;   /* ключевой момент: убираем “desktop” отступ */
    padding-right: 16px;
    max-width: 100%;
  }

  .hero h1{
    font-size: clamp(2rem, 7vw, 2.6rem);
    max-width: 100%;
  }

  .hero p{
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-buttons{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
  }

  .btn{
    width: 100%;
    text-align: center;
  }

  /* SERVICES: 1 колонка */
  .services-grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* PROJECTS: 1 колонка */
  .projects-grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Sections padding (если у тебя есть общий класс .section) */
  .section{
    padding: 64px 0;
  }

  .container{
    padding-left: 16px;
    padding-right: 16px;
  }

  /* FOOTER */
  .footer{
    padding: 16px 0;
  }

  .footer-bottom{
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 14px;
  }
}

/* ---------- <= 420px (small phones) ---------- */
@media (max-width: 420px) {

  .nav-logo img{
    height: 28px;
  }

  .nav-menu{
    gap: 10px;
  }

  .nav-menu a{
    font-size: 13px;
  }

  .hero h1{
    font-size: 2rem;
  }

  .btn{
    padding: 12px 18px;
  }
}

/* ===== Burger (3 spans) ===== */
.nav-toggle{
  display:none;
  width:44px;
  height:44px;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(10px);
  border-radius:12px;
  cursor:pointer;
  padding:0;
  position:relative;
  z-index: 2000;
  appearance:none;
  -webkit-appearance:none;
}

/* линии */
.nav-toggle span{
  position:absolute;
  left:11px;
  right:11px;
  height:2px;
  background:#0f172a;
  border-radius:2px;
  transition: transform .25s ease, top .25s ease, opacity .2s ease;
}

/* 3 разные позиции */
.nav-toggle span:nth-child(1){ top:14px; }
.nav-toggle span:nth-child(2){ top:21px; }
.nav-toggle span:nth-child(3){ top:28px; }

/* Mobile show */
@media (max-width: 768px){
  .nav-toggle{ display:inline-block; }
}

/* крестик, когда меню открыто */
body.nav-open .nav-toggle span:nth-child(1){
  top:21px;
  transform: rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2){
  opacity:0;
}
body.nav-open .nav-toggle span:nth-child(3){
  top:21px;
  transform: rotate(-45deg);
}

@media (max-width: 768px){
  .nav-menu{
    display:none;
  }
  body.nav-open .nav-menu{
    display:flex;
    flex-direction:column;
    gap:14px;
    position:absolute;
    top:100%;
    right:14px;
    left:14px;
    padding:16px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(0,0,0,.08);
    border-radius:16px;
    backdrop-filter: blur(10px);
  }
}