/* НордКров — кровля и фасады */

:root {
  --slate-950: #0f1419;
  --slate-900: #151c26;
  --slate-800: #1e2836;
  --slate-700: #2a3545;
  --slate-600: #3d4f63;
  --slate-400: #7a8fa3;
  --slate-200: #c5d0db;
  --steel-600: #3d6d8c;
  --steel-500: #4a86a8;
  --steel-400: #6ba3c4;
  --steel-300: #8fc0dc;
  --copper: #c4783a;
  --copper-bright: #d4924f;
  --copper-glow: rgba(196, 120, 58, 0.25);
  --white: #f4f7fa;
  --font-display: "Archivo", sans-serif;
  --font-body: "Figtree", sans-serif;
  --header-h: 4.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: min(72rem, calc(100% - 2.5rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate-200);
  background: var(--slate-950);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--steel-300);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

a:hover {
  color: var(--copper-bright);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  letter-spacing: -0.02em;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ── Header & mobile menu (checkbox) ── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(15, 20, 25, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(107, 163, 196, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: var(--container);
  margin-inline: auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--copper-bright);
}

.logo:hover {
  color: var(--white);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  z-index: 110;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate-200);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--copper);
  transition: width 0.3s var(--ease-out);
}

.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
}

.nav a.is-active {
  color: var(--white);
}

.header-phone {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--copper-bright);
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--white);
}

@media (max-width: 860px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    background: rgba(15, 20, 25, 0.97);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-out);
  }

  .nav a {
    font-size: 1.5rem;
    font-family: var(--font-display);
  }

  .header-phone {
    display: none;
  }

  .nav-toggle:checked ~ .nav {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked ~ .burger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s;
}

.btn--primary {
  background: var(--copper);
  color: var(--white);
  box-shadow: 0 4px 24px var(--copper-glow);
}

.btn--primary:hover {
  background: var(--copper-bright);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--copper-glow);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(143, 192, 220, 0.4);
}

.btn--outline:hover {
  border-color: var(--steel-400);
  color: var(--steel-300);
  transform: translateY(-2px);
}

/* ── Hero (index) ── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 22s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.12) translate(-2%, -1.5%);
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 20, 25, 0.55) 0%, rgba(15, 20, 25, 0.25) 40%, rgba(15, 20, 25, 0.92) 100%),
    linear-gradient(135deg, rgba(61, 109, 140, 0.2) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin-inline: auto;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
}

.hero__brand {
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  animation: fade-up 1s var(--ease-out) both;
}

.hero__brand em {
  font-style: normal;
  color: var(--copper-bright);
  display: block;
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  max-width: 32rem;
  color: var(--slate-200);
  margin-bottom: 2.5rem;
  animation: fade-up 1s 0.15s var(--ease-out) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fade-up 1s 0.3s var(--ease-out) both;
}

.hero__badge {
  position: absolute;
  top: calc(var(--header-h) + 2rem);
  right: max(1.25rem, calc((100vw - 72rem) / 2 + 1.25rem));
  padding: 0.75rem 1.25rem;
  background: rgba(30, 40, 54, 0.75);
  border: 1px solid rgba(107, 163, 196, 0.25);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--steel-300);
  animation: fade-in 1.2s 0.5s var(--ease-out) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Page hero (inner pages) ── */

.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 3.5rem;
  background:
    linear-gradient(160deg, var(--slate-900) 0%, var(--slate-950) 60%),
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(74, 134, 168, 0.15), transparent);
  border-bottom: 1px solid rgba(107, 163, 196, 0.1);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  animation: fade-up 0.8s var(--ease-out) both;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--slate-400);
  animation: fade-up 0.8s 0.1s var(--ease-out) both;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--copper-bright);
  margin-bottom: 0.75rem;
}

/* ── Sections ── */

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--slate-900);
}

.section__head {
  margin-bottom: 3rem;
}

.section__head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.section__head p {
  margin-top: 0.75rem;
  max-width: 34rem;
  color: var(--slate-400);
}

/* Fade-in on scroll via animation-delay classes (CSS only) */

.fade-in {
  animation: fade-up 0.9s var(--ease-out) both;
}

