/* ==========================================================================
   NOOR WEB STUDIOS — hoja de estilos
   --------------------------------------------------------------------------
   Orden del archivo:
     1. Tokens (variables)
     2. Fuentes
     3. Reset y base
     4. Layout (contenedor, secciones)
     5. Componentes
     6. Utilidades
     7. Media queries
     8. Preferencias del usuario (movimiento, impresión)
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  /* Color — superficies */
  --color-fondo: #f7fbfa;
  --color-superficie: #ffffff;
  --color-negro: #16161d;

  /* Color — texto
     Los tonos "-texto" son las variantes que cumplen contraste AA (>= 4.5:1).
     Los tonos base se reservan para rellenos, iconos y fondos. */
  --color-texto: #15151c;
  --color-gris: #5c5f6e;           /* 6.07:1 sobre --color-fondo */
  --color-gris-claro: #a3a3ab;     /* 7.19:1 sobre --color-negro */

  --color-verde: #18c68a;          /* solo relleno */
  --color-verde-texto: #0b7a53;    /* 5.35:1 sobre blanco, 4.98:1 sobre verde-suave */
  --color-verde-suave: #e8fbf4;

  --color-azul: #1687e8;           /* relleno y texto grande (>= 24px) */
  --color-azul-texto: #0d5ec7;     /* 5.85:1 sobre --color-fondo */
  --color-azul-oscuro: #0d5ec7;

  --color-borde: #e4eaee;
  --color-borde-fuerte: #dde3e8;

  /* Medidas */
  --ancho-max: 1180px;
  --gutter: 24px;
  --alto-header: 84px;

  --radio-xl: 32px;
  --radio-lg: 22px;
  --radio-md: 14px;
  --radio-pill: 999px;

  --sombra-suave: 0 20px 60px rgba(20, 30, 50, 0.08);
  --sombra-media: 0 24px 80px rgba(20, 30, 50, 0.16);
  --sombra-foco: 0 0 0 3px rgba(13, 94, 199, 0.35);

  --transicion: 0.2s ease;
}


/* ==========================================================================
   2. FUENTES
   Inter variable, autoalojada. Evita la petición a fonts.gstatic.com
   (transferencia de IP a un tercero) y elimina una dependencia externa.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   3. RESET Y BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alto-header) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top right, rgba(24, 198, 138, 0.12), transparent 34%),
    radial-gradient(circle at left center, rgba(24, 135, 232, 0.08), transparent 30%),
    var(--color-fondo);
  background-attachment: fixed;
  color: var(--color-texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* red de seguridad frente a desbordes laterales */
}

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

a {
  color: inherit;
}

ul {
  list-style: none;
}

