/* ==========================================================================
   Organización Creasa SA de CV — hoja de estilos
   Diseño limpio y espacioso. Colores de marca: dorado #e4af00 y café #b56b15.
   ========================================================================== */

:root {
  --gold: #e4af00;
  --gold-soft: #fbe9b0;
  --brown: #b56b15;
  --brown-dark: #8a4f0d;
  --espresso: #2a1b10;
  --ink: #3a2e24;
  --muted: #7a6a5a;
  --bg: #fffdf9;
  --cream: #fbf5ea;
  --line: #efe4d2;
  --white: #ffffff;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 18px 40px -22px rgba(42, 27, 16, .28);

  --container: 1120px;
  --narrow: 760px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 80px;
}

/* ---------- 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: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-underline-offset: 3px; }
a:hover { color: var(--brown-dark); }
strong { font-weight: 700; color: var(--espresso); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--espresso);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--espresso); color: var(--white);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--narrow); }

.section { padding-block: clamp(72px, 10vw, 128px); }
.section--cream { background: var(--cream); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section-title p { color: var(--muted); }

.kicker {
  display: block; margin-bottom: .6rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brown);
}
.lead { font-size: 1.25rem; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--primary { background: var(--brown); color: var(--white); }
.btn--primary:hover { background: var(--brown-dark); color: var(--white); }
.btn--light { background: var(--white); color: var(--brown-dark); border-color: var(--line); }
.btn--light:hover { border-color: var(--brown); color: var(--brown-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 249, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--espresso); letter-spacing: .03em; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .5em 1em; border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.nav-list a:hover { color: var(--brown); }
.nav-list a[aria-current="page"] { color: var(--brown); background: var(--cream); }
.nav-list .nav-cta a { background: var(--brown); color: var(--white); margin-left: 8px; }
.nav-list .nav-cta a:hover { background: var(--brown-dark); color: var(--white); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--cream); cursor: pointer; color: var(--espresso);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); padding: 8px var(--gutter) 24px; box-shadow: 0 16px 24px -16px rgba(42, 27, 16, .2);
  }
  .nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list a { padding: .9em 1em; font-size: 1.1rem; }
  .nav-list .nav-cta a { margin: 8px 0 0; text-align: center; }
}

/* ---------- Portada (inicio) ---------- */
.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 112px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
  text-align: center;
}
.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero h1 span { color: var(--brown); }
.hero .lead { max-width: 560px; margin: 0 auto 32px; }
.hero .btn-row { justify-content: center; }

/* ---------- Carrusel ---------- */
.slider { position: relative; max-width: 960px; margin: clamp(48px, 7vw, 72px) auto 0; }
.slider-track {
  position: relative; aspect-ratio: 898 / 200; overflow: hidden;
  border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.slider-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--white); color: var(--espresso); box-shadow: 0 2px 10px rgba(42, 27, 16, .1);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, color .2s ease;
}
.slider-btn:hover { background: var(--brown); color: var(--white); }
.slider-btn svg { width: 18px; height: 18px; }
.slider-dots { display: flex; gap: 8px; }
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: #dccbb0; transition: width .3s ease, background-color .3s ease;
}
.slider-dots button[aria-current="true"] { width: 24px; background: var(--brown); }

/* ---------- Encabezado de páginas internas ---------- */
.page-hero {
  text-align: center;
  padding-block: clamp(40px, 7vw, 80px) clamp(48px, 7vw, 88px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
}
.page-hero .lead { max-width: 560px; margin-inline: auto; }
.page-banner { max-width: 760px; margin: clamp(32px, 5vw, 48px) auto 0; }
.page-banner img {
  width: 100%; aspect-ratio: 898 / 200; object-fit: contain;
  border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}

/* ---------- Bienvenidos ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.split-media img {
  width: 100%; max-width: 400px; margin-inline: auto;
  aspect-ratio: 292 / 398; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow);
}
.mission-text { font-size: 1.2rem; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-media img { max-width: 320px; }
}

/* ---------- Valores ---------- */
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 5vw, 56px); }
.value { text-align: center; }
.icon-circle {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--white); display: grid; place-items: center; box-shadow: 0 8px 20px -12px rgba(42, 27, 16, .35);
}
.icon-circle img { width: 38px; height: 38px; }
.value p { color: var(--ink); }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ---------- Compromiso ---------- */
.commitments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.commitment { display: flex; gap: 20px; align-items: flex-start; }
.commitment-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--cream); display: grid; place-items: center;
}
.commitment-icon img { width: 18px; height: auto; }
.commitment p { margin: 0; padding-top: 10px; }
@media (max-width: 760px) { .commitments { grid-template-columns: 1fr; } }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 8vw, 112px); }
.service h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.service .btn-row { margin-top: 28px; }
.pill {
  display: inline-block; margin-bottom: 18px; padding: 6px 16px; border-radius: 999px;
  background: var(--gold-soft); color: var(--brown-dark); font-weight: 700; font-size: .95rem;
}
.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: flex-start; gap: 14px; }
.checklist img { width: 10px; height: 7px; margin-top: .75em; flex: none; }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.tile { display: block; text-decoration: none; color: inherit; }
.tile-media { aspect-ratio: 230 / 155; overflow: hidden; border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-media img { transform: scale(1.05); }
.tile h3 { margin: 18px 0 4px; font-size: 1.2rem; }
.tile-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; color: var(--brown); }
.tile-link svg { width: 16px; height: 16px; transition: transform .25s ease; }
.tile:hover .tile-link svg { transform: translateX(4px); }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.form-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 3vw, 32px); }
.form-wrap iframe { display: block; width: 100%; min-height: 440px; border: 0; }
.contact-info { padding-top: 12px; }
.contact-mail { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.contact-mail img { width: 64px; height: 64px; flex: none; }
.contact-mail small { display: block; color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.contact-mail a { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Llamado a la acción ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta p { color: var(--muted); margin-bottom: 28px; }
.cta .btn-row { justify-content: center; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--espresso); color: #e6d7c1; padding-block: 56px 28px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.footer-brand img { height: 44px; width: auto; background: var(--bg); border-radius: 50%; padding: 6px; }
.footer-brand span { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--white); letter-spacing: .03em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #e6d7c1; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(230, 215, 193, .15);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: .9rem; color: #b9a587;
}
.footer-bottom a { color: #b9a587; }

/* ---------- Visor de imágenes ---------- */
.lightbox {
  width: min(1080px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px);
  padding: 0; border: 0; border-radius: var(--radius); background: var(--white); overflow: hidden;
}
.lightbox::backdrop { background: rgba(26, 16, 9, .75); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 24px; }
.lightbox-title { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--espresso); }
.lightbox-count { margin-left: 10px; font: 600 .9rem var(--font-body); color: var(--muted); }
.lightbox-close, .lightbox-nav {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--espresso); transition: background-color .2s ease, color .2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--brown); color: var(--white); }
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-stage { position: relative; display: grid; place-items: center; background: var(--cream); min-height: 240px; }
.lightbox-stage img { max-width: 100%; max-height: calc(100vh - 100px); width: auto; object-fit: contain; }
.lightbox-error { padding: 48px 24px; text-align: center; color: var(--muted); }
.lightbox-error[hidden], .lightbox-nav[hidden], .lightbox-stage img[hidden] { display: none; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: var(--white); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.lightbox-nav--prev { left: 12px; }
.lightbox-nav--next { right: 12px; }

/* ---------- Aparición suave ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

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