.fade-in--d1 { animation-delay: 0.1s; }
.fade-in--d2 { animation-delay: 0.2s; }
.fade-in--d3 { animation-delay: 0.3s; }
.fade-in--d4 { animation-delay: 0.4s; }
.fade-in--d5 { animation-delay: 0.5s; }

/* ── Cards grid ── */

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.card {
  background: var(--slate-800);
  border: 1px solid rgba(107, 163, 196, 0.12);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 120, 58, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.card:hover .card__img img {
  transform: scale(1.06);
}

.card__body {
  padding: 1.5rem;
}

.card__body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card__body p {
  font-size: 0.9375rem;
  color: var(--slate-400);
}

.card__link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--copper-bright);
}

/* ── Service list ── */

.services-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem;
  background: var(--slate-800);
  border: 1px solid rgba(107, 163, 196, 0.1);
  border-radius: 6px;
  transition: border-color 0.3s;
}

.service-item:hover {
  border-color: rgba(196, 120, 58, 0.3);
}

.service-item__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--steel-500);
  line-height: 1;
}

.service-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.service-item p {
  color: var(--slate-400);
  font-size: 0.9375rem;
}

@media (max-width: 600px) {
  .service-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ── Stats strip ── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 3rem 0;
  border-top: 1px solid rgba(107, 163, 196, 0.12);
  border-bottom: 1px solid rgba(107, 163, 196, 0.12);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--copper-bright);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat span {
  font-size: 0.875rem;
  color: var(--slate-400);
}

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

/* ── About layout ── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.about-grid__img {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(107, 163, 196, 0.15);
}

.about-grid__img img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-grid p {
  margin-bottom: 1rem;
  color: var(--slate-400);
}

.about-grid p a {
  color: var(--copper-bright);
  border-bottom: 1px solid rgba(196, 120, 58, 0.35);
}

.about-grid p a:hover {
  color: var(--white);
  border-color: var(--copper-bright);
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Portfolio ── */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.portfolio-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(107, 163, 196, 0.1);
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-item__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(transparent, rgba(15, 20, 25, 0.92));
}

.portfolio-item__caption h3 {
  font-size: 1.1rem;
}

.portfolio-item__caption p {
  font-size: 0.8125rem;
  color: var(--slate-400);
  margin-top: 0.25rem;
}

.portfolio-item--wide {
  grid-column: span 2;
}

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

  .portfolio-item--wide {
    grid-column: span 1;
  }
}

/* ── Contact ── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-card {
  padding: 2rem;
  background: var(--slate-800);
  border: 1px solid rgba(107, 163, 196, 0.12);
  border-radius: 6px;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--steel-300);
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(107, 163, 196, 0.08);
}

.contact-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-list strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  margin-bottom: 0.25rem;
}

.contact-list a,
.contact-list span {
  font-size: 1.05rem;
  color: var(--white);
}

.contact-map {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(107, 163, 196, 0.12);
  background: var(--slate-800);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--slate-400);
}

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

/* ── CTA band ── */

.cta-band {
  padding: 4rem 0;
  background:
    linear-gradient(135deg, var(--slate-800) 0%, var(--slate-900) 100%);
  border-top: 1px solid rgba(107, 163, 196, 0.1);
  border-bottom: 1px solid rgba(107, 163, 196, 0.1);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 28rem;
}

/* ── Footer ── */

.site-footer {
  padding: 3.5rem 0 2rem;
  background: var(--slate-950);
  border-top: 1px solid rgba(107, 163, 196, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-brand span {
  color: var(--copper-bright);
}

.footer-desc {
  font-size: 0.9375rem;
  color: var(--slate-400);
  max-width: 22rem;
}

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel-400);
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  font-size: 0.9375rem;
  color: var(--slate-400);
}

.footer-nav a:hover {
  color: var(--copper-bright);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(107, 163, 196, 0.08);
  font-size: 0.8125rem;
  color: var(--slate-600);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Feature row (index) ── */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-row--reverse {
  direction: rtl;
}

.feature-row--reverse > * {
  direction: ltr;
}

.feature-row__img {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(107, 163, 196, 0.12);
}

.feature-row__img img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.feature-row h2 {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  margin-bottom: 1rem;
}

.feature-row p {
  color: var(--slate-400);
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  margin-top: 1.25rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--slate-200);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--copper);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .feature-row,
  .feature-row--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}
