/* ==========================================================================
   SPQR SOLUCIONES — Design System & Global Styles
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------------------- */
:root{
  /* Brand colors — derived from the SPQR isotype (institutional brick-red) */
  --spqr-red: #C1272D;
  --spqr-red-dark: #8E1B20;
  --spqr-red-darker: #601218;
  --spqr-red-light: #E3A6A8;
  --spqr-red-pale: #FBECEC;

  --spqr-dark: #191D24;      /* near-black blue-gray, headlines on dark */
  --spqr-dark-2: #23272F;
  --spqr-gray-900: #2B303A;
  --spqr-gray-700: #4B515C;
  --spqr-gray-600: #656C78;
  --spqr-gray-500: #838A96;
  --spqr-gray-300: #C6CBD3;
  --spqr-gray-200: #E1E4E9;
  --spqr-gray-100: #F0F1F4;
  --spqr-light: #F6F5F3;      /* warm-tinted light background */
  --spqr-white: #FFFFFF;

  /* Semantic */
  --color-bg: var(--spqr-white);
  --color-bg-alt: var(--spqr-light);
  --color-text: var(--spqr-dark);
  --color-text-soft: var(--spqr-gray-600);
  --color-border: var(--spqr-gray-200);

  /* Typography */
  --font-head: 'Archivo', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --fs-h1: clamp(2.25rem, 1.35rem + 3.6vw, 4.25rem);
  --fs-h2: clamp(1.85rem, 1.4rem + 1.9vw, 2.85rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  --fs-lead: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8rem;

  /* Spacing scale */
  --sp-2xs: 0.25rem;
  --sp-xs: 0.5rem;
  --sp-sm: 0.875rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;
  --sp-2xl: 6rem;
  --sp-3xl: 8.5rem;

  --section-pad-y: clamp(4rem, 3rem + 4vw, 8rem);
  --container-w: 1240px;
  --container-pad: clamp(1.25rem, 0.9rem + 1.4vw, 2.5rem);

  /* Shape & elevation */
  --radius-sm: 4px;
  --radius-md: 6px;
  --shadow-sm: 0 1px 3px rgba(25, 29, 36, 0.08);
  --shadow-md: 0 10px 30px -10px rgba(25, 29, 36, 0.18);
  --shadow-lg: 0 25px 60px -15px rgba(25, 29, 36, 0.28);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-med: 350ms;
  --dur-slow: 600ms;

  --header-h: 84px;
}

/* -------------------------------------------------------------------------
   2. RESET
   ------------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@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; }
}
body{
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
button{ font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select{ font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure{ margin: 0; }
svg{ display: block; }

::selection{ background: var(--spqr-red); color: var(--spqr-white); }

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

/* -------------------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------------------- */
h1, h2, h3, h4{
  font-family: var(--font-head);
  color: var(--spqr-dark);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 800;
}
h1{ font-size: var(--fs-h1); }
h2{ font-size: var(--fs-h2); }
h3{ font-size: var(--fs-h3); font-weight: 700; }
h4{ font-size: 1.1rem; font-weight: 700; }

.lead{ font-size: var(--fs-lead); color: var(--color-text-soft); line-height: 1.65; }

.accent{ color: var(--spqr-red); }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spqr-red);
}
.eyebrow::before{
  content: '';
  width: 28px;
  height: 2px;
  background: var(--spqr-red);
  display: inline-block;
}
.eyebrow--light{ color: var(--spqr-red-light); }
.eyebrow--light::before{ background: var(--spqr-red-light); }

.section-head{
  max-width: 720px;
  margin-bottom: var(--sp-xl);
}
.section-head > .eyebrow{ margin-bottom: var(--sp-sm); }
.section-head h2{ margin-bottom: var(--sp-md); }
.section-head--center{ margin-left: auto; margin-right: auto; text-align: center; }

.big-number{
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.75rem, 2.2rem + 2vw, 4.5rem);
  color: var(--spqr-gray-200);
  line-height: 1;
}

