/* ========================================
   NUVE — Global Styles
   ======================================== */

:root {
  --bg: #F7F6F3;
  --text-dark: #0A0A0A;
  --text-muted: #6B6B6B;
  --text-faint: #9A9A9A;
  --accent: #5B8C9A;
  --border: #E0DED8;
  --white: #FFFFFF;
  --max-width: 1440px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --focus-ring: 0 0 0 3px rgba(91, 140, 154, 0.45);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text-dark);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
}

/* Visually hidden but accessible to screen readers */
.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;
}

/* ========================================
   FADE-IN ON SCROLL
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   ACCENT LINE PULSE
   ======================================== */

@keyframes accentPulse {
  0%   { opacity: 0.1; }
  100% { opacity: 0.25; }
}

.accent-pulse {
  animation: accentPulse 4s ease-in-out infinite alternate;
}

/* ========================================
   1. HERO
   ======================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: url('../images/hero-1920.webp') center/cover no-repeat;
  background-image: image-set(
    url('../images/hero-1920.webp') type('image/webp'),
    url('../images/hero.jpg') type('image/jpeg')
  );
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 120px 180px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: #0A0A0ACC;
  z-index: 1;
}

.hero__lang {
  position: absolute;
  top: 40px;
  right: 60px;
  z-index: 3;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero__lang-btn {
  background: transparent;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  opacity: 0.4;
  border-radius: 2px;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.hero__lang-btn--active {
  font-weight: 700;
  opacity: 1;
}

.hero__lang-btn:hover {
  opacity: 0.8;
}

.hero__lang-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  opacity: 1;
}

.hero__lang-sep {
  opacity: 0.4;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.hero__logo {
  width: 280px;
  height: 80px;
  object-fit: contain;
}

.hero__divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.73);
  max-width: 500px;
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.hero__deco-line {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 2;
}

/* ========================================
   2. SPECIALIZATION
   ======================================== */

.spec {
  position: relative;
  background: var(--bg);
  padding: 120px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.spec__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.spec__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.spec__body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 500px;
}

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

