/*
Theme Name: STP Landing
Description: Tema de una sola página para Soluciones Tecnológicas Pineda.
Author: Arnol Pineda
Version: 1.0.0
Text Domain: stp-landing
*/

/* =========================================================
   Tokens de diseño
   ========================================================= */
:root {
  /* Color: paleta "cableado" — navy de sala de equipos + cobre */
  --navy-950: #0B1622;
  --navy-900: #101F30;
  --navy-800: #16273B;
  --navy-700: #1F3B57;

  --copper-500: #C1793F;
  --copper-400: #D89361;
  --copper-600: #9C5F2F;

  --paper-100: #F3EFE6;
  --paper-200: #E7E1D2;

  --ink-900: #14212E;
  --ink-700: #33475A;

  --slate-400: #8FA3B8;
  --slate-500: #6C859B;

  --signal-500: #5FB4A2;

  /* Tipografía */
  --font-display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-w: 1120px;
  --radius-sm: 4px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper-100);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.stp-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--copper-500);
  color: var(--ink-900);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 600;
}

.stp-skip-link:focus {
  left: 12px;
  top: 12px;
}

.stp-container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .stp-container {
    padding: 0 40px;
  }
}

/* Escala tipográfica */
.stp-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
}

.stp-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.02;
  margin: 0;
}

.stp-h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.1;
  margin: 0;
}

.stp-body-lg {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-700);
}

.stp-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-700);
}

/* Botones */
.stp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
}

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

.stp-btn--primary {
  background: var(--copper-500);
  color: var(--ink-900);
}

.stp-btn--primary:hover {
  background: var(--copper-400);
}

.stp-btn--ghost-dark {
  background: transparent;
  border-color: rgba(243, 239, 230, 0.35);
  color: var(--paper-100);
}

.stp-btn--ghost-dark:hover {
  border-color: var(--paper-100);
}

/* Accesibilidad: foco visible */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--copper-500);
  outline-offset: 3px;
}

/* Header */
.stp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy-950);
  border-bottom: 1px solid rgba(243, 239, 230, 0.1);
}

.stp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.stp-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper-100);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.stp-header__logo-link {
  display: flex;
  align-items: center;
}

.stp-header__logo {
  height: 32px;
  width: auto;
  display: block;
}

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

.stp-header__phone {
  display: none;
  color: var(--slate-400);
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 500;
}

.stp-header__cta {
  padding: 10px 18px;
  font-size: 0.85rem;
}

@media (min-width: 640px) {
  .stp-header__brand {
    font-size: 1.25rem;
  }
  .stp-header__phone {
    display: inline;
  }
}

/* Sección genérica: título */
.stp-section-title {
  margin-bottom: 36px;
}

/* Páginas genéricas de WordPress (page.php) */
.stp-page {
  background: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-page__title {
  color: var(--ink-900);
  margin-bottom: 32px;
}

.stp-page__thumb {
  margin-bottom: 32px;
}

.stp-page__thumb img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.stp-page__back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--copper-600);
  font-size: 0.9rem;
  text-decoration: none;
}

.stp-page__back:hover {
  text-decoration: underline;
}

.stp-page__meta {
  color: var(--slate-500);
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.stp-blog-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 72ch;
}

.stp-blog-item .stp-h3 a {
  color: var(--ink-900);
  text-decoration: none;
}

.stp-blog-item .stp-h3 a:hover {
  color: var(--copper-600);
}

.stp-page__cta {
  margin-top: 32px;
}

.stp-content {
  max-width: 72ch;
  color: var(--ink-700);
  font-size: 1.05rem;
  line-height: 1.7;
}

.stp-content p,
.stp-content ul,
.stp-content ol,
.stp-content blockquote {
  margin: 0 0 20px;
}

.stp-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  margin: 40px 0 16px;
  color: var(--ink-900);
}

.stp-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 32px 0 12px;
  color: var(--ink-900);
}

.stp-content a {
  color: var(--copper-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.stp-content blockquote {
  border-left: 3px solid var(--copper-500);
  padding-left: 20px;
  font-style: italic;
  color: var(--ink-700);
}

.stp-content ul,
.stp-content ol {
  padding-left: 22px;
}

/* Footer */
.stp-footer {
  background: var(--navy-950);
  border-top: 1px solid rgba(243, 239, 230, 0.1);
  color: var(--paper-100);
}

.stp-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.stp-footer__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper-100);
}