/* -------------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------------- */
.container{
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
section{ position: relative; }
.section-pad{ padding-block: var(--section-pad-y); }
.section-pad-top{ padding-top: var(--section-pad-y); }
.section-pad-bot{ padding-bottom: var(--section-pad-y); }

.bg-alt{ background: var(--color-bg-alt); }
.bg-dark{ background: var(--spqr-dark); color: var(--spqr-white); }
.bg-dark h2, .bg-dark h3, .bg-dark h4{ color: var(--spqr-white); }

.grid{ display: grid; gap: var(--sp-lg); }
.visually-hidden{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link{
  position: absolute; left: 1rem; top: -60px;
  background: var(--spqr-red); color: var(--spqr-white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  z-index: 999; transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus{ top: 1rem; }

/* Diagonal / geometric divider used between sections */
.divider-cut{
  position: absolute;
  left: 0; right: 0;
  height: 60px;
  overflow: hidden;
  pointer-events: none;
}
.divider-cut--top{ top: -1px; }
.divider-cut--bottom{ bottom: -1px; }
.divider-cut svg{ width: 100%; height: 100%; display: block; }

/* -------------------------------------------------------------------------
   5. BUTTONS
   ------------------------------------------------------------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem 1.7rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn svg{ width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease); }
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn--primary{ background: var(--spqr-red); color: var(--spqr-white); border-color: var(--spqr-red); }
.btn--primary:hover{ background: var(--spqr-red-dark); border-color: var(--spqr-red-dark); }

.btn--ghost{ background: transparent; color: var(--spqr-dark); border-color: var(--spqr-gray-300); }
.btn--ghost:hover{ border-color: var(--spqr-dark); }

.btn--on-dark{ background: transparent; color: var(--spqr-white); border-color: rgba(255,255,255,0.45); }
.btn--on-dark:hover{ border-color: var(--spqr-white); background: rgba(255,255,255,0.08); }

.btn--white{ background: var(--spqr-white); color: var(--spqr-dark); border-color: var(--spqr-white); }
.btn--white:hover{ background: var(--spqr-light); }

.btn:hover svg{ transform: translateX(3px); }

.text-link{
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; color: var(--spqr-red);
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease);
}
.text-link:hover{ border-color: var(--spqr-red); }
.text-link svg{ width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease); }
.text-link:hover svg{ transform: translateX(3px); }

/* -------------------------------------------------------------------------
   6. HEADER / NAV
   ------------------------------------------------------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--spqr-white);
  transition: box-shadow var(--dur-med) var(--ease), height var(--dur-med) var(--ease);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  height: 100%;
}
.site-header.is-scrolled{
  box-shadow: var(--shadow-sm);
  height: 72px;
}

.brand{ display: flex; align-items: center; gap: 0.7rem; }
.brand img{ height: 40px; width: auto; }
.brand__text{ display: flex; flex-direction: column; line-height: 1.05; }
.brand__name{ font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--spqr-dark); letter-spacing: 0.01em; }
.brand__tag{ font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--spqr-gray-600); font-weight: 600; }

.nav-desktop{ display: none; }
.nav-desktop ul{ display: flex; align-items: center; gap: var(--sp-lg); }
.nav-link{
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--spqr-dark);
  padding: 0.4rem 0.1rem;
  transition: color var(--dur-fast) var(--ease);
}
.nav-link::after{
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--spqr-red);
  transition: width var(--dur-fast) var(--ease);
}
.nav-link:hover{ color: var(--spqr-red); }
.nav-link:hover::after, .nav-link.is-active::after{ width: 100%; }

.header-actions{ display: flex; align-items: center; gap: var(--sp-md); }
.header-actions .btn--primary{ display: none; }

.hamburger{
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; align-items: center; z-index: 950;
}
.hamburger span{
  width: 24px; height: 2px; background: var(--spqr-dark);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav{
  position: fixed; inset: 0; z-index: 940;
  background: var(--spqr-white);
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 1rem) var(--container-pad) 2.5rem;
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
  overflow-y: auto;
}
.mobile-nav.is-open{ transform: translateX(0); }
.mobile-nav ul{ display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav .nav-link{
  font-size: 1.5rem; font-family: var(--font-head); font-weight: 700;
  padding: 0.85rem 0; border-bottom: 1px solid var(--color-border);
}
.mobile-nav .header-actions{ margin-top: var(--sp-lg); flex-direction: column; align-items: stretch; }
.mobile-nav .header-actions .btn{ justify-content: center; }
.mobile-nav .header-actions .btn--primary{ display: inline-flex; }

body.nav-open{ overflow: hidden; }

@media (min-width: 960px){
  .nav-desktop{ display: block; }
  .hamburger{ display: none; }
  .mobile-nav{ display: none; }
  .header-actions .btn--primary{ display: inline-flex; }
}

/* -------------------------------------------------------------------------
   7. HERO — split composition: dark text panel + photo, red divider
   ------------------------------------------------------------------------- */
.hero{
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--spqr-dark);
}
.hero__panel{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--spqr-white);
  background: linear-gradient(155deg, var(--spqr-dark) 0%, var(--spqr-dark-2) 100%);
  padding: clamp(2.75rem, 5vw, 4.5rem) var(--container-pad);
  border-bottom: 4px solid var(--spqr-red);
}
.hero__media{
  position: relative;
  min-height: 280px;
  overflow: hidden;
}
.hero__media img{
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero__media::after{
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15,16,20,0.05) 0%, rgba(15,16,20,0.3) 100%);
}

/* Infinite auto-advancing photo banner (home hero only) */
.hero__media .hero-slide{
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero__media .hero-slide.is-active{ opacity: 1; }
.hero__title{
  color: var(--spqr-white);
  margin-bottom: var(--sp-sm);
}
.hero__title em{ font-style: normal; color: var(--spqr-red-light); }
.hero__text{
  font-size: var(--fs-lead);
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--sp-lg);
}
.hero__actions{ display: flex; flex-wrap: wrap; gap: 1rem; }

@media (min-width: 900px){
  .hero{ grid-template-columns: minmax(420px, 44%) 1fr; min-height: calc(100vh - var(--header-h)); }
  .hero__panel{
    border-bottom: none;
    border-right: 4px solid var(--spqr-red);
    padding-right: clamp(2.5rem, 4vw, 4rem);
  }
  .hero__media{ min-height: 0; }
}

/* Page hero (interior pages) — shorter variant */
.page-hero{
  position: relative;
  min-height: 46vh;
  display: flex; align-items: flex-end;
  color: var(--spqr-white);
  overflow: hidden;
  background: var(--spqr-dark);
}
.page-hero__content{
  position: relative; z-index: 2;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 780px;
}
.page-hero__content h1{ color: var(--spqr-white); margin-bottom: var(--sp-sm); }
.page-hero__content p{ color: rgba(255,255,255,0.85); font-size: var(--fs-lead); max-width: 620px; }

/* Mobile: text sits on top of the background photo (home + interior banners) */
@media (max-width: 899px){
  /* Home hero: panel and slider share the same grid cell */
  .hero{
    grid-template-areas: "stack";
    min-height: calc(100svh - var(--header-h));
    border-bottom: 4px solid var(--spqr-red);
  }
  .hero__panel,
  .hero__media{ grid-area: stack; }
  .hero__media{ min-height: 0; }
  .hero__panel{
    justify-content: flex-end;
    background: none;
    border-bottom: none;
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }

  /* Interior banners: photo fills the whole banner behind the text */
  .page-hero{ min-height: 62svh; }
  .page-hero .hero__media{
    position: absolute; inset: 0;
    min-height: 0;
  }
  .page-hero .hero__media img{ position: absolute; inset: 0; }

  /* Darker overlay so the text stays readable over any photo */
  .hero__media::after{
    background: linear-gradient(180deg,
      rgba(15,16,20,0.35) 0%,
      rgba(15,16,20,0.55) 45%,
      rgba(15,16,20,0.92) 100%);
  }

  .hero__title,
  .hero__text,
  .page-hero__content h1,
  .page-hero__content p{ text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
}

/* -------------------------------------------------------------------------
   8. INTRO SECTION
   ------------------------------------------------------------------------- */
.intro{
  display: grid;
  gap: var(--sp-2xl);
  align-items: center;
}
.intro__media{
  position: relative;
}
.intro__media img{
  width: 100%; height: clamp(320px, 40vw, 480px); object-fit: cover;
}
.intro__media::before{
  content: '';
  position: absolute; left: -14px; top: -14px;
  width: 100px; height: 100px;
  border-top: 4px solid var(--spqr-red);
  border-left: 4px solid var(--spqr-red);
  z-index: 1;
}
.intro__media::after{
  content: '';
  position: absolute; right: -14px; bottom: -14px;
  width: 100px; height: 100px;
  border-bottom: 4px solid var(--spqr-red);
  border-right: 4px solid var(--spqr-red);
  z-index: 1;
}
.intro__list{ margin-top: var(--sp-lg); display: grid; gap: 1rem; }
.intro__list li{ display: flex; gap: 0.85rem; align-items: flex-start; }
.intro__list svg{ width: 20px; height: 20px; flex-shrink: 0; color: var(--spqr-gray-700); margin-top: 3px; }
.intro__list strong{ font-family: var(--font-head); display: block; font-size: 0.98rem; }
.intro__list span{ color: var(--color-text-soft); font-size: 0.92rem; }

/* -------------------------------------------------------------------------
   9. SERVICIOS
   ------------------------------------------------------------------------- */
.services-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.service-card{
  position: relative;
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 1.5rem;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  overflow: hidden;
}
.service-card::before{
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--spqr-red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-med) var(--ease);
}
.service-card:hover, .service-card.is-open{
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card:hover::before, .service-card.is-open::before{ transform: scaleY(1); }
.service-card__num{
  font-family: var(--font-head); font-weight: 800;
  font-size: 2.4rem; color: var(--spqr-gray-200);
  line-height: 1;
}
.service-card__body h3{ margin-bottom: 0.4rem; }
.service-card__body p{ color: var(--color-text-soft); font-size: 0.95rem; }
.service-card__toggle{
  width: 40px; height: 40px; border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--ease);
}
.service-card__toggle svg{ width: 18px; height: 18px; transition: transform var(--dur-med) var(--ease); }
.service-card.is-open .service-card__toggle{ background: var(--spqr-red); border-color: var(--spqr-red); color: var(--spqr-white); transform: rotate(45deg); }
.service-card__panel{
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease);
}
.service-card.is-open .service-card__panel{ grid-template-rows: 1fr; }
.service-card__panel-inner{ overflow: hidden; }
.service-card__list{
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.service-card__list li{
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: var(--spqr-gray-700);
}
.service-card__list li::before{
  content: '';
  position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; background: var(--spqr-red);
}
.service-card__link{ margin-top: 1.25rem; }

/* -------------------------------------------------------------------------
   10. COMO TRABAJAMOS (proceso)
   ------------------------------------------------------------------------- */
.process{
  display: grid;
  gap: 2rem;
}
.process__step{
  position: relative;
  padding: 2rem 1.75rem;
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
}
.process__num{
  font-family: var(--font-head); font-weight: 800; font-size: 1rem;
  color: var(--spqr-white); background: var(--spqr-red);
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.process__step h3{ font-size: 1.05rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.02em; }
.process__step p{ color: var(--color-text-soft); font-size: 0.9rem; }
.process__arrow{
  display: none;
  align-items: center; justify-content: center;
  color: var(--spqr-gray-300);
}
.process__arrow svg{ width: 26px; height: 26px; }

@media (min-width: 860px){
  .process{
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: stretch;
  }
  .process__arrow{ display: flex; }
}

/* -------------------------------------------------------------------------
   11. NOSOTROS
   ------------------------------------------------------------------------- */
.about{
  display: grid;
  gap: var(--sp-2xl);
  align-items: center;
}
.about__media{ position: relative; }
.about__media img{ width: 100%; height: clamp(340px, 42vw, 520px); object-fit: cover; }
.about__badge{
  position: absolute; left: -1.25rem; bottom: -1.25rem;
  background: var(--spqr-dark); color: var(--spqr-white);
  padding: 1.5rem 1.75rem;
  max-width: 260px;
  border-left: 4px solid var(--spqr-red);
  box-shadow: var(--shadow-lg);
}
.about__badge strong{ font-family: var(--font-head); display: block; font-size: 1.5rem; color: var(--spqr-red-light); margin-bottom: 0.25rem; }
.about__badge span{ font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.about__traits{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: var(--sp-lg);
}
.trait{
  padding: 1rem 1.1rem;
  background: var(--spqr-light);
  border-left: 3px solid var(--spqr-red);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
}

/* -------------------------------------------------------------------------
   12. RED SPQR
   ------------------------------------------------------------------------- */
.network{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.network-card{
  padding: 2.25rem;
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
  position: relative;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.network-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-4px); }
.network-card__icon{
  width: 54px; height: 54px;
  background: var(--spqr-gray-100);
  color: var(--spqr-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.network-card:hover .network-card__icon{ background: var(--spqr-red); color: var(--spqr-white); }
.network-card__icon svg{ width: 26px; height: 26px; }
.network-card h3{ margin-bottom: 0.75rem; }
.network-card p{ color: var(--color-text-soft); font-size: 0.95rem; margin-bottom: 1rem; }
.network-card ul{ display: grid; gap: 0.5rem; }
.network-card ul li{ font-size: 0.88rem; color: var(--spqr-gray-700); padding-left: 1rem; position: relative; }
.network-card ul li::before{ content: '—'; position: absolute; left: 0; color: var(--spqr-red); }
.network-cta{
  margin-top: 2rem;
  padding: 2.5rem;
  background: var(--spqr-dark);
  color: var(--spqr-white);
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}
.network-cta p{ color: rgba(255,255,255,0.75); max-width: 460px; font-size: 0.95rem; }
.network-cta h3{ color: var(--spqr-white); margin-bottom: 0.5rem; }

/* -------------------------------------------------------------------------
   13. PUBLICACIONES
   ------------------------------------------------------------------------- */
.pub-note{
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spqr-gray-600);
  background: var(--spqr-gray-100);
  padding: 0.3rem 0.7rem;
  margin-bottom: var(--sp-lg);
}
.pub-grid{
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
.pub-card{
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.pub-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-4px); }
.pub-card__media{ position: relative; aspect-ratio: 4/3; overflow: hidden; }
.pub-card__media img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.pub-card:hover .pub-card__media img{ transform: scale(1.06); }
.pub-card__tag{
  position: absolute; left: 0.9rem; top: 0.9rem;
  background: var(--spqr-red); color: var(--spqr-white);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.35rem 0.65rem;
}
.pub-card__body{ padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.pub-card__date{ font-size: 0.8rem; color: var(--spqr-gray-500); font-weight: 600; }
.pub-card__body h3{ font-size: 1.1rem; }
.pub-card__body p{ font-size: 0.9rem; color: var(--color-text-soft); flex: 1; }
.pub-card__body .text-link{ margin-top: 0.5rem; }

.pub-resource{
  margin-top: var(--sp-xl);
  padding: 2.5rem;
  border: 1.5px dashed var(--spqr-gray-300);
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between;
}
.pub-resource h3{ margin-bottom: 0.4rem; }
.pub-resource p{ color: var(--color-text-soft); font-size: 0.92rem; max-width: 480px; }

/* -------------------------------------------------------------------------
   14. ALIADOS
   ------------------------------------------------------------------------- */
.ally-feature{
  display: grid;
  gap: var(--sp-xl);
  align-items: center;
  background: var(--spqr-dark);
  color: var(--spqr-white);
  padding: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.ally-feature::before{
  content: '';
  position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: var(--spqr-red); opacity: 0.15;
  clip-path: polygon(20% 0, 100% 0, 100% 80%);
}
.ally-feature__logo{
  font-family: var(--font-head); font-weight: 800; font-size: 2.1rem;
  color: var(--spqr-white);
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: 2px solid var(--spqr-red-light);
  padding: 0.6rem 1.1rem;
  margin-bottom: 1.25rem;
}
.ally-feature h3{ color: var(--spqr-white); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--spqr-red-light); margin-bottom: 0.75rem; }
.ally-feature p{ color: rgba(255,255,255,0.82); margin-bottom: 1rem; }
.ally-feature__tags{ display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ally-feature__tags span{
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.35rem 0.75rem;
}

.allies-grid{
  margin-top: var(--sp-xl);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, 1fr);
}
.ally-slot{
  border: 1px dashed var(--spqr-gray-300);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start;
  min-height: 160px;
  justify-content: center;
  color: var(--spqr-gray-500);
}
.ally-slot__mark{
  width: 44px; height: 44px;
  border: 1.5px dashed var(--spqr-gray-300);
  display: flex; align-items: center; justify-content: center;
}
.ally-slot__mark svg{ width: 20px; height: 20px; }
.ally-feature__logo img{ display: block; max-height: 64px; width: auto; }

/* Aliado real (no espacio vacío) */
.ally-slot--filled{
  border-style: solid;
  border-color: var(--spqr-gray-300);
  color: var(--color-text);
  background: var(--spqr-white);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
a.ally-slot--filled:hover{ border-color: var(--spqr-red); }
.ally-slot--filled .ally-slot__mark{
  width: auto; min-width: 44px; height: 52px;
  border: none;
  justify-content: flex-start;
}
.ally-slot--filled .ally-slot__mark img{ max-height: 52px; max-width: 140px; object-fit: contain; }
.ally-slot--filled .ally-slot__mark strong{ font-family: var(--font-head); font-size: 1.3rem; color: var(--spqr-red); }
.ally-slot--filled small{ color: var(--spqr-gray-500); }

/* Detalle de publicación */
.article-body{ max-width: 760px; }
.article-body p{ font-size: 1.05rem; line-height: 1.8; color: var(--color-text); margin-bottom: 1.25rem; }
.article-body .btn{ margin-top: 0.5rem; }
.article-figure{ margin: 0 0 var(--sp-lg); }
.article-figure img{ display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; }

/* Botón "Visitar sitio web" de aliados */
.ally-btn{ margin-top: 1rem; }
.ally-slot--filled .ally-btn{ margin-top: 0.4rem; padding: 0.55rem 1rem; font-size: 0.82rem; }
.ally-feature__actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1rem; }
/* Fondo blanco para que cualquier logo se vea sobre el bloque oscuro */
.ally-feature__logo:has(img){ background: var(--spqr-white); border-color: var(--spqr-white); }
.ally-feature__logo img{ max-width: 220px; object-fit: contain; }
.ally-slot span{ font-size: 0.85rem; font-weight: 600; }
.ally-slot small{ font-size: 0.78rem; }

/* -------------------------------------------------------------------------
   15. CTA BANNER
   ------------------------------------------------------------------------- */
.cta-banner{
  position: relative;
  padding-block: clamp(4rem, 6vw, 7rem);
  color: var(--spqr-white);
  overflow: hidden;
}
.cta-banner__media{ position: absolute; inset: 0; }
.cta-banner__media img{ width: 100%; height: 100%; object-fit: cover; }
.cta-banner__media::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,16,20,0.92) 10%, rgba(140,25,30,0.55) 100%);
}
.cta-banner__content{ position: relative; z-index: 2; max-width: 640px; }
.cta-banner h2{ color: var(--spqr-white); margin-bottom: 1rem; }
.cta-banner p{ color: rgba(255,255,255,0.85); font-size: var(--fs-lead); margin-bottom: 2rem; }
.cta-banner__actions{ display: flex; flex-wrap: wrap; gap: 1rem; }

/* -------------------------------------------------------------------------
   16. CONTACTO / FORM
   ------------------------------------------------------------------------- */
.contact-grid{
  display: grid;
  gap: var(--sp-2xl);
}
.contact-info{ display: flex; flex-direction: column; gap: 1.75rem; }
.contact-channel{
  display: flex; gap: 1rem; align-items: flex-start;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border);
}
.contact-channel__icon{
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--spqr-gray-100); color: var(--spqr-dark);
  display: flex; align-items: center; justify-content: center;
}
.contact-channel__icon--brand{ color: var(--spqr-red); }
.contact-channel__icon svg{ width: 22px; height: 22px; }
.contact-channel h4{ margin-bottom: 0.2rem; }
.contact-channel p{ font-size: 0.9rem; color: var(--color-text-soft); }
.contact-channel a{ font-weight: 600; color: var(--spqr-dark); }
.contact-channel a:hover{ color: var(--spqr-red); }
.pending-tag{
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--spqr-gray-500); background: var(--spqr-gray-100);
  padding: 0.2rem 0.55rem; margin-top: 0.3rem;
}

