:root {
  --color-primary: #002d5b;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-bg-muted: #f4f4f4;
  --color-white: #ffffff;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;
  --radius-btn: 8px;
  --radius-card: 10px;
  --container: min(1120px, 92vw);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-white);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid #e8e8e8;
  padding: 1rem 4vw;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav a {
  color: var(--color-primary);
}

.nav a:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* Sections */
.section--muted {
  background: var(--color-bg-muted);
}

.hero {
  padding: 4rem 4vw 3rem;
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.hero__logo {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-card);
}

.hero__text {
  margin: 0 0 1.25rem;
  font-size: 1.4rem;
  color: var(--color-text);
  max-width: 28rem;
}

.hero__text strong {
  color: var(--color-primary);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

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

.btn--primary:hover {
  background: #003d78;
  text-decoration: none;
}

.btn--primary:active {
  transform: scale(0.98);
}

/* Appointment */
.appointment {
  padding: 2.5rem 4vw 3.5rem;
}

.appointment__inner {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .appointment__inner {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }
}

.appointment__title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-primary);
}

.appointment__contacts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 520px) {
  .appointment__contacts {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
  }
}

.contact-block {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.contact-block__icon {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 2px;
}

.contact-block__icon--wa {
  color: #25d366;
}

.contact-block__phones {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-block__phones li + li {
  margin-top: 0.35rem;
}

.contact-block__phones a {
  color: var(--color-text);
}

.contact-block__phones a:hover {
  color: var(--color-primary);
}

.contact-block__wa-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.contact-block__wa-label {
  margin: 0;
  font-weight: 600;
  color: var(--color-primary);
}

.pill-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  border: 1px solid #d0d0d0;
  border-radius: 999px;
  background: var(--color-white);
}

.pill-link:hover {
  background: var(--color-bg-muted);
  text-decoration: none;
}

/* Services */
.services {
  padding: 3.5rem 4vw 4rem;
  background: var(--color-white);
}

.services__header {
  margin-bottom: 2rem;
}

.services__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
}

.services__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.services__carousel {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.services__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.services__track::-webkit-scrollbar {
  height: 6px;
}

.services__track::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 3px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(200px, 42vw);
  scroll-snap-align: start;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 200px;
}

@media (min-width: 900px) {
  .service-card {
    flex: 0 0 200px;
    min-height: 220px;
  }
}

.placeholder--card {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #8899aa 0%, #5a6b7d 100%);
}

.placeholder--card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.06) 8px,
    rgba(255, 255, 255, 0.06) 16px
  );
}

.service-card__media {
  position: absolute;
  inset: 0;
}

.service-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  pointer-events: none;
}

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

.service-card__label {
  position: relative;
  z-index: 1;
  margin: 0;
  margin-top: auto;
  padding: 1rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--color-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.carousel-nav {
  flex-shrink: 0;
  align-self: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.carousel-nav:hover {
  background: var(--color-bg-muted);
  border-color: #ccc;
}

/* About */
.about {
  padding: 3rem 4vw 4rem;
  background: var(--color-bg-muted);
}

.about__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.about__title {
  margin: 0 0 1rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-primary);
}

.about__body {
  margin: 0;
  color: var(--color-text);
  font-size: 0.98rem;
}

.about__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.placeholder--building {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, #cfd8e0 0%, #9aa8b5 50%, #6d7d8c 100%);
  border: 2px dashed rgba(0, 45, 91, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder__caption {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Map */
.map-section {
  padding: 2.5rem 0 0;
  background: var(--color-bg-muted);
  border-top: 1px solid #e8e8e8;
}

.map-section__intro {
  padding-inline: 4vw;
  margin-bottom: 1.25rem;
}

.map-section__title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-primary);
}

.map-section__address {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.map-embed {
  width: 100%;
  min-height: 280px;
  background: #e3eaf0;
  border-top: 1px solid #d0d8de;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 52vw, 440px);
  border: 0;
}

/* Footer */
.site-footer {
  padding: 1.25rem 4vw;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__note {
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
}

/* —— Animations —— */
@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  .animate-header {
    animation: fade-slide-down 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .animate-hero-brand {
    animation: fade-slide-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  }

  .animate-hero-cta {
    animation: fade-slide-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
  }

  .hero__logo--animated {
    transition: box-shadow 0.35s ease, transform 0.35s ease;
  }

}

.nav a {
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.nav a:hover {
  text-decoration: none;
  opacity: 0.92;
}

.btn--primary {
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn--primary:hover {
  box-shadow: 0 8px 24px rgba(0, 45, 91, 0.28);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 45, 91, 0.2);
}

.pill-link {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pill-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.service-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 45, 91, 0.18);
  }
}

.carousel-nav {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.carousel-nav:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(0, 45, 91, 0.12);
}

.carousel-nav:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: no-preference) {
  .about__media .about__photo {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  }

  .about__media .about__photo:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 45, 91, 0.12);
  }
}

.reveal-section:not(.is-inview) .reveal-stagger {
  opacity: 0;
  transform: translateY(26px);
}

.reveal-section.is-inview .reveal-stagger {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger, 0) * 85ms);
}

@media (prefers-reduced-motion: reduce) {
  .animate-header,
  .animate-hero-brand,
  .animate-hero-cta {
    animation: none;
  }

  .hero__logo--animated:hover {
    transform: none;
    box-shadow: none;
  }

  .reveal-section:not(.is-inview) .reveal-stagger,
  .reveal-section.is-inview .reveal-stagger {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn--primary:hover,
  .pill-link:hover,
  .carousel-nav:hover {
    transform: none;
    box-shadow: none;
  }

  .service-card:hover {
    transform: none;
    box-shadow: none;
  }

  .nav a::after {
    display: none;
  }

  .nav a:hover {
    text-decoration: underline;
  }
}
