/* Villanova Services — corporate minimal, black & white */

:root {
  --black: #0a0a0a;
  --ink: #141414;
  --grey-900: #1c1c1c;
  --grey-600: #555555;
  --grey-400: #8a8a8a;
  --grey-200: #e4e4e4;
  --grey-100: #f4f4f4;
  --white: #ffffff;
  --max: 1140px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --font: "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--black);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; color: var(--grey-900); }

a { color: var(--black); text-decoration: none; }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey-400);
  margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid var(--black);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn--solid { background: var(--black); color: var(--white); }
.btn--solid:hover { background: var(--white); color: var(--black); }
.btn--ghost { background: transparent; color: var(--black); }
.btn--ghost:hover { background: var(--black); color: var(--white); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--black); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--grey-200);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--black);
}
.brand span { font-weight: 400; color: var(--grey-600); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grey-900);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav a:hover,
.nav a.active { color: var(--black); border-color: var(--black); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.open { max-height: 420px; }
  .nav li { border-top: 1px solid var(--grey-100); }
  .nav a { display: block; padding: 1rem var(--pad); border: 0; }
}

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: var(--grey-200); }
.section--grey { background: var(--grey-100); }

.lead { font-size: 1.2rem; color: var(--grey-900); max-width: 60ch; }

/* ---------- Hero ---------- */
.hero {
  background: var(--black);
  color: var(--white);
  padding: clamp(4.5rem, 12vw, 8rem) 0;
}
.hero .eyebrow { color: var(--grey-400); }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero p { color: var(--grey-200); font-size: 1.2rem; max-width: 52ch; }
.hero .actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: var(--black);
  color: var(--white);
  padding: clamp(3rem, 8vw, 5rem) 0;
}
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header p { color: var(--grey-200); max-width: 60ch; margin: 0; }

/* ---------- Grid cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  border: 1px solid var(--grey-200);
  padding: 2rem 1.75rem;
  background: var(--white);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--black); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; color: var(--grey-600); font-size: 0.96rem; }

/* ---------- Feature list ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.features li { padding-left: 1.75rem; position: relative; }
.features li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 10px;
  background: currentColor;
}
.features strong { display: block; }

/* ---------- Service blocks ---------- */
.service {
  padding: 2.25rem 0;
  border-top: 1px solid var(--grey-200);
}
.service:first-child { border-top: 0; }
.service h3 { margin-bottom: 0.4rem; }
.service p { margin: 0; max-width: 65ch; }