/* Foco visible y consistente en todo lo interactivo */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-azul-texto);
  outline-offset: 3px;
  border-radius: 6px;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.contenedor {
  width: min(var(--ancho-max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.seccion {
  margin-block: 110px;
}

.section-title {
  max-width: 720px;
  margin-bottom: 42px;
}

.section-title span {
  display: block;
  color: var(--color-azul-texto);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-title h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-title > p {
  margin-top: 18px;
  color: var(--color-gris);
  font-size: 18px;
  line-height: 1.65;
  max-width: 680px;
}


/* ==========================================================================
   5. COMPONENTES
   ========================================================================== */

/* --- 5.1 Botones -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radio-pill);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: transform var(--transicion), background-color var(--transicion),
    border-color var(--transicion), color var(--transicion);
}

.btn:hover {
  transform: scale(1.04);
}

.btn:active {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

.btn--sm   { padding: 14px 24px; font-size: 15px; }
.btn--md   { padding: 17px 28px; font-size: 16px; }
.btn--lg   { padding: 19px 32px; font-size: 17px; }
.btn--full { width: 100%; }

.btn--dark {
  background: var(--color-negro);
  color: #fff;
}

.btn--dark:hover {
  background: #23232d;
}

.btn--light {
  background: #fff;
  color: var(--color-negro);
}

.btn--outline {
  background: var(--color-superficie);
  color: var(--color-texto);
  border-color: var(--color-borde);
  box-shadow: 0 14px 36px rgba(20, 30, 50, 0.06);
}

.btn--outline:hover {
  border-color: rgba(13, 94, 199, 0.4);
  color: var(--color-azul-texto);
}

/* Enlace "Ver servicios" con círculo */
.btn--ghost {
  gap: 12px;
  color: var(--color-texto);
  font-weight: 700;
  padding: 8px 0;
}

.btn--ghost .btn-icono {
  width: 44px;
  height: 44px;
  background: #eceef1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  transition: background-color var(--transicion);
}

.btn--ghost:hover .btn-icono {
  background: #e0e3e8;
}


/* --- 5.2 Header --------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 251, 250, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}

.header[data-scrolled='true'] {
  border-bottom-color: var(--color-borde);
  box-shadow: 0 6px 24px rgba(20, 30, 50, 0.05);
}

.header-inner {
  min-height: var(--alto-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-texto);
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

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

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--color-gris);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--transicion);
}

.nav a:not(.btn):hover,
.nav a:not(.btn)[aria-current='page'] {
  color: var(--color-texto);
}

/* El CTA duplicado dentro del menú solo aparece en móvil (ver media query) */
.nav .btn {
  display: none;
}

/* Botón hamburguesa — oculto en escritorio */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-md);
  background: var(--color-superficie);
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
}

.nav-toggle-barras,
.nav-toggle-barras::before,
.nav-toggle-barras::after {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-texto);
  transition: transform var(--transicion), opacity var(--transicion);
}

.nav-toggle-barras::before,
.nav-toggle-barras::after {
  content: '';
  position: absolute;
}

.nav-toggle-barras::before { transform: translateY(-6px); }
.nav-toggle-barras::after  { transform: translateY(6px); }

.nav-toggle[aria-expanded='true'] .nav-toggle-barras {
  background: transparent;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-barras::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-barras::after {
  transform: rotate(-45deg);
}


/* --- 5.3 Hero ----------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 52px;
  margin-top: 48px;
  margin-bottom: 40px;
  min-height: 620px;
}

.hero-content {
  padding-bottom: 30px;
}

.status-badge {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radio-pill);
  background: var(--color-verde-suave);
  border: 1px solid rgba(24, 198, 138, 0.28);
  color: var(--color-verde-texto);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 30px;
  animation: flotar 3s ease-in-out infinite;
}

.status-badge span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-verde);
  flex-shrink: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 850;
  text-wrap: balance;
}

h1 em {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--color-azul);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.hero-text {
  max-width: 560px;
  margin-top: 26px;
  color: var(--color-gris);
  font-size: 20px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
}

.stats {
  margin-top: 54px;
  padding-top: 32px;
  border-top: 1px solid var(--color-borde-fuerte);
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
}

.stats strong {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.stats p {
  margin-top: 4px;
  color: var(--color-gris);
  font-size: 14px;
}


/* --- 5.4 Mockup del hero ------------------------------------------------ */

.hero-visual {
  position: relative;
}

.browser-card {
  background: #171820;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--sombra-media);
  overflow: hidden;
}

.browser-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 34px;
  margin-bottom: 16px;
}

.browser-dots {
  position: absolute;
  left: 4px;
  display: flex;
  gap: 8px;
}

.browser-dots span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  color: #9aa0b5;
  background: #252733;
  border-radius: var(--radio-pill);
  padding: 8px 22px;
  font-size: 13px;
}

.mockup-content {
  height: 420px;
  border-radius: var(--radio-md);
  background:
    linear-gradient(135deg, rgba(22, 135, 232, 0.95), rgba(24, 198, 138, 0.65)),
    linear-gradient(45deg, #d9eaf6, #ffffff);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  padding: 38px;
}

.mockup-sidebar {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.mockup-main {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 34px;
}

.mockup-title {
  width: 60%;
  height: 34px;
  border-radius: var(--radio-pill);
  background: #171820;
  margin-bottom: 22px;
}

.mockup-line {
  width: 86%;
  height: 14px;
  border-radius: var(--radio-pill);
  background: #d7dce4;
  margin-bottom: 14px;
}

.mockup-line.short { width: 48%; }

.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 160px;
  margin-top: 44px;
}

.mockup-chart span {
  flex: 1;
  border-radius: var(--radio-pill) var(--radio-pill) 8px 8px;
  background: linear-gradient(180deg, var(--color-azul), var(--color-azul-oscuro));
}

.mockup-chart span:nth-child(1) { height: 45%; }
.mockup-chart span:nth-child(2) { height: 72%; }
.mockup-chart span:nth-child(3) { height: 58%; }
.mockup-chart span:nth-child(4) { height: 92%; }

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--color-borde);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--sombra-suave);
}

