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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--secondary);
  line-height: 1.6;
  background-color: var(--light);
}
body.menu-open {
  overflow: hidden;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Georgia", serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--secondary);
}

/* Цветовые переменные */
:root {
--light: #161616;        /* основной фон */
--muted: #1c1c1c;        /* секции */
--secondary: #e5e5e5;    /* заголовки */
--text: #bcbcbc;         /* основной текст */
--border: #2a2a2a;       /* разделители */

}
/* GLOBAL TEXTURE OVER THEME COLORS */
body {
  background-color: var(--light);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.025),
      rgba(255,255,255,0.025) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0,0,0,0.03),
      rgba(0,0,0,0.03) 1px,
      transparent 1px,
      transparent 3px
    );

  opacity: 0.35;
}

/* Утилиты */
.container {
  width: min(90%, 1200px);
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-align: center;
}

.primary-btn {
  background-color: var(--primary);
  color: var(--light);
}

.primary-btn:hover,
.primary-btn:focus {
  background-color: var(--accent);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary);
}

.secondary-btn:hover,
.secondary-btn:focus {
  background-color: var(--primary);
  color: var(--light);
}

/* Header и навигация */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--light);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--secondary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

nav {
  display: flex;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: auto;
}

.nav-list li a {
  font-weight: 500;
  padding: 0.5rem 0;
  color: var(--secondary);
  transition: color 0.3s;
}

.nav-list li a:hover,
.nav-list li a:focus {
  color: var(--primary);
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--light);
  text-align: center;
  padding: 2rem 1rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 2rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero .buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn {
  color: #ffffff;
}
/* HERO BUTTONS — ARCHITECTURAL STYLE */

.hero .primary-btn {
  background-color: #2A2A2A; /* тёплый графит */
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.75rem;
  font-weight: 500;
}

.hero .primary-btn:hover {
  background-color: #3A3A3A;
}

.hero .secondary-btn {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0.85rem 1.75rem;
}

.hero .secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* Общие стили секций */
section {
  padding: 4rem 0;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.section-intro {
  text-align: center;
  max-width: 72ch;
  margin: 0 auto 2rem;
  color: var(--text);
  font-size: 1rem;
}

/* Services */
.services {
  background-color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--light);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--primary);
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--secondary);
}

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

/* Portfolio */
.portfolio {
  background-color: var(--light);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
/* Portfolio CTA */
.portfolio-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}
/* PORTFOLIO CTA — FORCE VISIBLE (put at the VERY END of CSS) */
.portfolio-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.portfolio-cta a.btn.secondary-btn {
  background-color: #2A2A2A;
  color: #ffffff;
  border: 1px solid #2A2A2A;
  padding: 0.85rem 2rem;
  font-weight: 500;
  opacity: 1;
  visibility: visible;
}

.portfolio-cta a.btn.secondary-btn:hover,
.portfolio-cta a.btn.secondary-btn:focus,
.portfolio-cta a.btn.secondary-btn:active {
  background-color: #3A3A3A !important;
  border-color: #3A3A3A !important;
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background-color: var(--muted);
}

.project-card img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}

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

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: var(--light);
  padding: 1rem;
  transition: transform 0.3s;
  transform: translateY(100%);
}

.project-card:hover .project-info {
  transform: translateY(0);
}

.project-info h3 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.project-info p {
  font-size: 0.9rem;
}

/* =========================
   ABOUT — HARD FIX (perfect top alignment)
   TEXT LEFT / IMAGE RIGHT
   ========================= */

.about { 
  background-color: #161616;
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
  padding: 5rem 0;
}

.about .section-intro {
  color: #bcbcbc;
  max-width: 72ch;
  margin: 0.75rem auto 2.75rem;
  line-height: 1.7;
}

/* Force a strict 2-column grid and top alignment */
.about .about-content {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important; /* text / image */
  grid-template-rows: auto !important;
  gap: 2.5rem !important;
  align-items: start !important;
}

/* Force TEXT into first row / left column and reset any shifts */
.about .about-text {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: start !important;
  justify-self: start !important;
  margin: 0 !important;
  transform: none !important;
  position: static !important;

  background: rgba(255,255,255,0.04);
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 2.25rem;
}

.about .about-text h3 {
  margin: 0 0 1rem 0 !important;
  font-size: 1.8rem;
  color: #ffffff;
}

.about .about-text p {
  color: #d6d6d6;
  line-height: 1.85;
  margin: 0 0 1rem 0 !important;
}

.about .about-text ul {
  margin: 1.25rem 0 0 0 !important;
  padding: 0 !important;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.about .about-text li {
  color: #cfcfcf;
  padding-left: 1.2rem;
  position: relative;
}

.about .about-text li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.6);
}

/* Force IMAGE into first row / right column and top align */
.about .about-content > img {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: start !important;
  justify-self: end !important;
  margin: 0 !important;
  transform: none !important;
  position: static !important;

  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 18px;
  border: 1px solid #2a2a2a;
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  object-fit: cover;
}

/* Mobile: image top, text bottom */
@media (max-width: 992px) {
  .about { padding: 4rem 0; }

  .about .about-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .about .about-content > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    max-width: 100%;
  }

  .about .about-text {
    grid-column: 1 !important;
    grid-row: 2 !important;
    padding: 1.75rem 1.5rem;
  }
}


/* Testimonials */
.testimonials {
  background-color: var(--light);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--muted);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial-card .quote {
  font-style: italic;
  margin-bottom: 1rem;
  color: #444444;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--secondary);
}
.testimonials {
  background-color: #161616;
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
}

.testimonials h2 {
  color: #ffffff;
}

.testimonials .section-intro {
  color: #bcbcbc;
  max-width: 70ch;
}

.testimonial-grid {
  margin-top: 2.25rem;
  gap: 1.5rem;
}

.testimonial-card {
  background-color: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  border-color: #3a3a3a;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

.testimonial-card .quote {
  color: #d7d7d7;
  font-style: italic;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.testimonial-card .author {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Contact */
.contact {
  background-color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--secondary);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  color: var(--secondary);
  background-color: var(--light);
}

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

.contact form button {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: #222222;
  color: #dddddd;
  padding: 2rem 0 1rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-about,
.footer-contact,
.footer-social {
  flex: 1 1 250px;
}

.footer-about h3 {
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.footer-about p {
  color: #bbbbbb;
  font-size: 0.9rem;
}

.footer-contact h4,
.footer-social h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #ffffff;
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.footer-contact a {
  color: #bbbbbb;
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: background-color 0.3s;
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #777777;
}

/* Адаптив */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    order: 2;
    width: 100%;
  }

  .about-content img {
    order: 1;
    width: 100%;
    margin-bottom: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .about-media {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--light);
    flex-direction: column;
    width: 200px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  nav.open .nav-list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    position: relative;
  }

  .nav-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-list li a {
    width: 100%;
    display: block;
  }
}

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contact,
  .footer-social {
    margin-top: 1rem;
  }
}
/* Mobile fullscreen menu */