/* ==========================================================
   Taller Medina — hoja de estilos principal
   Paleta: grafito + rojo (sin azules)
   ========================================================== */

:root {
  --ink: #111113;
  --ink-2: #1b1b1f;
  --ink-3: #26262b;
  --paper: #f7f5f2;
  --paper-2: #efebe6;
  --white: #ffffff;
  --text: #2a2a2e;
  --muted: #6b6864;
  --line: #e2ddd6;
  --line-dark: #34343a;
  --red: #d7262f;
  --red-dark: #a8161e;
  --amber: #f2a541;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(17, 17, 19, .08);
  --shadow-lg: 0 24px 60px rgba(17, 17, 19, .18);
  --container: 1200px;
  --header-h: 76px;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

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

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(17, 17, 19, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }

.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand img { width: 44px; height: 44px; }
.brand-name {
  font-family: var(--font-head); font-size: 1.55rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}
.brand-name span { color: var(--red); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 16px; border-radius: 999px;
  color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .95rem;
  letter-spacing: .02em; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.nav a[aria-current="page"] { color: var(--white); background: var(--red); }

.nav-toggle {
  display: none;
  width: 46px; height: 46px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .08); color: var(--white); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: .98rem; letter-spacing: .02em;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s;
  cursor: pointer; border: 2px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 10px 24px rgba(215, 38, 47, .35); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  color: var(--white); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 10, 11, .92) 0%, rgba(10, 10, 11, .7) 45%, rgba(10, 10, 11, .25) 100%),
    linear-gradient(0deg, rgba(10, 10, 11, .6) 0%, transparent 40%);
}
.hero-content { max-width: 680px; padding-block: 80px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
.hero .eyebrow { color: var(--amber); }

.hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  text-transform: uppercase; letter-spacing: .01em;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255, 255, 255, .82); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Hero corto para páginas internas */
.page-hero { min-height: 380px; }
.page-hero .hero-content { padding-block: 70px; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }

/* ---------- Stats ---------- */
.stats {
  position: relative; z-index: 2;
  margin-top: -60px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong {
  display: block; font-family: var(--font-head); font-size: 2.6rem; line-height: 1;
  color: var(--ink);
}
.stat strong small { font-size: 1.2rem; color: var(--red); margin-left: 2px; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding-block: 100px; }
.section-alt { background: var(--white); }
.section-dark { background: var(--ink); color: rgba(255, 255, 255, .78); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 50px; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-dark .section-head p { color: rgba(255, 255, 255, .65); }

/* Bloque dividido texto / media */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.split h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.split p { font-size: 1.12rem; color: var(--muted); text-align: justify; }

.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); background: var(--ink);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 34px; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { font-size: 1.75rem; margin-bottom: 14px; }
.card p { color: var(--muted); margin: 0; }

.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(215, 38, 47, .1); color: var(--red);
}
.card-icon svg { width: 28px; height: 28px; }

.section-dark .card { background: var(--ink-2); border-color: var(--line-dark); box-shadow: none; }
.section-dark .card:hover { border-color: var(--red); }
.section-dark .card p { color: rgba(255, 255, 255, .65); }
.section-dark .card-icon { background: rgba(215, 38, 47, .18); }

/* Lista con checks */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 14px;
  font-weight: 600; color: var(--ink); font-size: 1.08rem;
}
.check-list li::before {
  content: ""; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.section-dark .check-list li { color: var(--white); }

/* Servicios en cuadrícula */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.service {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--line-dark);
  color: var(--white); font-weight: 600; font-size: 1.05rem; line-height: 1.35;
  transition: border-color .25s, transform .25s;
}
.service:hover { border-color: var(--red); transform: translateY(-4px); }
.service-num {
  flex: none; font-family: var(--font-head); font-size: 1.5rem; color: var(--red); width: 34px;
}

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery figure {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--ink-3);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10, 10, 11, .35), transparent 50%);
  pointer-events: none;
}

/* Imagen panorámica */
.banner-image {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 21 / 9; box-shadow: var(--shadow-lg); background: var(--ink-3);
}
.banner-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-lg); padding: 56px 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08);
}
.cta h2 { color: var(--white); font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 6px; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta .btn-ghost { position: relative; border-color: var(--white); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.contact-card {
  background: var(--ink); color: rgba(255, 255, 255, .8);
  border-radius: var(--radius-lg); padding: 40px 36px;
}
.contact-card h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 26px; }
.contact-item { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.contact-item:first-of-type { border-top: 0; padding-top: 0; }
.contact-item .card-icon { width: 46px; height: 46px; margin: 0; flex: none; background: rgba(215, 38, 47, .18); }
.contact-item .card-icon svg { width: 22px; height: 22px; }
.contact-item h3 {
  color: var(--white); font-family: var(--font-body); font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px;
}
.contact-item p, .contact-item a { margin: 0; color: rgba(255, 255, 255, .85); }
.contact-item a:hover { color: var(--red); }

.form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow);
}
.form-card iframe { width: 100%; min-height: 520px; border: 0; }

.map {
  margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 21 / 8; background: var(--paper-2);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .6); padding-top: 70px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 50px; border-bottom: 1px solid var(--line-dark);
}
.footer-grid h4 {
  color: var(--white); font-family: var(--font-body); font-size: .8rem;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a:hover { color: var(--white); }
.footer-grid .brand { margin-bottom: 16px; }
.footer-grid p { max-width: 360px; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-block: 24px; font-size: .9rem;
}
.footer-bottom a { color: rgba(255, 255, 255, .8); }
.footer-bottom a:hover { color: var(--red); }
.powered { font-size: .8rem; color: rgba(255, 255, 255, .45); }
.powered a { color: rgba(255, 255, 255, .6); }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    padding: 16px 20px 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; width: 100%; gap: 6px; }
  .nav a { padding: 14px 18px; border-radius: 12px; font-size: 1.05rem; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding-block: 70px; }
  .cards, .cards-3, .gallery { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }
  .banner-image { aspect-ratio: 4 / 3; }
  .map { aspect-ratio: 4 / 3; }
  .cta { padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.3rem; }
  .split p { text-align: left; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .form-card { padding: 16px; }
}
