:root {
  --cream: #FDF6ED;
  --brown: #4A2C0A;
  --caramel: #C97A2F;
  --warm: #E8B96A;
  --soft: #F5E6CE;
  --text: #2D1A06;
  --muted: #8B6A44;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(253,246,237,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,122,47,0.2);
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}
nav ul { list-style: none; display: flex; gap: 2rem; }
nav ul a {
  text-decoration: none; color: var(--muted);
  font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--caramel); }

/* ── HERO ── */
#inicio {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,122,47,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232,185,106,0.15) 0%, transparent 50%),
    var(--cream);
  padding-top: 80px;
  overflow: hidden;
}
.hero-deco {
  position: absolute; border-radius: 50%;
  opacity: 0.08; background: var(--caramel);
}
.hero-deco.d1 { width: 600px; height: 600px; top: -200px; right: -200px; }
.hero-deco.d2 { width: 300px; height: 300px; bottom: -100px; left: -100px; }

.hero-content {
  text-align: center; max-width: 760px; padding: 2rem;
  animation: fadeUp 0.9s ease both;
}
.hero-badge {
  display: inline-block;
  background: var(--soft); border: 1px solid var(--warm);
  color: var(--caramel);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.4rem 1.2rem; border-radius: 100px;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s 0.1s ease both;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 900; line-height: 0.95;
  color: var(--brown); margin-bottom: 1.2rem;
  animation: fadeUp 0.9s 0.2s ease both;
}
.hero-title em { font-style: normal; color: var(--caramel); display: block; }
.hero-slogan {
  font-size: 1.15rem; color: var(--muted);
  font-weight: 300; letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.9s 0.3s ease both;
}
.hero-cta {
  display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.9s 0.4s ease both;
}
.btn {
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.9rem; font-weight: 500;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.25s;
}
.btn-primary { background: var(--brown); color: var(--cream); }
.btn-primary:hover { background: var(--caramel); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1.5px solid var(--caramel); color: var(--caramel); }
.btn-outline:hover { background: var(--soft); transform: translateY(-2px); }

.hero-logo-img {
  height: 120px;
  width: auto;
  display: block;
  margin: 0 auto 1.5rem;
  animation: bounce 2s ease infinite;
}
.footer-logo-img {
  height: 60px;
  width: auto;
  display: block;
  margin: 0 auto 0.75rem;
}
.card-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
}
.legal-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── SECTIONS ── */
section { padding: 5rem 2rem; }
.section-label {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--caramel); margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  color: var(--brown); margin-bottom: 1rem; line-height: 1.1;
}
.section-desc { color: var(--muted); max-width: 560px; line-height: 1.7; font-size: 1rem; }
.container { max-width: 1100px; margin: 0 auto; }

/* ── IDENTIDAD ── */
#identidad { background: var(--soft); }
.identity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.identity-card {
  background: var(--cream); border-radius: 16px; padding: 2rem;
  border: 1px solid rgba(201,122,47,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}
.identity-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(74,44,10,0.1); }
.card-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700; color: var(--brown); margin-bottom: 0.75rem;
}
.card-text { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.values-list { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.value-tag {
  background: var(--soft); border: 1px solid var(--warm);
  color: var(--caramel); padding: 0.35rem 1rem;
  border-radius: 100px; font-size: 0.85rem; font-weight: 500;
}

/* ── LEGAL ── */
#legal { background: var(--cream); }
.legal-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; margin-top: 3rem;
}
.legal-card {
  border-radius: 16px; padding: 2rem;
  border: 1px solid rgba(201,122,47,0.2); background: var(--soft);
}
.legal-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; color: var(--brown);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.legal-card p, .legal-card li { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.legal-card ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.legal-card li { margin-bottom: 0.3rem; }

/* Capital Social box */
.highlight-box {
  background: var(--brown); color: var(--cream);
  border-radius: 16px; padding: 2rem; grid-column: 1 / -1;
}
.highlight-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; color: var(--warm); margin-bottom: 1rem;
}

/* Responsive table wrapper */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.capital-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 420px; }
.capital-table th {
  text-align: left; color: var(--warm); font-weight: 500;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(232,185,106,0.3);
  white-space: nowrap;
}
.capital-table td {
  padding: 0.55rem 0.75rem; color: rgba(253,246,237,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.capital-table tr:last-child td {
  font-weight: 600; color: var(--warm);
  border-top: 1px solid rgba(232,185,106,0.4); border-bottom: none;
}

/* Mobile cards fallback for capital table */
.capital-cards { display: none; }
.capital-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,185,106,0.2);
  border-radius: 10px; padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
}
.capital-card-name { color: var(--warm); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.capital-card-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: rgba(253,246,237,0.75); padding: 0.15rem 0; }
.capital-card-row span:first-child { color: rgba(232,185,106,0.7); }
.capital-total {
  background: rgba(232,185,106,0.12);
  border: 1px solid rgba(232,185,106,0.4);
  border-radius: 10px; padding: 0.85rem 1rem;
  display: flex; justify-content: space-between;
  color: var(--warm); font-weight: 700; font-size: 0.95rem;
  margin-top: 0.4rem;
}

