:root {
  --color-yellow: #f5b400;
  --color-yellow-soft: #ffe8ab;
  --color-yellow-pale: #fff6e0;
  --color-white: #ffffff;
  --color-warm-white: #fffaf0;
  --color-gray-900: #2b2b28;
  --color-gray-700: #4a4a45;
  --color-gray-500: #7a766d;
  --color-gray-300: #d8d3c6;
  --color-gray-100: #efece3;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 40px -20px rgba(43, 43, 40, 0.25);
  --shadow-card: 0 10px 30px -15px rgba(43, 43, 40, 0.2);

  --container-width: 1120px;
  --font-main: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-gray-900);
  background: var(--color-warm-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

h3 {
  font-size: 20px;
  margin: 0 0 4px;
}

.section {
  padding: 96px 0;
}

.section__tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-900);
  background: var(--color-yellow-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section__lead {
  font-size: 18px;
  color: var(--color-gray-700);
  max-width: 640px;
  margin: 0 0 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-yellow);
  color: var(--color-gray-900);
  box-shadow: var(--shadow-card);
}

.btn--primary:hover {
  background: #ffc733;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--full {
  width: 100%;
}

/* Header */
.header {
  background: var(--color-white);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  color: var(--color-gray-900);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-gray-700);
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--color-gray-900);
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--color-yellow-pale) 0%, var(--color-warm-white) 100%);
  border-bottom: 1px solid var(--color-gray-100);
}

.hero__inner {
  padding: 96px 24px 110px;
  text-align: center;
  max-width: 760px;
}

.hero__eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-700);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 14px 0 20px;
  text-transform: lowercase;
}

.hero__desc {
  font-size: 18px;
  color: var(--color-gray-700);
  margin: 0 auto 36px;
  max-width: 560px;
}

/* About */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.team-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--color-gray-900);
  object-fit: cover;
  object-position: center 15%;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.avatar--1 { background: linear-gradient(135deg, #ffe08a, #ffc733); }
.avatar--2 { background: linear-gradient(135deg, #f1ecdd, #d8d3c6); }
.avatar--3 { background: linear-gradient(135deg, #ffd166, #f5b400); }

.team-card__role {
  color: var(--color-gray-500);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  min-height: calc(14px * 1.55 * 2);
}

.team-card__more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 10px 18px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-900);
  cursor: pointer;
  transition: background 0.2s ease;
}

.team-card__more-btn:hover {
  background: var(--color-gray-300);
}

.team-card__more-arrow {
  transition: transform 0.2s ease;
}

.team-card__more-btn[aria-expanded="true"] .team-card__more-arrow {
  transform: rotate(180deg);
}

.team-card__more-text {
  margin: 16px 0 0;
  padding: 16px 18px;
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  color: var(--color-gray-700);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

/* Service */
.service {
  background: var(--color-gray-900);
  color: var(--color-white);
}

.service .section__tag {
  background: var(--color-yellow);
}

.service .section__lead {
  color: #d8d5cc;
}

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

.service__subheading {
  color: var(--color-yellow);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}

.service__list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service__list li {
  padding-left: 30px;
  position: relative;
  color: #efece3;
  font-size: 16px;
}

.service__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  color: var(--color-gray-900);
  background: var(--color-yellow);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.visual-card {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.visual-card:hover {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.1);
}

button.visual-card {
  width: 100%;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  flex-direction: column;
  align-items: stretch;
}

.visual-card__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.visual-card__popup {
  position: relative;
  margin-top: 18px;
  background: #ffffff;
  color: var(--color-gray-900);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.visual-card__popup::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
}

.visual-card__num {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-gray-900);
  background: var(--color-yellow);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.review-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-card__text {
  margin: 0;
  color: var(--color-gray-700);
  font-size: 16px;
}

.review-card__author {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  margin-top: auto;
}

.review-card__author h3 {
  font-size: 17px;
  white-space: nowrap;
}

.review-card__author .avatar {
  width: 56px;
  height: 56px;
  font-size: 16px;
  margin: 0;
  flex-shrink: 0;
}

.review-card__role {
  color: var(--color-gray-500);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.footer {
  background: var(--color-gray-900);
  color: #efece3;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding: 64px 24px 40px;
}

.logo--footer {
  color: var(--color-white);
  font-size: 20px;
  margin-bottom: 6px;
}

.footer__brand p {
  color: #b3afa3;
  margin: 0;
}

.footer__contacts p {
  margin: 0 0 10px;
}

.footer__contacts span {
  color: #9c988c;
  margin-right: 6px;
}

.footer__contacts a {
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer__contacts a:hover {
  color: var(--color-yellow);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px 32px;
  font-size: 13px;
  color: #9c988c;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 43, 40, 0.55);
}

.modal__content {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal[aria-hidden="false"] .modal__content {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-gray-100);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-gray-700);
}

.modal__close:hover {
  background: var(--color-yellow-soft);
}

.modal__desc {
  color: var(--color-gray-500);
  margin: 0 0 16px;
  font-size: 14px;
}

#orderForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#orderForm[hidden] {
  display: none;
}

#orderForm label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.label-text {
  display: inline-block;
}

.required-mark {
  color: #d9534f;
}

#orderForm input,
#orderForm textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-gray-300);
  background: var(--color-warm-white);
  resize: none;
  transition: border-color 0.15s ease;
}

#orderForm input:focus,
#orderForm textarea:focus {
  outline: none;
  border-color: var(--color-yellow);
}

#orderForm input:invalid.touched {
  border-color: #d9534f;
}

#orderForm button[type="submit"] {
  padding: 12px 24px;
  font-size: 15px;
}

.form-success {
  text-align: center;
  font-weight: 600;
  color: var(--color-gray-900);
  background: var(--color-yellow-pale);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.form-error {
  text-align: center;
  font-weight: 600;
  color: #d9534f;
  background: #fbeaea;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}

.form-required-msg {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #d9534f;
  margin: 0;
}

.form-error a {
  color: inherit;
  text-decoration: underline;
}

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

  .service__visual {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .visual-card {
    flex: 1 1 200px;
  }
}

@media (max-width: 680px) {
  .nav {
    display: none;
  }

  .team-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }

  .hero__inner {
    padding: 64px 24px 72px;
  }

  .footer__inner {
    flex-direction: column;
  }
}

/* ==========================================================================
   Mobile & tablet adaptation
   ========================================================================== */

/* Hamburger button (hidden on desktop by default) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-gray-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.nav-toggle--open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

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

/* Tablets: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .header__inner {
    padding: 18px 20px;
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    gap: 16px;
  }

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

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

/* Smartphones: up to 768px */
@media (max-width: 767px) {
  .header__inner {
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-card);
    z-index: 50;
  }

  .nav.nav--open {
    display: flex;
  }

  .nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-gray-100);
  }

  .team-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  h1,
  h2,
  h3,
  .hero h1 {
    font-size: 1.2rem;
  }

  p,
  .section__lead,
  .hero__desc,
  .hero__subtitle,
  .review-card__text,
  .team-card__role,
  .service__list li {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }
}
