:root {
  --page-bg: #f6f3ee;
  --text: #18201c;
  --muted: #5f6862;
  --brand: #1e6f5c;
  --brand-dark: #123b34;
  --accent: #e6b84a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

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

a {
  color: inherit;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 24px clamp(20px, 5vw, 72px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.nav-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(12, 24, 22, 0.28);
  backdrop-filter: blur(10px);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(12, 24, 22, 0.28);
  backdrop-filter: blur(10px);
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.language-option.is-active {
  color: var(--brand-dark);
  background: var(--accent);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(12, 24, 22, 0.28);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-actions.is-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-actions.is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-actions.is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-section {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: clamp(620px, 82vh, 820px);
  padding: 132px clamp(20px, 5vw, 72px) 70px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(7, 14, 17, 0.52) 0%, rgba(7, 14, 17, 0.1) 38%, rgba(7, 14, 17, 0.76) 100%),
    linear-gradient(90deg, rgba(7, 14, 17, 0.18) 0%, rgba(7, 14, 17, 0.08) 43%, rgba(7, 14, 17, 0.44) 100%),
    url("../assets/images/torogoz-hero-generated.png") center center / cover no-repeat;
}

.hero-section::before {
  content: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(7, 14, 17, 0) 0%, rgba(7, 14, 17, 0.78) 62%, rgba(7, 14, 17, 0.92) 100%);
  pointer-events: none;
}

.hero-content {
  width: min(340px, 100%);
  position: relative;
  z-index: 1;
  text-align: right;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.62);
}

.hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-content p {
  max-width: 340px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  line-height: 1.55;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-btn {
  color: var(--brand-dark);
  background: var(--accent);
}

.secondary-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

section:not(.hero-section) {
  padding: 84px clamp(20px, 5vw, 72px);
}

.projects-section {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(7, 14, 17, 0.8) 0%, rgba(7, 14, 17, 0.56) 48%, rgba(7, 14, 17, 0.9) 100%),
    url("../assets/images/projects-section-bg-v2.png") center center / cover no-repeat;
}

.projects-section .section-header p {
  color: rgba(255, 255, 255, 0.78);
}

.qr-section {
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(7, 14, 17, 0.48) 0%, rgba(7, 14, 17, 0.26) 50%, rgba(7, 14, 17, 0.58) 100%),
    linear-gradient(90deg, rgba(7, 14, 17, 0.34) 0%, rgba(7, 14, 17, 0.08) 50%, rgba(7, 14, 17, 0.34) 100%),
    url("../assets/images/capabilities-section-bg.png") center center / cover no-repeat;
}

.qr-section .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

.inline-project-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(230, 184, 74, 0.62);
}

.inline-project-link:hover,
.inline-project-link:focus-visible {
  border-bottom-color: var(--accent);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-header h2,
.about-content h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-header p,
.about-content p,
.project-content p,
.service-card p,
.step-card p,
.contact-info p {
  color: var(--muted);
  line-height: 1.65;
}

.project-grid,
.services-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

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

.qr-section .steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.carousel {
  position: relative;
}

.services-section .carousel {
  max-width: 1120px;
  margin: 0 auto;
}

.carousel-viewport {
  overflow: hidden;
  padding: 4px 2px 20px;
}

.services-section .carousel-viewport {
  padding: 10px 8px 24px;
}

.project-grid.carousel-track,
.services-grid.carousel-track {
  display: flex;
  grid-template-columns: none;
  gap: 22px;
  transition: transform 560ms ease;
  will-change: transform;
}

.carousel-track > .project-card,
.carousel-track > .service-card {
  flex: 0 0 calc((100% - 44px) / 3);
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--white);
  font: inherit;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(12, 24, 22, 0.56);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(30, 111, 92, 0.82);
  transform: translateY(-50%) scale(1.04);
}

.carousel-control span {
  transform: translateY(-2px);
}

.carousel-control-prev {
  left: -24px;
}

.carousel-control-next {
  right: -24px;
}

.services-section .carousel-control {
  border-color: rgba(18, 59, 52, 0.16);
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.86);
}