.spec__list li {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.spec__accent-line {
  position: absolute;
  top: 200px;
  left: 0;
  width: 600px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

/* ========================================
   3. SERVICES — Card Grid
   ======================================== */

.services {
  position: relative;
  background: var(--bg);
  padding: 80px 120px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.services__label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.services__card {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--white);
  border-right: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.services__card:last-child {
  border-right: none;
}

.services__card:hover {
  background: #EDECEA;
  box-shadow: inset 0 0 0 1px var(--border);
}

.services__icon {
  color: var(--text-dark);
  opacity: 0.6;
  margin-bottom: 8px;
}

.services__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.services__desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.services__deco {
  position: absolute;
  bottom: 20px;
  right: -60px;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--text-dark);
  opacity: 0.02;
  letter-spacing: -3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.services__accent-line {
  position: absolute;
  top: 60px;
  right: 80px;
  width: 1px;
  height: 200px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

/* ========================================
   4. CLIENTS — Carousel
   ======================================== */

.clients {
  background: var(--bg);
  padding: 80px 0;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.clients__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.clients__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text-dark);
}

.clients__carousel {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

@keyframes carouselLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes carouselRight {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.clients__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: carouselLeft 60s linear infinite;
}

.clients__track--left {
  animation-name: carouselLeft;
  animation-duration: 55s;
}

.clients__track--right {
  animation-name: carouselRight;
  animation-duration: 65s;
}

.clients__track--slow {
  animation-duration: 75s;
}

.clients__track:hover {
  animation-play-state: paused;
}

.clients__logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: filter 0.3s ease;
  flex-shrink: 0;
}

.clients__logo:hover {
  filter: grayscale(0%) opacity(1);
}

/* ========================================
   5. CONTACT
   ======================================== */

.contact {
  position: relative;
  background: var(--bg);
  padding: 120px 200px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.contact__header {
  text-align: center;
  margin-bottom: 64px;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 3vw, 2.625rem);
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.contact__subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.contact__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact__label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.contact__value {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  border-radius: 2px;
}

.contact__value:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__form-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.contact__form input,
.contact__form textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact__form input {
  height: 48px;
  padding: 0 16px;
}

.contact__form textarea {
  min-height: 140px;
  padding: 14px 16px;
  resize: vertical;
}

.contact__form input:focus-visible,
.contact__form textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.contact__submit {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  background: var(--text-dark);
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.contact__submit:hover {
  opacity: 0.85;
}

.contact__submit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.contact__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Off-screen honeypot — bots fill it, humans don't see it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__form-status {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 1.2em;
  margin-top: 4px;
}

.contact__form-status--error {
  color: #B23A3A;
}

.contact__form-status--success {
  color: var(--accent);
}

.contact__deco-mirror {
  position: absolute;
  bottom: 60px;
  left: -20px;
  font-family: var(--font-display);
  font-size: 6.25rem;
  font-weight: 700;
  color: var(--text-dark);
  opacity: 0.016;
  white-space: nowrap;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 1;
}

.contact__deco-coords {
  position: absolute;
  bottom: 30px;
  right: 40px;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-faint);
  opacity: 0.25;
  letter-spacing: 3px;
  pointer-events: none;
  z-index: 1;
}

.contact__accent-line {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.12;
  pointer-events: none;
  z-index: 1;
}

/* ========================================
   6. FOOTER
   ======================================== */

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.footer__logo {
  height: 28px;
  width: 80px;
  object-fit: contain;
}

.footer__est {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 2px;
}

.footer__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer__org {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.footer__dot {
  color: var(--text-faint);
}

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

.footer__icon {
  color: var(--text-muted);
  border-radius: 2px;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.footer__icon:hover {
  color: var(--text-dark);
}

.footer__icon:focus-visible {
  outline: none;
  color: var(--text-dark);
  box-shadow: var(--focus-ring);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .hero {
    padding: 120px 60px 140px;
    background-image: url('../images/hero-1024.webp');
    background-image: image-set(
      url('../images/hero-1024.webp') type('image/webp'),
      url('../images/hero.jpg') type('image/jpeg')
    );
  }

  .spec {
    padding: 80px 60px;
  }

  .services {
    padding: 60px 60px 80px;
  }

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

  .services__card:nth-child(2) {
    border-right: none;
  }

  .services__card:nth-child(1),
  .services__card:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .clients {
    padding: 60px 0;
  }

  .contact {
    padding: 80px 60px;
  }

  .footer__inner {
    padding: 40px 60px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 30px 120px;
    min-height: 80vh;
    background-image: url('../images/hero-640.webp');
    background-image: image-set(
      url('../images/hero-640.webp') type('image/webp'),
      url('../images/hero.jpg') type('image/jpeg')
    );
  }

  .hero__lang {
    top: 24px;
    right: 24px;
  }

  .hero__logo {
    width: 180px;
    height: 54px;
  }

  .hero__subtitle {
    font-size: 0.9375rem;
  }

  .hero__deco-line {
    display: none;
  }

  .spec {
    padding: 60px 24px;
  }

  .spec__body {
    font-size: 0.9375rem;
  }

  .spec__accent-line {
    display: none;
  }

  .services {
    padding: 48px 24px 60px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .services__card {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .services__card:last-child {
    border-bottom: none;
  }

  .services__name {
    font-size: 1.1875rem;
  }

  .services__deco,
  .services__accent-line {
    display: none;
  }

  .clients {
    padding: 48px 0;
  }

  .clients__logo {
    height: 24px;
  }

  .clients__track {
    gap: 28px;
  }

  .clients__carousel {
    gap: 16px;
  }

  .contact {
    padding: 60px 24px;
  }

  .contact__content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact__deco-mirror,
  .contact__deco-coords,
  .contact__accent-line {
    display: none;
  }

  .footer__inner {
    padding: 30px 24px;
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer__brand {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 20px 100px;
  }
}