.floating-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.floating-card p {
  font-size: 13px;
  color: var(--color-verde-texto);
  font-weight: 700;
}

.floating-card span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-left {
  top: 130px;
  left: -30px;
  animation: flotar 3.5s ease-in-out infinite;
}

.card-left span {
  width: 38px;
  height: 38px;
  background: #eaf4ff;
  color: var(--color-azul-texto);
}

.card-right {
  right: -20px;
  bottom: 115px;
  animation: flotar 3.5s ease-in-out 1.2s infinite;
}

.card-right span {
  width: 46px;
  height: 46px;
  background: var(--color-verde);
  color: #fff;
  font-weight: 800;
}


/* --- 5.5 Tarjetas de servicio y proceso --------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: #fff;
  border-radius: var(--radio-lg);
  padding: 34px;
  box-shadow: var(--sombra-suave);
  border: 1px solid var(--color-borde);
}

.card h3 {
  font-size: 21px;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--color-gris);
  line-height: 1.6;
}

.card-precio {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-azul-texto);
}

.card-paso {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-verde-suave);
  color: var(--color-verde-texto);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 18px;
}


/* --- 5.6 Trabajos ------------------------------------------------------- */

.work-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  background: #fff;
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-xl);
  box-shadow: var(--sombra-suave);
  padding: 40px;
}

.work-shots {
  position: relative;
}

.work-shot-desktop img {
  width: 100%;
  border-radius: var(--radio-md);
  border: 1px solid var(--color-borde);
}

.work-shot-mobile {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 27%;
  max-width: 132px;
  border-radius: 14px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--sombra-media);
}

.work-shot-mobile img {
  width: 100%;
}

.work-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--color-verde-texto);
  margin-bottom: 14px;
}

.work-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-verde);
}

.work-body h3 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.work-body > p {
  color: var(--color-gris);
  line-height: 1.65;
  font-size: 17px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.work-tags li {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gris);
  background: #f1f4f6;
  border-radius: var(--radio-pill);
  padding: 7px 14px;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--color-azul-texto);
  text-decoration: none;
  border-bottom: 2px solid rgba(13, 94, 199, 0.25);
  padding-bottom: 2px;
  transition: border-color var(--transicion);
}

.work-link:hover {
  border-bottom-color: var(--color-azul-texto);
}

.work-nota {
  margin-top: 28px;
  text-align: center;
  color: var(--color-gris);
  font-size: 15px;
}


/* --- 5.7 Precios -------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  position: relative;
  background: #fff;
  border-radius: var(--radio-lg);
  padding: 36px;
  box-shadow: var(--sombra-suave);
  border: 1px solid var(--color-borde);
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100%;
}

.pricing-card--featured {
  background: var(--color-negro);
  border-color: transparent;
  box-shadow: var(--sombra-media);
  color: #fff;
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-verde);
  color: #0a3a29;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radio-pill);
  white-space: nowrap;
}

.pricing-header h3 {
  font-size: 21px;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.pricing-header p {
  color: var(--color-gris);
  font-size: 15px;
  line-height: 1.55;
}

.pricing-card--featured .pricing-header p,
.pricing-card--featured .pricing-price span {
  color: var(--color-gris-claro);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pricing-price strong {
  font-size: 44px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.pricing-price span {
  font-size: 14px;
  color: var(--color-gris);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--color-texto);
}

.pricing-card--featured .pricing-features li {
  color: rgba(255, 255, 255, 0.92);
}

.pricing-features li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-verde-suave);
  color: var(--color-verde-texto);
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pricing-card--featured .pricing-features li span {
  background: rgba(24, 198, 138, 0.22);
  color: #5ce0b0;
}

.pricing-note {
  margin-top: 34px;
  text-align: center;
  color: var(--color-gris);
  font-size: 15px;
  line-height: 1.7;
}

.pricing-note strong {
  color: var(--color-texto);
}


/* --- 5.8 FAQ ------------------------------------------------------------ */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}

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

