/* =========================
   CSS VARIABLES (THEME)
========================= */

:root {
  --color-bg: #ffffff;
  --color-text-primary: #1f1f1f;
  --color-text-secondary: #6f6f6f;

  /* Warm accent */
  --color-accent: #d6b98c;      /* тёплый беж / латунь */
  --color-accent-hover: #c4a874;

  --color-border: #e6e6e6;
  --color-bg-muted: #f7f7f7;

  --container-width: 1200px;
  --container-padding: 20px;

  --radius-sm: 6px;
  --radius-md: 10px;

  --transition: 0.2s ease;
}

/* =========================
   BASE RESET
========================= */

* {
  transition-property: color, background-color, border-color, box-shadow, transform;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
}

body.is-locked {
  overflow: hidden;
}

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

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

/* =========================
   CONTAINER
========================= */

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

/* =========================
   TYPOGRAPHY
========================= */

h1, h2, h3 {
  margin: 0 0 16px;
  font-weight: 500;
  line-height: 1.3;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 16px;
  color: var(--color-text-secondary);
}

.section-subtitle {
  max-width: 640px;
  margin-bottom: 40px;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition),
              color var(--transition),
              border-color var(--transition);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--color-accent);
  color: #000;
  box-shadow: 0 4px 12px rgba(214, 185, 140, 0.25);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 6px 18px rgba(214, 185, 140, 0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  border: 1px solid var(--color-border);
  color: var(--color-bg);
  background-color: transparent;
}

.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: rgba(214, 185, 140, 0.08);
}


/* =========================
   HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav__list {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__list a {
  font-size: 15px;
  color: var(--color-text-secondary);
  position: relative;
}

.nav__list a:hover {
  color: var(--color-text-primary);
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--transition);
}

.nav__list a:hover::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__phone {
  font-size: 15px;
  color: var(--color-text-primary);
}

.header__phone {
  padding: 8px 12px;
}


.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform var(--transition);
  transition: transform 0.25s ease;
  z-index: 200;
}

.mobile-menu.is-open {
  transform: translateY(0);
}

.mobile-menu.is-open .mobile-nav a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-nav a {
  font-size: 20px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Burger (mobile) */

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

.burger span {
  width: 22px;
  height: 2px;
  background-color: var(--color-text-primary);
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;

  /* HERO BACKGROUND */
  background-image: url("img/forma_home_renovation.webp");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 30%,
    rgba(0, 0, 0, 0.1) 60%,
    rgba(0, 0, 0, 0) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero h1 {
  color: #ffffff;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

/* =========================
   SERVICES
========================= */

.services {
  padding: 80px 0;
}

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

.service-card {
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
}

.service-card {
  transition: border-color var(--transition),
              box-shadow var(--transition),
              transform var(--transition);
}

.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* =========================
   ADVANTAGES
========================= */

.advantages {
  padding: 80px 0;
  background-color: var(--color-bg-muted);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: background-color var(--transition);
}

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

.advantage:hover {
  background-color: rgba(214, 185, 140, 0.08);
}


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

.projects {
  padding: 80px 0;
}
.projects__grid {
  padding: 24px;
}

.project-card {
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.project-card:hover::after {
  opacity: 1;
}

.project-card__image {
  height: 220px;
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.project-card__content {
  padding: 20px;
}

.project-card__content h3 {
  margin-bottom: 8px;
}

.project-card__content p {
  margin: 0;
  font-size: 15px;
}


.projects__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* =========================
   CTA
========================= */

.cta {
  padding: 80px 0;
  background-color: var(--color-text-primary);
  color: #fff;
  text-align: center;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 32px;
}

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

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

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

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

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

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.footer__phone {
  font-weight: 500;
}

.footer__messengers {
  display: flex;
  gap: 12px;
}

.footer__messengers a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: border-color var(--transition),
              background-color var(--transition),
              color var(--transition);
}

.footer__messengers a:hover {
  border-color: var(--color-accent);
  background-color: rgba(214, 185, 140, 0.12);
  color: var(--color-accent);
}

/* =========================
   RESPONSIVE
========================= */

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

  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
.header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    z-index: 2;
  }

  .header__phone {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
    z-index: 1;
  }

  .header__actions .btn {
    display: none;
  }

  .burger {
    justify-self: end;
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
    background-position: center;
  }

  .hero__overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0.15) 100%
    );
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
    
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .nav {
    display: none;
  }

  .services__grid,
  .advantages__grid {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card__image {
    height: 200px;
  }
    
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "about about"
      "nav contacts";
    gap: 24px;
  }

  .footer__about {
    grid-area: about;
  }

  .footer__nav {
    grid-area: nav;
    align-items: flex-start;
  }

  .footer__contacts {
    grid-area: contacts;
    align-items: flex-end;
    text-align: right;
  }

  .footer__messengers {
    justify-content: flex-end;
  }
}