.stp-footer__tagline {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--slate-400);
}

.stp-footer__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper-100);
  margin: 0 0 14px;
}

.stp-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stp-footer__list a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.stp-footer__list a:hover {
  color: var(--copper-400);
}

.stp-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(243, 239, 230, 0.1);
  font-size: 0.85rem;
  color: var(--slate-400);
}

@media (min-width: 720px) {
  .stp-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* Contacto */
.stp-contact {
  background: var(--navy-950);
  color: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.stp-contact__title {
  color: var(--paper-100);
}

.stp-contact__intro {
  color: var(--slate-400);
  margin-top: 16px;
  max-width: 40ch;
}

.stp-contact__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.stp-contact__social {
  text-align: center;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(243, 239, 230, 0.15);
}

.stp-contact__social-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--slate-400);
  margin: 0 0 16px;
}

.stp-contact__icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.stp-contact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 239, 230, 0.3);
  color: var(--paper-100);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.stp-contact__icon svg {
  width: 60px;
  height: 60px;
}

.stp-contact__icon:hover,
.stp-contact__icon:focus-visible {
  border-color: var(--copper-500);
  color: var(--copper-400);
  transform: translateY(-2px);
}

/* Popup del formulario de mensaje */
.stp-modal {
  border: none;
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--navy-950);
  color: var(--paper-100);
  max-width: 480px;
  width: 90vw;
}

.stp-modal::backdrop {
  background: rgba(11, 22, 34, 0.75);
}

.stp-modal__inner {
  position: relative;
  padding: 40px 28px 28px;
}

.stp-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.stp-modal__close:hover {
  color: var(--paper-100);
}

.stp-message-form-bare {
  margin: 0;
  padding: 0;
  border: none;
}

@media (min-width: 720px) {
  .stp-contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.stp-contact__form-wrap {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(243, 239, 230, 0.15);
}

.stp-contact__form-heading {
  color: var(--paper-100);
  margin-bottom: 20px;
}

.stp-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.stp-form__row label {
  font-size: 0.85rem;
  color: var(--slate-400);
}

.stp-form__row input,
.stp-form__row textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(243, 239, 230, 0.25);
  background: rgba(243, 239, 230, 0.05);
  color: var(--paper-100);
  resize: vertical;
}

.stp-form__row input:focus-visible,
.stp-form__row textarea:focus-visible {
  outline: none;
  border-color: var(--copper-500);
}

.stp-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.stp-form-notice {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
  max-width: 480px;
}

.stp-form-notice--ok {
  background: rgba(95, 180, 162, 0.15);
  color: var(--signal-500);
  border: 1px solid var(--signal-500);
}

.stp-form-notice--error {
  background: rgba(193, 121, 63, 0.12);
  color: var(--copper-400);
  border: 1px solid var(--copper-500);
}

/* Responsabilidad social */
.stp-community {
  background: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-community__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.stp-community-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 3px solid var(--signal-500);
  padding-top: 20px;
  transition: transform 0.2s ease;
}

.stp-community-card:hover,
.stp-community-card:focus-visible {
  transform: translateY(-4px);
}

.stp-community-card__photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.stp-community-card .stp-h3 {
  margin-bottom: 8px;
}

.stp-community-card .stp-body {
  margin: 0;
}

@media (min-width: 720px) {
  .stp-community__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

/* Cómo trabajamos */
.stp-process {
  background: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-process__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
}

.stp-process__item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding-bottom: 36px;
  padding-left: 4px;
}

.stp-process__item::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 40px;
  bottom: 0;
  width: 1.5px;
  background: rgba(20, 33, 46, 0.15);
}

.stp-process__item:last-child::before {
  display: none;
}

.stp-process__item:last-child {
  padding-bottom: 0;
}

.stp-process__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--copper-500);
  line-height: 1;
}

.stp-process__item .stp-h3 {
  margin-bottom: 6px;
}

.stp-process__item .stp-body {
  margin: 0;
  max-width: 48ch;
}