.faq-item {
  background: var(--color-superficie);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-suave);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 70px 22px 26px;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-texto);
  position: relative;
  letter-spacing: -0.01em;
}

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

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-verde-suave);
  color: var(--color-verde-texto);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: '\2212';   /* signo menos */
}

.faq-item p {
  padding: 0 26px 24px;
  color: var(--color-gris);
  line-height: 1.65;
  font-size: 16px;
}


/* --- 5.9 Contacto y formulario ------------------------------------------ */

.contact-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(24, 198, 138, 0.16), transparent 34%),
    linear-gradient(135deg, var(--color-superficie), #f5fbff);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-xl);
  box-shadow: var(--sombra-suave);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-card::before {
  content: '';
  position: absolute;
  right: 44px;
  top: -30px;
  width: 190px;
  height: 230px;
  background: url('img/logo-noor-web-studios.png') no-repeat center / contain;
  opacity: 0.05;
  pointer-events: none;
}

.contact-intro {
  position: relative;
  z-index: 1;
}

.contact-intro .section-title {
  margin-bottom: 26px;
}

.contact-directo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--color-borde);
}

.contact-directo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-texto);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  width: fit-content;
}

.contact-directo a:hover {
  color: var(--color-azul-texto);
}

.contact-directo .icono {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eaf4ff;
  color: var(--color-azul-texto);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* Formulario */
.contact-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

.field .opcional {
  color: var(--color-gris);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 16px;   /* 16px evita el zoom automático en iOS */
  color: var(--color-texto);
  background: var(--color-superficie);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-md);
  padding: 14px 16px;
  width: 100%;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}

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

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #cfd8de;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-azul-texto);
  box-shadow: var(--sombra-foco);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #d14343;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-gris);
}

.field-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-azul-texto);
}

.field-consent a {
  color: var(--color-azul-texto);
  font-weight: 600;
}

/* Trampa antispam: invisible para personas, visible para bots */
.field-trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-aviso {
  border-radius: var(--radio-md);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.form-aviso[data-tipo='ok'] {
  background: var(--color-verde-suave);
  color: var(--color-verde-texto);
  border: 1px solid rgba(24, 198, 138, 0.3);
}

.form-aviso[data-tipo='error'] {
  background: #fdeeee;
  color: #a32b2b;
  border: 1px solid #f3c9c9;
}

.form-nota {
  font-size: 13px;
  color: var(--color-gris);
  text-align: center;
}


/* --- 5.10 Prefooter y footer -------------------------------------------- */

.prefooter {
  padding: 86px 0 70px;
  border-top: 1px solid var(--color-borde-fuerte);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
}

.prefooter-brand {
  max-width: 520px;
}

.prefooter-logo {
  margin-bottom: 24px;
}

.prefooter-brand p {
  color: var(--color-gris);
  font-size: 18px;
  line-height: 1.65;
  max-width: 540px;
}

.prefooter-socials {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

.prefooter-socials a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #eceef1;
  color: var(--color-texto);
  text-decoration: none;
  display: grid;
  place-items: center;
  transition: background-color var(--transicion), color var(--transicion),
    transform var(--transicion);
}

.prefooter-socials svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.prefooter-socials a:hover {
  background: var(--color-negro);
  color: #fff;
  transform: translateY(-2px);
}

.prefooter-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  justify-self: end;
}

.prefooter-links h3 {
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--color-texto);
}

.prefooter-links a {
  display: block;
  text-decoration: none;
  color: var(--color-gris);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 15px;
  transition: color var(--transicion);
}

.prefooter-links a:hover {
  color: var(--color-azul-texto);
}