/* ---------- Tag row ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.tag {
  border: 1px solid var(--grey-400);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-900);
}
.section--dark .tag { border-color: var(--grey-600); color: var(--white); }

/* ---------- Split ---------- */
.split { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.gallery figure { margin: 0; border: 1px solid var(--grey-200); transition: border-color 0.2s; }
.gallery img {
  width: 100%; height: 240px; object-fit: cover; background: var(--grey-100);
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.gallery figcaption { padding: 0.85rem 1rem; font-size: 0.85rem; color: var(--grey-600); }
.gallery .placeholder {
  height: 240px; display: flex; align-items: center; justify-content: center;
  background: var(--grey-100); color: var(--grey-400); font-size: 0.85rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* Al pasar por encima: la foto recupera el color y se amplía un poco.
   El recorte lo hace .shot con overflow, para que el zoom no desborde. */
.gallery .shot {
  display: block; position: relative; overflow: hidden;
  border: 0; padding: 0; margin: 0; width: 100%;
  background: var(--grey-100); cursor: zoom-in;
}
.gallery figure:hover { border-color: var(--grey-400); }
.gallery .shot:hover img,
.gallery .shot:focus-visible img { filter: grayscale(0%); transform: scale(1.04); }
.gallery .shot:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

@media (hover: none) {
  /* En táctil no hay hover: las fotos van ya en color. */
  .gallery img { filter: grayscale(0%); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery img { transition: filter 0.2s ease; }
  .gallery .shot:hover img, .gallery .shot:focus-visible img { transform: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 10, 10, 0.94);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure {
  margin: 0; max-width: 1100px; width: 100%;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto;
  object-fit: contain; filter: none; background: transparent;
}
.lightbox figcaption {
  color: var(--grey-200); font-size: 0.9rem; text-align: center;
  padding: 1rem 0 0; max-width: 70ch;
}
.lightbox .count {
  display: block; margin-top: 0.4rem;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey-400); font-variant-numeric: tabular-nums;
}
.lb-btn {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: var(--white); line-height: 1; padding: 0.5rem;
  opacity: 0.75; transition: opacity 0.2s;
}
.lb-btn:hover, .lb-btn:focus-visible { opacity: 1; }
.lb-close { top: clamp(0.5rem, 2vw, 1.5rem); right: clamp(0.5rem, 2vw, 1.5rem); font-size: 2rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2.5rem; padding: 1rem; }
.lb-prev { left: clamp(0.25rem, 1.5vw, 1rem); }
.lb-next { right: clamp(0.25rem, 1.5vw, 1rem); }
@media (max-width: 560px) {
  .lb-prev, .lb-next { font-size: 2rem; padding: 0.75rem 0.5rem; }
  .lightbox img { max-height: 68vh; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact-item .label {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem;
  font-weight: 700; color: var(--grey-400); margin-bottom: 0.35rem;
}
.contact-item .value { font-size: 1.15rem; font-weight: 600; color: var(--black); }

/* ---------- CTA band ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 20ch; margin-inline: auto; }

/* ---------- Botón flotante de WhatsApp ----------
   Iba en la propuesta (Essentials). En negro, no en el verde corporativo de
   WhatsApp: la identidad de la web es blanco y negro y un botón verde chillón
   la rompería. El icono se reconoce igual por su silueta. */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--black); color: var(--white);
  box-shadow: 0 4px 16px rgba(10, 10, 10, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}
.wa-float svg { width: 30px; height: 30px; fill: currentColor; display: block; }
.wa-float:hover, .wa-float:focus-visible { transform: translateY(-2px) scale(1.05); background: var(--grey-900); }
.wa-float:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (max-width: 560px) { .wa-float { width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } }
@media print { .wa-float { display: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--grey-200);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.site-footer .brand { color: var(--white); display: inline-block; margin-bottom: 0.75rem; }
.site-footer a { color: var(--grey-200); }
.site-footer a:hover { color: var(--white); }
.footer-line { margin: 0.25rem 0; }
.footer-legal { color: var(--grey-600); margin-top: 1.5rem; font-size: 0.8rem; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--grey-600); }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 2rem; max-width: 780px; }
.form-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.field { margin: 0 0 1.25rem; }
.field label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey-600);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--grey-400);
  border-radius: 0;
  transition: border-color 0.2s;
}
.field input:focus,
.field textarea:focus { outline: 0; border-color: var(--black); }
.field textarea { resize: vertical; min-height: 150px; }
.contact-form .btn { font-family: inherit; }

/* Honeypot antispam: oculto para personas, visible para bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-ok,
.form-error {
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--black);
  background: var(--white);
  font-weight: 600;
}
.form-error { border-left-color: #b00020; color: #b00020; }

/* ---------- Client logos ---------- */
.clients { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2rem; }
.client { border: 1px solid var(--grey-200); padding: 1.5rem; background: var(--white); }
.client h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.client p { margin: 0; font-size: 0.88rem; color: var(--grey-600); }

/* ---------- Páginas legales (prosa) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin: 2.25rem 0 0.75rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.25rem; }

/* ---------- Fixes de legibilidad y desbordes ---------- */

/* El email y la dirección son largos: columnas más anchas y rotura solo en
   puntos controlados (hay un <wbr> tras la @ en la plantilla), nunca a mitad
   de palabra salvo desborde real. */
.contact-item .value {
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.4;
}
.contact-item .value--email { font-size: 1.02rem; letter-spacing: -0.01em; }
.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  column-gap: 2.5rem;
  row-gap: 2.5rem;
}

/* El pie quedaba demasiado apagado sobre el negro: subimos el contraste
   a un gris claro que cumple AA (WCAG) sin perder la estética sobria. */
.site-footer { color: #d6d6d6; }
.site-footer .footer-line { color: #d6d6d6; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-legal { color: #9a9a9a; }
.site-footer .brand span { color: #b5b5b5; }

/* Logos de clientes en la sección "Selected experience" */
.client-logo {
  max-height: 56px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: grayscale(100%);
  opacity: 0.85;
}
.client:hover .client-logo { filter: none; opacity: 1; }

/* La línea de ABN quedaba partida a mitad de palabra en móvil. En vez de
   forzarla a una sola línea (achicando demasiado el texto), la partimos
   nosotros en un punto limpio: el REC en una línea y el ABN en la
   siguiente. En escritorio se queda tal cual, todo en una línea. */
.legal-ids-break { display: none; }
@media (max-width: 480px) {
  .legal-ids-sep { display: none; }
  .legal-ids-break { display: inline; }
  .footer-line--legal-ids { line-height: 1.5; }
}

/* ---------- Service short line (Services page) ---------- */
.service-meta {
  margin-top: 0.5rem !important;
  font-size: 0.85rem;
  color: var(--grey-400);
  font-style: italic;
}