.services-section .carousel-control:hover,
.services-section .carousel-control:focus-visible {
  color: var(--white);
  border-color: rgba(30, 111, 92, 0.6);
  background: var(--brand);
}

.project-card,
.service-card,
.step-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.projects-section .project-card {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.qr-section .step-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  background: rgba(9, 25, 25, 0.58);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.qr-section .step-card p {
  color: rgba(255, 255, 255, 0.78);
}

.qr-section .step-card span {
  color: var(--accent);
}

.about-section {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 14, 17, 0.74) 0%, rgba(7, 14, 17, 0.46) 44%, rgba(7, 14, 17, 0.32) 100%),
    linear-gradient(180deg, rgba(7, 14, 17, 0.58) 0%, rgba(7, 14, 17, 0.16) 46%, rgba(7, 14, 17, 0.66) 100%),
    url("../assets/images/about-section-bg.png") center center / cover no-repeat;
}

.about-section .about-content {
  margin-left: 0;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 20, 21, 0.54);
  box-shadow: 0 0 34px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
}

.about-section .about-content p {
  color: rgba(255, 255, 255, 0.82);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #d7d9d2;
}

.project-card img.image-missing {
  display: none;
}

.image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 24px;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(30, 111, 92, 0.2), rgba(230, 184, 74, 0.28)),
    #dde2d9;
}

.logo img.image-missing {
  display: none;
}

.project-content,
.service-card,
.step-card {
  padding: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px solid rgba(18, 59, 52, 0.08);
  text-align: center;
  box-shadow: 0 0 26px rgba(18, 59, 52, 0.11);
}

.service-card h3 {
  margin: 0 0 12px;
}

.service-card p {
  max-width: 28ch;
  margin: 0;
}

.project-card a,
.project-link {
  text-decoration: none;
}

.project-category,
.step-card span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-link {
  display: inline-flex;
  margin-top: 8px;
  border: 0;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.project-link-disabled {
  color: rgba(95, 104, 98, 0.72);
  cursor: not-allowed;
}

.about-content,
.contact-info {
  max-width: 820px;
  margin: 0 auto;
}

.about-section .about-content {
  margin: 0 auto 0 0;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 28px;
  color: var(--white);
  background: var(--brand-dark);
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    padding: 16px 20px;
  }

  .navbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .nav-actions {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    width: min(240px, calc(100vw - 40px));
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(8, 20, 21, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .nav-actions.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.86rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .logo {
    gap: 8px;
    font-size: 0.86rem;
  }

  .logo img {
    width: 44px;
    height: 44px;
  }

  .hero-section {
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 760px;
    padding-top: 220px;
    padding-bottom: 44px;
    background-position: center center, center center, 30% center;
    background-size: cover;
  }

  .hero-section::before {
    content: none;
  }

  .hero-content {
    align-self: flex-end;
    text-align: left;
    width: min(480px, 100%);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.76);
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .project-grid,
  .services-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .about-section {
    background-position: 58% center;
  }

  .about-section .about-content {
    margin: 0 auto;
    padding: 26px;
  }

  .carousel-track > .project-card,
  .carousel-track > .service-card {
    flex-basis: min(84vw, 380px);
  }

  .carousel-control {
    width: 42px;
    height: 42px;
    font-size: 1.75rem;
  }

  .carousel-control-prev {
    left: 8px;
  }

  .carousel-control-next {
    right: 8px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .qr-section .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .hero-section::before {
    content: none;
  }

  .hero-content {
    width: min(320px, 32vw);
  }
}

@media (min-width: 1181px) {
  .hero-content {
    margin-bottom: 8px;
  }
}

@media (max-width: 620px) {
  .hero-section {
    min-height: 720px;
    padding-top: 210px;
    padding-bottom: 34px;
  }

  .hero-section::before {
    background-position: center 25%;
    background-size: min(560px, 125vw) auto;
  }

  .hero-content h1 {
    max-width: 340px;
  }

  .hero-content p {
    max-width: 360px;
  }
}

@media (max-width: 420px) {
  .logo span {
    display: none;
  }
}