.footer {
  padding: 32px 0;
  color: var(--color-gris);
  border-top: 1px solid var(--color-borde-fuerte);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.footer p {
  font-size: 14.5px;
  line-height: 1.5;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal a {
  color: var(--color-gris);
  text-decoration: none;
  font-size: 14.5px;
  transition: color var(--transicion);
}

.footer-legal a:hover {
  color: var(--color-texto);
  text-decoration: underline;
}


/* --- 5.11 Banner de cookies --------------------------------------------- */

.cookies {
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  display: none;
}

.cookies.visible {
  display: block;
  animation: subir 0.35s ease-out;
}

@keyframes subir {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.cookies-caja {
  width: min(760px, 100%);
  margin-inline: auto;
  background: var(--color-superficie);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-media);
  padding: 24px 26px;
}

.cookies-texto h2 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cookies-texto h2:focus {
  outline: none;
}

.cookies-texto p {
  color: var(--color-gris);
  font-size: 14.5px;
  line-height: 1.6;
}

.cookies-texto a {
  color: var(--color-azul-texto);
  font-weight: 600;
}

.cookies-opciones {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-borde);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookies-fila {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cookies-fila strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.cookies-fila p {
  color: var(--color-gris);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Interruptor */
.cookies-switch {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.cookies-switch input {
  position: absolute;
  opacity: 0;
  width: 46px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

.cookies-switch-pista {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: var(--radio-pill);
  background: #ccd3d9;
  transition: background-color var(--transicion);
}

.cookies-switch-pista::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--transicion);
}

.cookies-switch input:checked ~ .cookies-switch-pista {
  background: var(--color-verde-texto);
}

.cookies-switch input:checked ~ .cookies-switch-pista::after {
  transform: translateX(20px);
}

.cookies-switch input:disabled ~ .cookies-switch-pista {
  background: var(--color-verde-texto);
  opacity: 0.45;
  cursor: not-allowed;
}

.cookies-switch input:focus-visible ~ .cookies-switch-pista {
  outline: 2px solid var(--color-azul-texto);
  outline-offset: 3px;
}

.cookies-botones {
  display: flex;
  align-items: stretch;   /* todos los botones a la misma altura aunque el texto salte */
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* "Aceptar" y "Solo las necesarias" con el mismo peso visual:
   rechazar tiene que costar lo mismo que aceptar. */
.cookies-botones .btn {
  flex: 1 1 165px;
}

.cookies-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gris);
  cursor: pointer;
  padding: 12px 14px;
  border-radius: var(--radio-pill);
  text-decoration: underline;
}

.cookies-link:hover {
  color: var(--color-texto);
}

/* Botón "Configurar cookies" del pie: sin JS no hace nada, así que se oculta */
.footer-legal .js-config-cookies {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--color-gris);
  cursor: pointer;
  padding: 0;
  transition: color var(--transicion);
}

.footer-legal .js-config-cookies:hover {
  color: var(--color-texto);
  text-decoration: underline;
}

html:not(.js) .js-config-cookies {
  display: none;
}


/* --- 5.12 Páginas legales y de estado ----------------------------------- */

.legal {
  max-width: 760px;
  margin: 60px auto 100px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 48px);
  margin-bottom: 10px;
}

.legal-fecha {
  color: var(--color-gris);
  font-size: 15px;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
}

.legal h3 {
  font-size: 17px;
  margin: 26px 0 10px;
}

.legal p,
.legal li {
  color: var(--color-gris);
  line-height: 1.72;
  font-size: 16.5px;
}

.legal p { margin-bottom: 14px; }

.legal ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 18px;
}

.legal li { margin-bottom: 8px; }

.legal a {
  color: var(--color-azul-texto);
  font-weight: 600;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 15.5px;
}

.legal th,
.legal td {
  border: 1px solid var(--color-borde);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  color: var(--color-gris);
  line-height: 1.6;
}

.legal th {
  background: #eff4f6;
  color: var(--color-texto);
  font-weight: 700;
}

.legal .dato-pendiente {
  background: #fff4d6;
  color: #7a5a00;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
}

/* Páginas de estado: gracias, 404 */
.estado {
  max-width: 620px;
  margin: 90px auto 120px;
  text-align: center;
}

.estado-icono {
  width: 82px;
  height: 82px;
  margin: 0 auto 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  background: var(--color-verde-suave);
  color: var(--color-verde-texto);
}

.estado h1 {
  font-size: clamp(32px, 5vw, 46px);
  margin-bottom: 16px;
}

.estado p {
  color: var(--color-gris);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 30px;
}

