:root {
  --white: #ffffff;
  --text: #121212;
  --muted: #5f6570;
  --line: #e9edf2;
  --soft: #f7f9fc;
  --blue: #1d86f5;
  --gold: #c89e32;
  --gold-soft: #efc061;
  --cream: #e6ddd1;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }
.section-white { background: var(--white); }
.section-soft { background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(18,18,18,0.06);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand-mini {
  font-weight: 800;
  letter-spacing: -0.03em;
}
.site-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.site-nav a {
  font-size: 0.96rem;
  color: var(--muted);
  font-weight: 600;
}
.site-nav a:hover { color: var(--text); }
.menu-toggle {
  display: none;
  border: 0;
  background: #f2f5f8;
  border-radius: 12px;
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}
.hero-grid,
.split-grid,
.brand-grid,
.footer-grid,
.identity-grid {
  display: grid;
  gap: 2rem;
}
.hero-grid { grid-template-columns: 1.15fr 0.95fr; align-items: center; }
.hero-copy h1 {
  margin: 0.6rem 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.hero-copy p { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }
.eyebrow,
.section-label,
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow { color: #2a2f38; background: #f3f6f9; }
.casalegal-tag { background: rgba(29,134,245,0.1); color: #0d63bf; }
.mexicon-tag { background: rgba(200,158,50,0.14); color: #8a6511; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.7rem 0 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 14px;
  font-weight: 700;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0a6ddb);
  color: var(--white);
  box-shadow: 0 14px 24px rgba(29, 134, 245, 0.22);
}
.btn-outline {
  border: 1px solid rgba(18,18,18,0.1);
  background: var(--white);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.stat-card,
.intro-panel,
.feature-card,
.identity-card,
.timeline-item,
.contact-card,
.hero-card,
.quote-card {
  background: var(--white);
  border: 1px solid rgba(18,18,18,0.07);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.stat-card { padding: 1rem 1.1rem; }
.stat-card strong { display: block; font-size: 1rem; }
.stat-card span { color: var(--muted); font-size: 0.94rem; }

.hero-visual {
  display: grid;
  gap: 1.3rem;
}
.hero-card {
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: center;
}
.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  padding: 0.5rem;
}
.card-casalegal { border-left: 5px solid var(--blue); }
.card-mexicon { border-left: 5px solid var(--gold); }
.hero-card-content h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.hero-card-content p { margin: 0; color: var(--muted); }
.floating-shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.14;
}
.shape-a {
  width: 320px; height: 320px;
  background: var(--blue);
  top: -60px; right: -80px;
}
.shape-b {
  width: 220px; height: 220px;
  background: var(--gold-soft);
  bottom: 10px; left: -60px;
}

.split-intro, .brand-section, .identity-section, .timeline-section, .contact-section {
  padding: 4.5rem 0;
}
.split-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.intro-panel { padding: 2rem; }
.intro-panel h2 { margin: 1rem 0 0.7rem; font-size: 1.7rem; }
.intro-panel p { color: var(--muted); }
.intro-panel ul { margin: 1rem 0 0; padding-left: 1.2rem; color: #2d3440; }
.intro-panel li + li { margin-top: 0.4rem; }

.brand-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
.brand-grid.reverse { grid-template-columns: 0.95fr 1.05fr; }
.brand-copy h2,
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0.7rem 0 1rem;
}
.brand-copy p,
.section-heading p { color: var(--muted); max-width: 62ch; }
.feature-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.two-col .full-span { grid-column: 1 / -1; }
.feature-card { padding: 1.2rem; }
.feature-card h3 { margin: 0 0 0.45rem; font-size: 1.02rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.brand-visual {
  position: relative;
  min-height: 520px;
}
.image-frame {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: var(--white);
  border: 1px solid rgba(18,18,18,0.06);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; }
.large-frame {
  width: min(100%, 430px);
  aspect-ratio: 1 / 1;
}
.large-frame img { object-fit: contain; padding: 1rem; }
.mini-frame {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(55%, 270px);
}
.wide-frame {
  margin-top: 1rem;
  width: 100%;
}
.quote-card {
  position: absolute;
  left: 1rem;
  bottom: 1.5rem;
  max-width: 300px;
  padding: 1rem 1.1rem;
}
.casalegal-quote p {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #293447;
}
.alt-section {
  background: linear-gradient(180deg, #fcfcfd 0%, #f7f9fb 100%);
}
.mexicon-frame { background: #111; }

.section-heading { margin-bottom: 2rem; }
.identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.identity-card { padding: 1.7rem; }
.identity-card h3 { margin-top: 0; }
.identity-card p { margin-bottom: 0; color: var(--muted); }

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.timeline-item { padding: 1.5rem; position: relative; overflow: hidden; }
.timeline-index {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(29,134,245,0.13), rgba(200,158,50,0.2));
  font-weight: 800;
  margin-bottom: 1rem;
}
.timeline-item h3 { margin: 0 0 0.45rem; }
.timeline-item p { margin: 0; color: var(--muted); }

.contact-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.5rem;
  padding: 2rem;
  align-items: center;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.site-footer {
  background: #0f1116;
  color: rgba(255,255,255,0.92);
  padding: 2.5rem 0;
}
.footer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.footer-grid h3 { margin-top: 0; font-size: 1rem; }
.footer-grid p { margin-bottom: 0; color: rgba(255,255,255,0.68); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }

@media (max-width: 980px) {
  .hero-grid,
  .split-grid,
  .brand-grid,
  .brand-grid.reverse,
  .identity-grid,
  .contact-card,
  .footer-grid,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .brand-visual { min-height: auto; }
  .quote-card,
  .mini-frame { position: static; width: 100%; max-width: none; margin-top: 1rem; }
  .large-frame { width: 100%; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 1rem;
    left: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(18,18,18,0.08);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav.open { display: flex; }
  .hero { padding-top: 3.8rem; }
  .hero-card { grid-template-columns: 1fr; text-align: center; }
  .feature-grid,
  .stats-row { grid-template-columns: 1fr; }
  .contact-actions { width: 100%; }
}