/* Casos de éxito y clientes */
.stp-cases {
  background: var(--paper-200);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.stp-case {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-top: 24px;
  border-top: 1px solid rgba(20, 33, 46, 0.12);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s ease;
}

.stp-case:hover,
.stp-case:focus-visible {
  padding-left: 8px;
}

.stp-case__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--copper-500);
  flex-shrink: 0;
}

.stp-case .stp-h3 {
  margin-bottom: 8px;
}

.stp-case .stp-body {
  margin: 0;
}

@media (min-width: 720px) {
  .stp-cases__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
  }
}

/* Por qué trabajar conmigo */
.stp-whyus {
  background: var(--navy-900);
  color: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-whyus__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.stp-whyus__title {
  color: var(--paper-100);
}

.stp-whyus__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--copper-500);
  margin-bottom: 20px;
}

.stp-whyus__intro {
  color: var(--slate-400);
  margin-top: 16px;
  max-width: 42ch;
}

.stp-whyus__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stp-whyus__item {
  position: relative;
  padding-left: 32px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.stp-whyus__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 18px;
  height: 2px;
  background: var(--copper-500);
}

@media (min-width: 720px) {
  .stp-whyus__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

/* Página dedicada de Contacto */
.stp-contact-page {
  background: var(--navy-950);
  color: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 80px;
}

.stp-contact-page__title {
  color: var(--paper-100);
  margin-bottom: 20px;
}

.stp-contact-page__intro {
  color: var(--slate-400);
  max-width: 60ch;
}

.stp-contact-page__intro p {
  margin: 0 0 16px;
}

/* Servicios */
.stp-services {
  background: var(--paper-100);
  padding-top: 64px;
  padding-bottom: 64px;
}

.stp-services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.stp-service-card {
  position: relative;
  display: block;
  background: #FFFFFF;
  border: 1px solid rgba(20, 33, 46, 0.12);
  border-radius: var(--radius-sm);
  padding: 30px 26px 26px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stp-service-card:hover,
.stp-service-card:focus-visible {
  transform: scale(1.03);
  border-color: var(--copper-500);
  box-shadow: 0 14px 28px rgba(20, 33, 46, 0.12);
  z-index: 1;
}

.stp-service-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 26px;
  width: 36px;
  height: 3px;
  background: var(--copper-500);
}

.stp-service-card .stp-h3 {
  margin-bottom: 12px;
}

.stp-service-card .stp-body {
  margin: 0;
}

.stp-service-card .stp-body p {
  margin: 0 0 12px;
}

.stp-service-card .stp-body p:last-child {
  margin-bottom: 0;
}

.stp-service-card__thumb {
  margin-bottom: 16px;
}

.stp-service-card__thumb img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

@media (min-width: 720px) {
  .stp-services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* Hero */
.stp-hero {
  background: var(--navy-950);
  color: var(--paper-100);
  padding-top: 56px;
  padding-bottom: 64px;
}

.stp-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.stp-hero__title {
  color: var(--paper-100);
}

.stp-hero__subtitle {
  color: var(--slate-400);
  max-width: 46ch;
  margin-top: 20px;
}

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

.stp-hero__visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .stp-hero {
    padding-top: 72px;
    padding-bottom: 96px;
  }
  .stp-hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
  }
  .stp-hero__visual {
    justify-content: flex-end;
  }
}

/* Diagrama de red del hero: única animación orquestada de la página */
.stp-network {
  width: 100%;
  height: auto;
  max-width: 420px;
}

.stp-network__line {
  stroke: var(--slate-400);
  stroke-width: 1.5;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0.7;
  animation: stp-draw 0.7s ease-out forwards;
}

.stp-network__node {
  fill: var(--paper-100);
  stroke: var(--copper-500);
  stroke-width: 2;
  opacity: 0;
  animation: stp-pop 0.4s ease-out forwards;
}

.stp-network__hub {
  fill: var(--copper-500);
}

.stp-network__hub-ring {
  fill: none;
  stroke: var(--copper-500);
  stroke-width: 1;
  opacity: 0.35;
}

@keyframes stp-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes stp-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
    transform-origin: center;
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Motion reducido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
