/* ═══════════════════════════════════════════════
   Components — Motionsites-inspired for Conexia
   ═══════════════════════════════════════════════ */

/* ══ NAV ══ */
.nav {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 2rem;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0.5rem 0;
}

.nav__logo img { height: 36px; width: auto; }

.nav__pill {
  display: none;
  align-items: center;
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0;
  position: relative;
}

.nav__pill-link,
.nav__pill-cta {
  position: relative;
  z-index: 2;
  padding: 0.5rem 0.875rem;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.7);
  transition: color 0.25s var(--ease);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
}

.nav__pill-link:hover,
.nav__pill-link[data-active] {
  color: #fff;
}

.nav__pill-cta {
  background: #fff;
  color: #000;
  padding: 0.5rem 1rem;
  margin-left: 0.25rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav__pill-cta:hover {
  background: rgba(255,255,255,0.92);
  color: #000;
  transform: translateY(-1px);
}

.nav__pill-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  z-index: 1;
  opacity: 0;
  transition: transform 0.4s var(--ease-spring),
              width 0.4s var(--ease-spring),
              height 0.4s var(--ease-spring),
              opacity 0.25s var(--ease);
  will-change: transform, width, height, opacity;
  pointer-events: none;
}

.nav__pill-indicator.is-active { opacity: 1; }

.nav__toggle {
  display: block;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .nav__pill { display: flex; }
  .nav__toggle { display: none; }
}

/* ══ HERO ══ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 680px;
  padding: 0 2rem;
}

.hero__title {
  font-size: var(--fs-hero);
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero__partners {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 2rem;
  text-align: center;
}

.hero__partners-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
}

.hero__partners-logos {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  font-size: 1.75rem;
  font-weight: var(--fw-heavy);
  color: rgba(255,255,255,0.55);
  letter-spacing: -0.02em;
}

/* ══ VIDEO SECTION (generic) ══ */
.video-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-section__content {
  position: relative;
  z-index: 10;
  padding: 6rem 2rem;
  text-align: center;
  max-width: 620px;
}

/* ══ FEATURES CHESS ══ */
.features-chess {
  padding: 6rem 0;
}

