:root {
  --color-primary: #1e3a8a;
  --color-secondary: #1e40af;
  --color-cta: #b45309;
  --color-cta-hover: #92400e;
  --color-bg: #f8fafc;
  --color-text: #0f172a;
  --color-gold-highlight: #d4a853;
  --font-heading: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Lato", system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

[data-i18n-html] p + p {
  margin-top: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

::selection {
  background-color: var(--color-primary);
  color: #fff;
}

.navbar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 50;
  width: auto;
  max-width: none;
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    backdrop-filter 0.35s ease;
}

.navbar.scrolled {
  background-color: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgb(15 23 42 / 0.08);
}

.navbar-menu {
  display: none;
}

.navbar-menu.active {
  display: flex;
}

@media (min-width: 768px) {
  .navbar-menu {
    display: flex;
  }
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: rgb(15 23 42);
  background-image: url("../images/brandspace-hero-bg.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroBackdropDrift 28s ease-in-out infinite alternate;
}

@keyframes heroBackdropDrift {
  0% {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(30 58 138 / 0.88) 0%,
    rgb(30 64 175 / 0.78) 45%,
    rgb(15 23 42 / 0.72) 100%
  );
  z-index: 1;
  pointer-events: none;
}

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

.section-textured {
  position: relative;
}

.section-textured::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: url("../images/brandspace-texture-light.png");
  background-size: 480px auto;
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

.section-textured > * {
  position: relative;
  z-index: 1;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.faq-item {
  border-bottom: 1px solid rgb(15 23 42 / 0.1);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-cta);
  border-bottom: 2px solid var(--color-cta);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-top: -0.25rem;
}

.faq-item.active .faq-question::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition:
    max-height 0.35s ease-out,
    padding 0.35s ease-out;
}

.faq-item.active .faq-answer {
  max-height: 48rem;
  padding: 0 0 1rem;
}

.service-card {
  border: 1px solid rgb(15 23 42 / 0.12);
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 12px 40px rgb(15 23 42 / 0.1);
  border-color: var(--color-gold-highlight);
}

.service-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.service-card.expanded .service-details {
  max-height: 60rem;
}

#testimonial-track {
  display: flex;
  transition: transform 0.45s ease-out;
}

.testimonial-viewport {
  overflow: hidden;
  width: 100%;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.testimonial-dot {
  cursor: pointer;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  padding: 0;
  background-color: rgb(15 23 42 / 0.2);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.testimonial-dot.active {
  background-color: var(--color-cta);
}

.testimonial-dot:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

.lang-btn.active {
  background-color: var(--color-primary);
  color: #fff;
}

#form-success {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background-color: rgb(22 101 52 / 0.1);
  color: rgb(22 101 52);
  font-size: 0.875rem;
}

#form-success.show {
  display: block;
}

#menu-toggle {
  cursor: pointer;
}

#menu-toggle .bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#menu-toggle .bar + .bar {
  margin-top: 5px;
}

#menu-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--color-cta);
  box-shadow: 0 0 0 3px rgb(180 83 9 / 0.35);
}

.hero-title {
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  line-height: 1.15;
}

.hero-lead {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
  line-height: 1.5;
}

@media (max-width: 767px) {
  .navbar-menu {
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  #testimonial-track {
    transition: none;
  }

  .hero-backdrop {
    transform: none;
  }
}
