/*
  ============================================================
  SOCIVOX — COMPONENTS.CSS
  ============================================================
  Header, botones, cards, footer, formularios y elementos repetidos.
*/

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color var(--transition), background var(--transition);
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  line-height: 1;
}

.brand-copy strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.brand-copy span {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 11px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--nav-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 5px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-open span { opacity: 0; }
.menu-toggle.is-open::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open::after { transform: translateY(-6px) rotate(-45deg); }

/* BUTTONS */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 14px 34px rgba(124,58,237,0.28);
}

.btn--secondary {
  background: var(--chip-bg);
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost {
  min-height: 42px;
  padding-inline: 13px;
  background: transparent;
  color: var(--text-soft);
}

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

.arrow {
  transition: transform var(--transition);
}

a:hover .arrow,
button:hover .arrow {
  transform: translateX(4px);
}

/* HEADINGS */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 50px;
}

.section-heading__copy {
  max-width: 760px;
}

.section-heading__copy p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 18px;
  color: var(--text-soft);
}

/* CARDS */
.card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -90px;
  top: -100px;
  background: var(--primary);
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.13;
  pointer-events: none;
}

.icon-box {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--accent);
  font-weight: 900;
}

.card p {
  margin-top: 12px;
  color: var(--text-soft);
}

.card-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 22px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

/* CHIPS / TAGS */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* PAGE HERO */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 78px;
  border-bottom: 1px solid var(--line);
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -260px;
  right: -150px;
  border-radius: 50%;
  background: rgba(124,58,237,0.22);
  filter: blur(90px);
  pointer-events: none;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(3rem, 7vw, 6rem);
}

.page-hero .lead {
  margin-top: 24px;
}

.page-hero .chips {
  margin-top: 30px;
}

/* PROJECT CARDS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(168,85,247,0.45);
}

.project-shot {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-shot img {
  transform: scale(1.025);
}

.project-body {
  padding: 26px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-body p {
  margin-top: 12px;
  color: var(--text-soft);
}

/* CTA */
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid rgba(216,180,254,0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(168,85,247,0.28), transparent 34%),
    linear-gradient(135deg, var(--cta-bg-1), var(--cta-bg-2));
}

.cta-panel h2 {
  max-width: 850px;
}

.cta-panel p {
  max-width: 690px;
  margin-top: 20px;
  color: var(--text-soft);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* FAQ */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  padding: 23px 42px 23px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 19px;
  color: var(--accent);
  font-size: 1.5rem;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  max-width: 800px;
  padding: 0 0 24px;
  color: var(--text-soft);
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: var(--field-bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(168,85,247,0.62);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.10);
}

.field option {
  background: var(--surface);
  color: var(--text);
}

.form-note {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* FOOTER */
.site-footer {
  padding: 72px 0 28px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 44px;
}

.footer-brand p {
  max-width: 360px;
  margin-top: 18px;
  color: var(--muted);
}

.footer-title {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
