/* Franja de 4 colores */
.color-strip { display: flex; height: 6px; }
.color-strip > span { flex: 1; }
.color-strip > span:nth-child(1) { background: var(--magenta); }
.color-strip > span:nth-child(2) { background: var(--blue); }
.color-strip > span:nth-child(3) { background: var(--green); }
.color-strip > span:nth-child(4) { background: var(--orange); }

/* Barra de accesibilidad */
.a11y-bar { background: var(--ink); color: #fff; }
.a11y-bar .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-block: 8px;
}
.a11y-bar p { font-size: .9375rem; font-weight: 700; }
.a11y-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.a11y-btn {
  min-height: var(--tap); padding: 8px 18px;
  background: transparent; color: #fff; font: inherit; font-size: .9375rem; font-weight: 700;
  border: var(--border-w) solid var(--outline); border-radius: var(--radius-pill); cursor: pointer;
}
.a11y-btn:hover { background: rgba(255,255,255,.12); }
.a11y-btn[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.a11y-bar :focus-visible { outline-color: #fff; }

/* Header */
.site-header { background: var(--ground); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 32px; padding-block: 20px;
}
.logo img { width: 200px; height: auto; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 12px 16px;
  font-size: .9375rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border-bottom: 4px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--line); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--magenta); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 14px 28px; background: var(--magenta); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none;
  border: 0; border-radius: var(--radius-pill);
}
.btn:hover { background: #B00346; }

.link-arrow { color: var(--link); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.link-arrow:hover { text-decoration: underline; }

/* Secciones */
.section { padding-block: var(--section-y); }
.section--white { background: var(--white); }
.section--tight { padding-block: clamp(40px, 6vw, 64px); }
.section-title { margin-bottom: 40px; }

/* Tarjetas */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px; background: var(--ground); border-radius: var(--radius-card);
}
.card p { color: var(--ink-muted); }
:root[data-contrast="high"] .card { border: var(--border-w) solid var(--ink); }

.num-square, .icon-square {
  width: 64px; height: 64px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink);
}
.icon-square { background: none; }
.icon-square img { width: 64px; height: 64px; }

.card--wide { grid-column: 1 / -1; }

/* Tarjeta de proyecto */
.project-card {
  display: flex; flex-direction: column; background: var(--white);
  border-radius: var(--radius-project); overflow: hidden;
}
:root[data-contrast="high"] .project-card { border: var(--border-w) solid var(--ink); }
.project-card__photo {
  height: 200px; display: grid; place-items: center; padding: 24px;
}
.project-card__photo img { max-height: 100%; width: auto; max-width: 70%; }
.project-card__body { display: flex; flex-direction: column; gap: 14px; padding: 28px; flex: 1; align-items: flex-start; }
.project-card__body p { color: var(--ink-muted); flex: 1; }

/* Logos */
.logo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.logo-box {
  display: block; overflow: hidden; padding: 0;
  border-radius: var(--radius-photo);
}
.logo-box img { width: 100%; height: auto; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 8px 20px;
  border-radius: var(--radius-pill); font-weight: 700; color: var(--ink);
}
.chip--blue { background: var(--tint-blue); }
.chip--pink { background: var(--tint-pink); }
.chip--green { background: var(--tint-green); }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-cols {
  display: grid; gap: 40px; padding-block: 56px 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.footer-cols h2 { font-size: 1.125rem; letter-spacing: 0; margin-bottom: 16px; }
.footer-cols p { color: var(--ink-muted); margin-top: 16px; max-width: 34ch; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.social { display: flex; flex-wrap: wrap; gap: 12px; }
.social a {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--white); color: var(--ink);
  border: var(--border-w) solid var(--social-border); border-radius: 50%;
}
.social a:hover { background: var(--ink); color: #fff; }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-bottom { padding-block: 20px 28px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--footer-muted); }

.bg-green { background: var(--green); }
.bg-blue { background: var(--blue); }
.bg-orange { background: var(--orange); }
.bg-magenta { background: var(--magenta); }
.project-card__photo img { background: #fff; border-radius: 16px; max-width: 80%; }

/* Logos en una línea animada */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; }
.marquee__list .logo-box { flex: none; width: 190px; margin-right: 16px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sin animación: lista deslizable y sin duplicados */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee__list[aria-hidden="true"] { display: none; }
}
:root[data-reading="simple"] .marquee__track { animation: none; }
:root[data-reading="simple"] .marquee { overflow-x: auto; }
:root[data-reading="simple"] .marquee__list[aria-hidden="true"] { display: none; }

/* Menú desplegable de Proyectos */
.has-sub { position: relative; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 12px 16px;
  background: none; border: 0; border-bottom: 4px solid transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: .9375rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.nav-toggle:hover { border-bottom-color: var(--line); }
.nav-toggle.is-current { border-bottom-color: var(--magenta); }
.nav-toggle svg { transition: transform .15s; }
.has-sub.is-open .nav-toggle svg { transform: rotate(180deg); }
.main-nav .submenu {
  display: none; position: absolute; z-index: 20; top: 100%; right: 0; min-width: 280px; padding: 8px;
  background: var(--white); border-radius: 16px; box-shadow: 0 12px 32px rgba(35, 40, 43, .16);
}
:root[data-contrast="high"] .submenu { border: var(--border-w) solid var(--ink); box-shadow: none; }
.main-nav .has-sub.is-open .submenu { display: block; }
.main-nav .submenu a {
  display: flex; min-height: var(--tap); padding: 10px 16px; border-bottom: 0; border-radius: 10px;
  text-transform: uppercase; letter-spacing: .08em; font-size: .9375rem;
}
.main-nav .submenu a:hover { background: var(--ground); }
.main-nav .submenu a[aria-current="page"] { background: var(--ground); box-shadow: inset 4px 0 0 var(--magenta); }
@media (max-width: 640px) {
  .submenu { position: static; box-shadow: none; min-width: 0; padding: 0 0 0 16px; background: none; }
}