.estado-acciones {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ==========================================================================
   6. UTILIDADES
   ========================================================================== */

/* Visible solo para lectores de pantalla */
.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Salto al contenido (aparece al tabular) */
.saltar-contenido {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--color-negro);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radio-md);
  text-decoration: none;
  font-weight: 700;
  transition: top var(--transicion);
}

.saltar-contenido:focus {
  top: 16px;
}

.oculto {
  display: none !important;
}

/* Aparición al hacer scroll.
   Se activa solo si hay JS (clase .js en <html>); sin JS todo se ve. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Entrada del hero, también condicionada a JS */
.js .hero-content,
.js .hero-visual {
  opacity: 0;
  animation: aparecer 0.9s ease-out forwards;
}

.js .hero-visual {
  animation-delay: 0.18s;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}


/* ==========================================================================
   7. MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    min-height: 0;
  }

  .hero-visual {
    max-width: 660px;
    margin-inline: auto;
    width: 100%;
  }

  .work-card {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .work-shots {
    order: 2;
  }

  .prefooter {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .prefooter-links {
    justify-self: start;
    width: 100%;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  /* --- Navegación móvil --- */
  .nav-toggle {
    display: grid;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-lg);
    box-shadow: var(--sombra-media);
  }

  .header[data-menu='abierto'] .nav {
    display: flex;
  }

  .nav a:not(.btn) {
    padding: 14px 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-texto);
    border-radius: var(--radio-md);
  }

  .nav a:not(.btn):hover {
    background: #f2f5f7;
  }

  .nav .btn {
    display: inline-flex;
    margin-top: 8px;
  }

  .header-cta {
    display: none;   /* el CTA vive dentro del menú desplegable */
  }

  /* --- Rejillas --- */
  .cards-grid,
  .pricing-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    max-width: 480px;
    margin-inline: auto;
  }

  .pricing-card--featured {
    order: -1;   /* el plan recomendado primero en móvil */
  }

  /* --- Contacto: una sola columna (esto era el desborde lateral) --- */
  .contact-card {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px;
  }

  .contact-card::before {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --alto-header: 72px;
  }

  .seccion {
    margin-block: 76px;
  }

  .logo {
    font-size: 18px;
  }

  h1 {
    font-size: clamp(34px, 9vw, 46px);
  }

  .hero-text {
    font-size: 17px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .hero-buttons .btn--ghost {
    justify-content: center;
  }

  .stats {
    gap: 22px 32px;
    margin-top: 44px;
  }

  .mockup-content {
    height: 320px;
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .mockup-sidebar,
  .floating-card {
    display: none;
  }

  .card,
  .pricing-card {
    padding: 28px 24px;
  }

  .work-card {
    padding: 24px;
    border-radius: var(--radio-lg);
  }

  .work-shot-mobile {
    width: 30%;
    right: -6px;
    bottom: -16px;
  }

  .contact-card {
    padding: 28px 22px;
    border-radius: var(--radio-lg);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .faq-item summary {
    padding: 20px 60px 20px 20px;
    font-size: 16px;
  }

  .faq-item summary::after {
    right: 18px;
  }

  .faq-item p {
    padding: 0 20px 22px;
    font-size: 15px;
  }

  .prefooter {
    padding: 64px 0 50px;
    gap: 44px;
  }

  .prefooter-brand p {
    font-size: 17px;
  }

  .prefooter-links {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .prefooter-links h3 {
    margin-bottom: 12px;
  }

  .prefooter-links a {
    margin-bottom: 10px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .cookies {
    padding: 10px;
  }

  .cookies-caja {
    padding: 22px 20px;
    max-height: 80vh;
    overflow-y: auto;
  }

  .cookies-botones .btn {
    flex: 1 1 100%;
  }

  .cookies-link {
    width: 100%;
  }

  .legal { margin-block: 40px 70px; }
  .estado { margin-block: 60px 90px; }
}


/* ==========================================================================
   8. PREFERENCIAS DEL USUARIO
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Nada debe quedarse invisible si se desactiva el movimiento */
  .js .reveal,
  .js .hero-content,
  .js .hero-visual {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .prefooter-socials a:hover {
    transform: none;
  }
}

@media print {
  .header,
  .nav-toggle,
  .hero-visual,
  .prefooter-socials,
  .contact-form,
  .saltar-contenido,
  .cookies,
  .js-config-cookies {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
