/* ==========================================================================
   NERVAN ESTUDIO v2.0 — MINIMALISTA COMERCIAL DE AGENCIA REAL
   Header, Hero y Footer en bloque oscuro elegante (#111315)
   Cuerpo luminoso en Blanco (#FFFFFF) y Gris piedra suave (#F7F7F5)
   Tarjetas 100% estáticas: borde fijo 1px solid #E5E5E0, sin saltos en hover
   ========================================================================== */

:root {
  --bg-white: #FFFFFF;
  --bg-hover-subtle: #FAF9F6;
  --bg-gray: #F7F7F5;
  --bg-dark: #111315;
  --bg-dark-card: #161920;
  --bg-dark-elevated: #1D212A;

  --text-main: #111315;
  --text-body: #555555;
  --text-light: #777777;

  --border-card: #E5E5E0;
  --border-dark: #262B35;

  --accent: #E85D2A;
  --accent-hover: #CF4D1D;
  --gsc-blue: #3B82F6;
  --gsc-purple: #8B5CF6;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1180px;
  --header-h: 76px;
}

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

html,
body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background-color: var(--bg-white);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header,
main,
section,
footer {
  width: 100%;
  max-width: 100%;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, p, blockquote {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Flecha sutil en enlaces de texto (+3px a la derecha en hover) */
.link-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

/* ==========================================================================
   LAYOUT & SECCIONES (padding 110px 0)
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container--narrow {
  max-width: 820px;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

.section {
  padding: 110px 0;
  background-color: var(--bg-white);
}

.section--gray {
  background-color: var(--bg-gray);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

.section__head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__title {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.section__subtitle {
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--text-body);
}

@media (max-width: 768px) {
  .section {
    padding: 76px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }
}

/* ==========================================================================
   BOTONES (Sin saltos verticales)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 1rem;
}

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

.btn--primary {
  background-color: var(--accent);
  color: #FFFFFF;
}

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

.btn--ghost-dark {
  background-color: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
  border-color: var(--border-dark);
}

.btn--ghost-dark:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #454C59;
}

/* ==========================================================================
   1. HEADER EN FONDO OSCURO (#111315) CON LOGO OFICIAL
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: rgba(17, 19, 21, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-dark);
}

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

.header__brand {
  display: inline-flex;
  align-items: center;
}

.header__logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 1;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #B4B9C2;
  transition: color 0.15s ease;
}

.header__nav a:hover,
.header__nav a.is-active {
  color: #FFFFFF;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background-color: #FFFFFF;
}

@media (max-width: 860px) {
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 20px;
    display: none;
  }

  .header.is-open .header__nav {
    display: flex;
  }

  .header__nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-dark);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ==========================================================================
   2. HERO SOBRE BLOQUE OSCURO (#111315) CON CUADRÍCULA Y GRÁFICA DE FONDO
   ========================================================================== */
.hero {
  background-color: var(--bg-dark);
  color: #FFFFFF;
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero__bg-trend {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 5%, black 35%, black 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 5%, black 35%, black 82%, transparent 100%);
}

.hero__trend-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 640px;
}

.hero__kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2.4rem, 4.5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.hero__subtitle {
  margin-top: 20px;
  font-size: 1.125rem;
  color: #B4B9C2;
  line-height: 1.55;
  max-width: 580px;
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Fila inferior de 3 datos cortos en Hero */
.hero__highlights {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #B4B9C2;
}

.hero__highlights li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero__highlights li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

@media (max-width: 860px) {
  .hero {
    padding: 68px 0 56px;
  }
}

@media (max-width: 768px) {
  .hero__bg-trend,
  .hero__trend-svg {
    display: none !important;
  }
}

/* ==========================================================================
   3. SERVICIOS EN CUADRÍCULA 3x2 (TARJETAS 100% ESTÁTICAS)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.service-card {
  min-width: 0;
  background-color: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transform: none !important;
  transition: background-color 0.18s ease;
}

.service-card:hover {
  background-color: var(--bg-hover-subtle);
  border: 1px solid var(--border-card);
  transform: none !important;
}

.service-card__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #FDE5B4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.service-card__icon svg {
  width: 42px;
  height: 42px;
  display: block;
}

.service-card h3 {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
  line-height: 1.25;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.55;
}

.service-card__link {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.service-card:hover .link-arrow,
.service-card__link:hover .link-arrow {
  transform: translateX(3px);
}

@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* ==========================================================================
   4. PORTAFOLIO VISUAL EN CUADRÍCULA (3x2 — TARJETAS 100% ESTÁTICAS)
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.project-card {
  min-width: 0;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-white);
  transform: none !important;
  transition: background-color 0.18s ease;
}

.project-card:hover {
  background-color: var(--bg-hover-subtle);
  border: 1px solid var(--border-card);
  transform: none !important;
}

.project-card__media {
  height: 175px;
  background-color: var(--bg-gray);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.project-card__media img {
  max-height: 120px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.project-card__body {
  padding: 22px 24px;
}

.project-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.project-card__top h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.project-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-card:hover .link-arrow,
.project-card__link:hover .link-arrow {
  transform: translateX(3px);
}

.project-card__body p {
  font-size: 0.925rem;
  color: var(--text-body);
  line-height: 1.45;
}

.featured-review {
  margin-top: 64px;
  padding: 44px 48px;
  background-color: var(--bg-gray);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  text-align: center;
}

.featured-review p {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  max-width: 780px;
  margin: 0 auto 14px;
}

.featured-review cite {
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-body);
}

@media (max-width: 980px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-review {
    padding: 32px 20px;
  }
}

/* ==========================================================================
   5. CÓMO TRABAJAMOS (4 COLUMNAS + LÍNEA DE TECNOLOGÍAS)
   ========================================================================== */
.steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.step-item {
  min-width: 0;
  border-top: 2px solid var(--text-main);
  padding-top: 22px;
}

.step-item__num {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-item h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.step-item p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.5;
}

.tech-bar {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.tech-bar__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.tech-bar__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-bar__list li {
  background-color: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
}

@media (max-width: 960px) {
  .steps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .steps-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   6. EL EQUIPO (NOSOTROS — TARJETAS 100% ESTÁTICAS)
   ========================================================================== */
.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.team-members,
.team-values {
  min-width: 0;
}

.team-members {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.member-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  transform: none !important;
  transition: background-color 0.18s ease;
}

.member-card:hover {
  background-color: var(--bg-hover-subtle);
  border: 1px solid var(--border-card);
  transform: none !important;
}

.member-card__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.member-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.member-card__role {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
  margin-bottom: 10px;
}

.member-card p {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.5;
}

.member-card__links {
  display: flex;
  gap: 16px;
}

.member-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-card__link:hover {
  color: var(--accent);
}

.member-card__link:hover .link-arrow {
  transform: translateX(3px);
}

.team-values__lead {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--text-body);
}

.values-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.values-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.975rem;
  color: var(--text-body);
}

.values-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
}

.values-list strong {
  color: var(--text-main);
  font-weight: 700;
}

@media (max-width: 960px) {
  .team-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .team-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .member-card {
    flex-direction: column;
  }
}

/* ==========================================================================
   7A. PREGUNTAS FRECUENTES (CERRADAS POR DEFECTO)
   ========================================================================== */
.faq-list {
  border-top: 1px solid var(--border-card);
}

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

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.faq-trigger:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-panel {
  display: none;
  padding-bottom: 22px;
}

.faq-item:has(.faq-trigger[aria-expanded="true"]) .faq-panel {
  display: block;
}

.faq-panel p {
  font-size: 0.96rem;
  color: var(--text-body);
  max-width: 680px;
}

/* ==========================================================================
   7B. CONTACTO Y FOOTER OSCURO (#111315) CON LOGO OFICIAL
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: #FFFFFF;
  padding: 100px 0 40px;
  width: 100%;
  max-width: 100%;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--border-dark);
  width: 100%;
  max-width: 100%;
}

.footer__info {
  min-width: 0;
  max-width: 100%;
}

.footer__logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 1;
  margin-bottom: 22px;
}

.footer__title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.footer__lead {
  margin-top: 16px;
  font-size: 1.05rem;
  color: #B0B5BD;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.footer__contacts {
  margin-top: 36px;
  max-width: 100%;
}

.footer__mail-main {
  display: inline-block;
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  font-weight: 800;
  color: #FFFFFF;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Formulario limpio */
.contact-form {
  background-color: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 36px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 100%;
}

.form-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #D0D4DC;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea,
.contact-form button[type="submit"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #FFFFFF;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.form-error {
  display: none;
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 5px;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--accent);
}

.form-field.has-error .form-error {
  display: block;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  background-color: rgba(232, 93, 42, 0.15);
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: #FFFFFF;
}

.form-success.is-visible {
  display: block;
}

.footer__bottom {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: #888E96;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__links a:hover {
  color: #FFFFFF;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 72px 0 32px;
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-bottom: 48px;
  }

  .contact-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 16px;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .contact-form {
    padding: 20px 16px;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn {
    white-space: normal;
    text-align: center;
  }
}
