/* ============================================================
   DROGUERÍA VIDRIO — Design Tokens
   Versión 1.0
   Uso: <link rel="stylesheet" href="vidrio-tokens.css">
   ============================================================ */

/* Tipografía: Libre Franklin (muy cercana a la del diseño).
   Si el diseñador usa otra, solo se cambia --font-main. */
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;400;500;700;800&display=swap');

:root {
  /* ---------- COLORES ---------- */
  --color-acento:      #1bb0bc;  /* Turquesa: "Droguería Vidrio" (título y footer) */
  --color-acento-osc:  #0e7f89;  /* Turquesa oscuro, para hover o detalles */
  --color-texto:       #111111;  /* Texto y títulos */
  --color-texto-sec:   #555555;  /* Texto secundario */
  --color-fondo:       #f5f5f3;  /* Fondo general */
  --color-fondo-alt:   #fafafa;  /* Fondo de páginas interiores */
  --color-blanco:      #ffffff;
  --color-linea:       #222222;  /* Líneas horizontales separadoras */
  --color-borde-suave: #dddddd;

  /* ---------- TIPOGRAFÍA ---------- */
  --font-main: 'Libre Franklin', Helvetica, Arial, sans-serif;

  --text-sm:   13px;
  --text-base: 16px;   /* Cuerpo */
  --text-lg:   18px;   /* Subtítulos en negrita */
  --text-xl:   24px;   /* Principios, títulos de bloque */
  --text-2xl:  34px;   /* Títulos de sección (Inicio) */
  --text-3xl:  56px;   /* Títulos de página (FÓRMULA MAGISTRAL, HISTORIA) */
  --text-brand: clamp(48px, 9vw, 130px); /* "Droguería Vidrio" grande */

  --weight-light: 300;
  --weight-regular: 400;
  --weight-bold: 700;
  --weight-black: 800;

  --leading-tight: 1.05;
  --leading-normal: 1.6;
  --tracking-tight: -0.03em;   /* Títulos pesados, letras juntas */

  /* ---------- ESPACIADO ---------- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  /* ---------- BOTONES ---------- */
  --btn-border: 1px solid var(--color-texto);
  --transition: 0.2s ease;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-texto);
  background: var(--color-fondo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
.title-brand {            /* "Droguería Vidrio" turquesa */
  font-size: var(--text-brand);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-acento);
  text-align: center;
}
.title-page {             /* FÓRMULA MAGISTRAL, HISTORIA, etc. */
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}
.title-section {          /* Títulos de bloque en el Inicio */
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
}
.title-person {           /* "Nuestro Equipo." / "Contacto" */
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}
.subtitle { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.body-text { font-size: var(--text-base); font-weight: var(--weight-light); }
.body-text p + p { margin-top: var(--space-4); }
.principles { font-size: var(--text-xl); font-weight: var(--weight-bold); line-height: 1.3; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-6) var(--gutter);
  border-bottom: 1px solid var(--color-linea);
}
.header__logo img { height: 70px; width: auto; }
.header__nav { display: flex; gap: var(--space-6); }
.header__nav a {
  text-decoration: none;
  font-size: var(--text-base);
  padding-bottom: 2px;
}
.header__nav a:hover,
.header__nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================================
   BOTÓN (rectangular, borde fino, con flecha →)
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-main);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
  border: var(--btn-border);
  background: transparent;
  color: var(--color-texto);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn:hover { background: var(--color-texto); color: var(--color-blanco); }

/* ============================================================
   LAYOUT DE SECCIONES
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.section {
  border-top: 1px solid var(--color-linea);
  padding: var(--space-12) 0;
}
.section__grid {              /* texto + imagen, 2 columnas */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.section--reverse .section__grid > :first-child { order: 2; } /* imagen a la izquierda */
.section--right { text-align: right; }                         /* Historia en Inicio */

.photo { width: 100%; height: auto; object-fit: cover; }

/* Tira de 3 fotos (Inicio y Historia) */
.photo-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4); margin-top: var(--space-8);
}

/* Fotos escalonadas (Atención Farmacéutica) */
.photo-stagger { position: relative; }
.photo-stagger img + img { margin-top: -80px; margin-left: -60px; position: relative; }

/* Línea de tiempo mini (Inicio → Historia) */
.timeline-mini { list-style: none; font-weight: var(--weight-bold); font-size: var(--text-sm); }
.timeline-mini li::before { content: "→ "; }
.timeline-mini li + li { margin-top: var(--space-3); }

/* ============================================================
   NUESTRO EQUIPO — cuadrícula
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.team-grid img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }

/* Tarjeta de persona: TODA la tarjeta es un enlace al PDF del CV.
   HTML sugerido:
   <a class="team-card" href="cv-nombre.pdf" target="_blank" rel="noopener">
     <img src="foto.jpg" alt="Nombre Apellido">
     <h3 class="team-card__name">Nombre Apellido</h3>
     <p class="team-card__role">Cargo</p>
   </a>
*/
.team-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.team-card__img-wrap { overflow: hidden; }
.team-card img { transition: transform var(--transition); }
.team-card:hover img { transform: scale(1.03); }
.team-card__name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  margin-top: var(--space-3);
}
.team-card__role {
  font-size: var(--text-sm);
  color: var(--color-texto-sec);
}
.team-card:hover .team-card__name,
.team-card:focus-visible .team-card__name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.team-card:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 4px; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact-info dt { font-weight: var(--weight-bold); margin-top: var(--space-6); }
.contact-info a { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--color-linea);
  padding: var(--space-12) var(--gutter) var(--space-8);
}
.footer__row {
  display: grid; grid-template-columns: 160px 1fr; align-items: center;
}
.footer__social { display: flex; gap: var(--space-4); }
.footer__social svg { width: 22px; height: 22px; fill: var(--color-texto); }
.footer__address {
  text-align: center; margin-top: var(--space-6);
  font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 3px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --text-3xl: 40px; --text-2xl: 28px; }
  .section__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .section--reverse .section__grid > :first-child { order: 0; }
  .section--right { text-align: left; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-strip { grid-template-columns: 1fr; }
  .photo-stagger img + img { margin: var(--space-4) 0 0; }
  .header { flex-wrap: wrap; gap: var(--space-4); }
  .header__nav { flex-wrap: wrap; gap: var(--space-4); }
  .footer__row { grid-template-columns: 1fr; gap: var(--space-4); justify-items: center; }
}
@media (max-width: 520px) {
  :root { --text-3xl: 32px; }
}