@media (max-width: 540px) {
  .table-scroll { display: none; }
  .capital-cards { display: block; }
}

/* ── ORGANIGRAMA ── */
#organigrama { background: var(--soft); }
.org-chart { margin-top: 3rem; display: flex; flex-direction: column; align-items: center; }
.org-node {
  background: var(--cream); border: 2px solid var(--caramel);
  border-radius: 12px; padding: 1rem 1.5rem;
  text-align: center; min-width: 180px;
}
.org-node.top { background: var(--brown); border-color: var(--brown); }
.org-node.top .node-name { color: var(--cream); }
.org-node.top .node-role { color: var(--warm); }
.node-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem; color: var(--brown); }
.node-role { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.org-line { width: 2px; height: 40px; background: var(--caramel); opacity: 0.5; }
.org-branches {
  display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center;
  position: relative;
}
.org-branches::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%;
  height: 2px; background: var(--caramel); opacity: 0.3;
}
.branch { display: flex; flex-direction: column; align-items: center; }
.branch-line { width: 2px; height: 30px; background: var(--caramel); opacity: 0.4; }

/* ── ACTA ── */
#acta { background: var(--cream); }
.acta-wrap {
  margin-top: 3rem; background: var(--soft);
  border: 1px solid rgba(201,122,47,0.2);
  border-radius: 20px; padding: 2.5rem;
}
.clausula {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(201,122,47,0.15);
  display: flex; gap: 1rem;
}
.clausula:last-child { border-bottom: none; }
.clausula-num {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem; font-weight: 700; color: var(--caramel);
  min-width: 90px; padding-top: 2px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.clausula-text { color: var(--text); font-size: 0.93rem; line-height: 1.65; }
.clausula-text strong { color: var(--brown); }

/* ── INTEGRANTES ── */
#integrantes { background: var(--soft); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.team-card {
  background: var(--cream); border-radius: 16px;
  padding: 1.75rem 1.25rem; text-align: center;
  border: 1px solid rgba(201,122,47,0.12); transition: all 0.3s;
}
.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--caramel);
  box-shadow: 0 8px 24px rgba(201,122,47,0.15);
}
.team-photo {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--warm);
  margin: 0 auto 1rem;
  display: block;
  background: var(--soft);
}
/* Placeholder shown when no src is set */
.team-photo-placeholder {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px dashed var(--caramel);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--caramel); font-size: 0.65rem; font-weight: 500;
  text-align: center; line-height: 1.3;
  background: var(--soft); letter-spacing: 0.03em;
}
.team-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem; font-weight: 700;
  color: var(--brown); margin-bottom: 0.3rem;
}
.team-role { font-size: 0.78rem; color: var(--caramel); font-weight: 500; letter-spacing: 0.04em; }

/* ── FOOTER ── */
footer {
  background: var(--brown); color: rgba(253,246,237,0.7);
  text-align: center; padding: 2.5rem 2rem; font-size: 0.85rem;
}

footer p { margin-top: 0.4rem; line-height: 1.6; }
.footer-rfc {
  display: inline-block; margin-top: 1rem;
  background: rgba(232,185,106,0.15);
  border: 1px solid rgba(232,185,106,0.3);
  color: var(--warm); padding: 0.4rem 1rem;
  border-radius: 100px; font-size: 0.8rem; letter-spacing: 0.1em;
}
.footer-note { margin-top: 1.5rem; font-size: 0.78rem; opacity: 0.5; }
.footer-easter { margin-top: 0.5rem; font-size: 0.72rem; opacity: 0.25; font-style: italic; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  nav { padding: 1rem 1.25rem; }
  nav ul { gap: 1rem; }
  nav ul a { font-size: 0.75rem; }
  .legal-grid { grid-template-columns: 1fr; }
  .acta-wrap { padding: 1.5rem; }
  .clausula { flex-direction: column; gap: 0.25rem; }
  .clausula-num { min-width: unset; }
}