.contact-form{
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.form-row{ display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.form-row--2{ grid-template-columns: 1fr; }
.field{ display: flex; flex-direction: column; gap: 0.4rem; }
.field label{ font-size: 0.85rem; font-weight: 700; color: var(--spqr-dark); }
.field label .req{ color: var(--spqr-red); }
.field input, .field select, .field textarea{
  border: 1.5px solid var(--spqr-gray-200);
  padding: 0.8rem 0.9rem;
  background: var(--spqr-light);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--spqr-red);
  background: var(--spqr-white);
  outline: none;
}
.field textarea{ resize: vertical; min-height: 120px; }
.field.has-error input, .field.has-error select, .field.has-error textarea{
  border-color: var(--spqr-red);
  background: var(--spqr-red-pale);
}
.field__error{
  font-size: 0.8rem; color: var(--spqr-red-dark); font-weight: 600;
  display: none; align-items: center; gap: 0.35rem;
}
.field.has-error .field__error{ display: flex; }

.field-check{
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.85rem; color: var(--color-text-soft);
  margin-bottom: 1.5rem;
}
.field-check input{ margin-top: 0.25rem; accent-color: var(--spqr-red); width: 16px; height: 16px; flex-shrink: 0; }

.form-submit{ display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.form-status{ font-size: 0.9rem; font-weight: 600; display: none; align-items: center; gap: 0.5rem; }
.form-status svg{ width: 18px; height: 18px; }
.form-status.is-success{ display: flex; color: #1D7A44; }
.form-status.is-error{ display: flex; color: var(--spqr-red-dark); }

@media (min-width: 640px){
  .form-row--2{ grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------------------------
   17. FOOTER
   ------------------------------------------------------------------------- */
.site-footer{
  background: var(--spqr-dark);
  color: rgba(255,255,255,0.75);
  padding-top: var(--sp-2xl);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl) var(--sp-lg);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-col{ min-width: 0; }
.footer-brand{ display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.1rem; }
.footer-brand img{ height: 40px; background: var(--spqr-white); padding: 0.35rem 0.55rem; }
.footer-brand span{ font-family: var(--font-head); font-weight: 800; color: var(--spqr-white); font-size: 1.05rem; }
.footer-col p{ font-size: 0.9rem; max-width: 300px; line-height: 1.7; }
.footer-col h4{ color: var(--spqr-white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.1rem; }
.footer-col ul{ display: grid; gap: 0.65rem; }
.footer-col a{ font-size: 0.92rem; transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover{ color: var(--spqr-white); }
.footer-social{ display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.footer-social a{
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-social a:hover{ background: var(--spqr-red); border-color: var(--spqr-red); }
.footer-social svg{ width: 17px; height: 17px; }

.footer-bottom{
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding-block: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom a:hover{ color: var(--spqr-white); }

/* -------------------------------------------------------------------------
   18. BACK TO TOP + REVEAL ANIMATIONS
   ------------------------------------------------------------------------- */
.back-to-top{
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 500;
  width: 46px; height: 46px;
  background: var(--spqr-dark); color: var(--spqr-white);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover{ background: var(--spqr-red); }
.back-to-top svg{ width: 20px; height: 20px; }

[data-reveal]{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible{ opacity: 1; transform: translateY(0); }
[data-reveal-group] > *{ transition-delay: calc(var(--reveal-i, 0) * 80ms); }

/* -------------------------------------------------------------------------
   19. MISC PAGE ELEMENTS (breadcrumb, tags)
   ------------------------------------------------------------------------- */
.breadcrumb{
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.65);
  margin-bottom: 1rem;
}
.breadcrumb a:hover{ color: var(--spqr-white); }
.breadcrumb svg{ width: 14px; height: 14px; }

.filter-bar{
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-bottom: var(--sp-xl);
}
.filter-chip{
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--color-border);
  font-size: 0.85rem; font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.filter-chip.is-active, .filter-chip:hover{
  border-color: var(--spqr-red); background: var(--spqr-red); color: var(--spqr-white);
}

/* -------------------------------------------------------------------------
   20a. SERVICE PREVIEW GRID (home teaser -> links to servicios.html)
   ------------------------------------------------------------------------- */
.service-preview-grid{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.service-preview-card{
  position: relative;
  display: block;
  background: var(--spqr-white);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.service-preview-card::before{
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--spqr-red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-med) var(--ease);
}
.service-preview-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.service-preview-card:hover::before{ transform: scaleY(1); }
.service-preview-card__num{
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.9rem; color: var(--spqr-gray-200); line-height: 1;
  display: block; margin-bottom: 0.75rem;
}
.service-preview-card h3{ font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-preview-card p{ font-size: 0.9rem; color: var(--color-text-soft); margin-bottom: 1.1rem; }
.service-preview-card .text-link{ font-size: 0.88rem; }

/* -------------------------------------------------------------------------
   20b. TEASER CARD (Nosotros / Aliados condensed blocks on the homepage)
   ------------------------------------------------------------------------- */
.teaser{
  display: grid;
  gap: var(--sp-2xl);
  align-items: center;
}
.teaser__media{ position: relative; }
.teaser__media img{ width: 100%; height: clamp(300px, 38vw, 440px); object-fit: cover; }
.teaser__badge{
  position: absolute; left: -1.1rem; bottom: -1.1rem;
  background: var(--spqr-dark); color: var(--spqr-white);
  padding: 1.1rem 1.4rem;
  max-width: 240px;
  border-left: 4px solid var(--spqr-red);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
}

/* -------------------------------------------------------------------------
   20c. TOAST (lightweight feedback for "pending configuration" actions)
   ------------------------------------------------------------------------- */
.toast{
  position: fixed;
  left: 50%; bottom: 1.75rem;
  transform: translate(-50%, 12px);
  background: var(--spqr-dark); color: var(--spqr-white);
  padding: 0.85rem 1.4rem;
  font-size: 0.88rem; font-weight: 600;
  border-left: 3px solid var(--spqr-red);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  z-index: 1100;
  max-width: min(92vw, 420px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast);
}
.toast.is-visible{ opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* -------------------------------------------------------------------------
   20d. FLOATING WHATSAPP BUTTON
   ------------------------------------------------------------------------- */
.whatsapp-float{
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  z-index: 500;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366; color: var(--spqr-white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.whatsapp-float:hover{ transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.whatsapp-float svg{ width: 28px; height: 28px; }

/* -------------------------------------------------------------------------
   20. RESPONSIVE — mid / large breakpoints
   ------------------------------------------------------------------------- */
@media (min-width: 640px){
  .about__traits{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px){
  .footer-grid{ grid-template-columns: minmax(220px, 1.3fr) repeat(3, 1fr); }
}

@media (min-width: 760px){
  .services-grid{ grid-template-columns: 1fr; }
  .service-preview-grid{ grid-template-columns: repeat(2, 1fr); }
  .pub-grid{ grid-template-columns: repeat(2, 1fr); }
  .network{ grid-template-columns: repeat(2, 1fr); }
}


@media (min-width: 900px){
  .intro{ grid-template-columns: 0.9fr 1.1fr; }
  .about{ grid-template-columns: 1fr 1fr; }
  .about__media{ order: 2; }
  .teaser{ grid-template-columns: 1fr 1fr; }
  .teaser--media-right .teaser__media{ order: 2; }
  .contact-grid{ grid-template-columns: 0.85fr 1.15fr; }
}

@media (min-width: 1080px){
  .service-preview-grid{ grid-template-columns: repeat(3, 1fr); }
  .pub-grid{ grid-template-columns: repeat(3, 1fr); }
  .network{ grid-template-columns: repeat(3, 1fr); }
  .allies-grid{ grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 599px){
  .allies-grid{ grid-template-columns: 1fr; }
  .hero__actions .btn, .cta-banner__actions .btn{ width: 100%; justify-content: center; }
}
