/* =====================================
   ESTUDIO CR2 - Sistema de diseño web
   - Paleta sobria: fondo claro, texto oscuro, acento dorado jazz
   - Retícula CSS Grid 12 columnas
   - Menú y layout vía CSS (sin JS)
   ===================================== */

/* Reset básico y accesibilidad */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

:root {
  /* Paleta */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --primary: #111827;       /* casi negro, elegante */
  --primary-soft: #1f2937;
  --accent: #eab308;        /* dorado jazz */
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size: 1rem;
  --leading: 1.6;

  /* Retícula */
  --container: 1200px;
  --container-pad: 1rem;
  --gap: 1rem;

  --radius: 0.75rem;
  --radius-lg: 1rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: var(--leading);
  color: var(--text);
  background-color: var(--bg);
}

/* Foco accesible */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Tipografía base */
.h1,
h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.h2,
h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  margin: 0 0 0.4em;
}

.h3,
h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin: 0 0 0.4em;
}

/* Contenedor y retícula 12 columnas */
.container {
  width: min(100% - calc(var(--container-pad) * 2), var(--container));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* Mobile first: 12 columnas */
[class^="col-"],
[class*=" col-"] {
  grid-column: span 12;
}

/* Breakpoints */
@media (min-width: 48rem) {
  .md-col-3 {
    grid-column: span 3;
  }
  .md-col-4 {
    grid-column: span 4;
  }
  .md-col-5 {
    grid-column: span 5;
  }
  .md-col-6 {
    grid-column: span 6;
  }
  .md-col-7 {
    grid-column: span 7;
  }
  .md-col-8 {
    grid-column: span 8;
  }
  .md-col-12 {
    grid-column: span 12;
  }
}

@media (min-width: 64rem) {
  .lg-col-3 {
    grid-column: span 3;
  }
  .lg-col-4 {
    grid-column: span 4;
  }
  .lg-col-6 {
    grid-column: span 6;
  }
  .lg-col-8 {
    grid-column: span 8;
  }
  .lg-col-12 {
    grid-column: span 12;
  }
}

.grid-center {
  align-items: center;
}

/* Enlace para saltar contenido (accesibilidad extra) */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.4rem 0.75rem;
  background: #fff;
  border-radius: 0.5rem;
  border: 2px solid var(--accent);
  z-index: 100;
}

/* HEADER y navegación */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Marca */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.brand__name {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Menú principal */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-block: 0.4rem;
}

.nav a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--primary-soft);
  border: 1px solid transparent;
  font-size: 0.85rem;
}

.nav a:hover {
  border-color: var(--border);
  background-color: #f9fafb;
}

/* Secciones */
.section {
  padding-block: clamp(2rem, 5vw, 3rem);
}

.section--soft {
  background-color: var(--surface-soft);
}

.section__head {
  margin-bottom: 1rem;
}

/* HERO */
.hero {
  background: var(--surface-soft);
}

.hero__card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  background-color: var(--primary-soft);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--border);
}

/* Tarjetas */
.card {
  background-color: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card--soft {
  background-color: var(--surface-soft);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Imagen contenedora */
.card__img {
  width: 100%;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: #f9fafb;
}

.card__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Galería general */
.gallery .card__img {
  border-radius: 0.5rem;
}

/* Índice tarjetas */
.index-card {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.index-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Video responsivo */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: #000;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Formulario */
.form {
  display: grid;
  gap: 1rem;
}

.input,
.textarea,
.select {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  font: inherit;
  background-color: #ffffff;
}

.textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Footer */
.footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background-color: #ffffff;
  color: var(--muted);
  padding-block: 1.4rem;
}

/* Utilidades */
.mb-0 {
  margin-bottom: 0 !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-4 {
  margin-top: 1rem !important;
}
.center {
  text-align: center;
}
.muted {
  color: var(--muted);
}

/* Ajustes responsive extra */
@media (max-width: 47.99rem) {
  .hero__image {
    margin-top: 1rem;
  }
}