.chess-row {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  max-width: var(--w-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.chess-row--reverse { flex-direction: row-reverse; }

.chess-row__text {
  flex: 1;
}

.chess-row__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.chess-row__body {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.chess-row__visual {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ══ FEATURES GRID ══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 0 2rem;
  max-width: var(--w-max);
  margin: 0 auto;
}

.feature-card {
  border-radius: 16px;
  padding: 1.5rem;
}

.feature-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
}

.feature-card__title {
  font-size: var(--fs-body);
  font-weight: var(--fw-heavy);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.feature-card__desc {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* ══ SERVICES (page services) ══ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.service-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "desc desc"
    "tags tags";
  gap: 1rem 1.25rem;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.service-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

.service-card__number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
}

.service-card .icon-box {
  grid-area: icon;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0;
}
.service-card .icon { width: 22px; height: 22px; stroke-width: 1.5; }
.service-card .icon--lg { width: 22px; height: 22px; }

.service-card__title {
  grid-area: title;
  font-size: 1.5rem;
  font-weight: var(--fw-heavy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.service-card__desc {
  grid-area: desc;
}

.service-card__tags {
  grid-area: tags;
}

.service-card__desc {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ══ STATS ══ */
.stats-card {
  border-radius: 24px;
  padding: 4rem;
  max-width: var(--w-max);
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat__value {
  font-family: var(--ff-heading);
  font-size: var(--fs-section);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat__label {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  margin-top: 0.5rem;
}

/* ══ TESTIMONIALS ══ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.testimonial-card {
  border-radius: 16px;
  padding: 2rem;
}

.testimonial-card__quote {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-card__name {
  font-weight: var(--fw-heavy);
  font-size: var(--fs-sm);
}

.testimonial-card__role {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-xs);
  margin-top: 0.125rem;
}

/* ══ CTA ══ */
.cta-section__content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 8rem 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.cta-section__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ══ FOOTER ══ */
.footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--w-max);
  margin: 0 auto;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: #fff; }

/* ══ AUDIO TOGGLE ══ */
.audio-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
  padding: 0;
}
.audio-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.audio-toggle:focus-visible {
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 2px;
}

.audio-toggle__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.audio-toggle__bars span {
  width: 2px;
  background: #fff;
  border-radius: 1px;
  animation: audio-bar 1.1s ease-in-out infinite;
}
.audio-toggle__bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.audio-toggle__bars span:nth-child(2) { height: 80%; animation-delay: 0.2s; }
.audio-toggle__bars span:nth-child(3) { height: 55%; animation-delay: 0.4s; }
.audio-toggle__bars span:nth-child(4) { height: 70%; animation-delay: 0.15s; }

.audio-toggle__muted { display: none; }

.audio-toggle.is-muted .audio-toggle__bars { display: none; }
.audio-toggle.is-muted .audio-toggle__muted {
  display: block;
  opacity: 0.65;
}

@keyframes audio-bar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .audio-toggle__bars span { animation: none; }
}

/* ══ LEGAL ══ */
.legal-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}
.legal-content h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.legal-content .legal-date { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); margin-bottom: 2.5rem; }
.legal-content h2 { font-size: var(--fs-h3); margin-top: 2.5rem; margin-bottom: 0.75rem; }
.legal-content p, .legal-content li { color: rgba(255,255,255,0.75); line-height: 1.65; font-size: var(--fs-sm); }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.legal-content li { margin-bottom: 0.375rem; }
.legal-content strong { color: rgba(255,255,255,0.85); }

/* ══ PAGE HEADER ══ */
.page-header {
  padding: 8rem 2rem 3rem;
  text-align: center;
}

/* ══ FAQ ══ */
.faq-list {
  max-width: 600px;
  margin: 0 auto;
}

.faq-item { border-bottom: 1px solid rgba(255,255,255,0.08); }

.faq-item__q {
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-heavy);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item__q:hover { color: #fff; }

.faq-item__icon {
  color: rgba(255,255,255,0.6);
  transition: transform 0.3s var(--ease-spring);
  flex-shrink: 0;
}
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); }

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-spring);
}
.faq-item.is-open .faq-item__a { max-height: 400px; }

.faq-item__a-inner {
  padding: 0 0 1.25rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  font-size: var(--fs-sm);
}

/* ══ ABOUT ══ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.metric-card { text-align: center; padding: 3rem 1.5rem; border-radius: 16px; }
.metric-card__number { font-size: var(--fs-section); font-weight: var(--fw-heavy); letter-spacing: -0.03em; }
.metric-card__label { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); margin-top: 0.5rem; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.team-card { text-align: center; padding: 2.5rem; }
.team-card__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: var(--fw-heavy); color: rgba(255,255,255,0.7);
}
.team-card__name { font-size: var(--fs-body); font-weight: var(--fw-heavy); }
.team-card__role { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); margin-top: 0.25rem; }

.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.value-card { padding: 1.5rem; border-radius: 16px; }
.value-card__title { font-size: var(--fs-body); font-weight: var(--fw-heavy); margin-bottom: 0.375rem; }
.value-card__desc { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); line-height: 1.65; }

/* ══ CONTACT ══ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item__icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff;
}
.contact-item__label { font-size: var(--fs-xs); color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.contact-item__value { color: rgba(255,255,255,0.85); }
.contact-item__value a { color: rgba(255,255,255,0.85); }
.contact-item__value a:hover { color: #fff; }

/* ══ RESPONSIVE ══ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .chess-row { flex-direction: column; }
  .chess-row--reverse { flex-direction: column; }
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-card { padding: 2rem; }
  .hero__partners-logos { font-size: 1.25rem; gap: 1.5rem; }
  .metrics-grid, .team-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 1rem; text-align: center; }
}
