:root {
  --burgundy: #6c1c2e;
  --burgundy-dark: #4a1220;
  --rose: #a96c7c;
  --gold: #a99577;
  --gold-text: #766344;
  --cream: #fbf4ef;
  --cream-2: #f4e6e0;
  --text: #2b2024;
  --muted: #6f6065;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(74, 18, 32, .12);
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --script: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--cream); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); }
.container { width: min(1120px, 100% - 32px); margin: 0 auto; }
svg { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }
svg.stroke, .icon-rail svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg .dot { fill: currentColor; stroke: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, calc((100% - 1120px) / 2));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(108, 28, 46, .12);
}
.brand { flex: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--burgundy-dark); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--burgundy); }
.nav a.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px;
  background: var(--burgundy); color: #fff; border-radius: 999px; padding: 10px 20px; border-bottom: 0;
}
.nav a.pill:hover { background: var(--burgundy-dark); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; font-size: 1.7rem; color: var(--burgundy); cursor: pointer; }

/* Typography */
h1, h2, h3 { font-family: var(--font); line-height: 1.1; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; color: var(--burgundy); margin: 0 0 20px; text-transform: uppercase; }
h2 span { color: var(--burgundy); }
h3 { color: var(--burgundy); font-weight: 700; }
.kicker {
  display: flex; align-items: center; gap: 14px; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold-text);
}
.kicker::after { content: ""; width: 70px; height: 1px; background: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 12px;
  padding: 14px 28px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .9rem; letter-spacing: .03em;
  background: var(--burgundy); color: #fff; box-shadow: 0 8px 20px rgba(108, 28, 46, .25); transition: .2s;
}
.btn:hover { background: var(--burgundy-dark); transform: translateY(-2px); }
.btn.light { background: #fff; color: var(--burgundy); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.btn.light:hover { background: var(--cream); }

.section { padding: 88px 0; }
.list { list-style: none; padding: 0; }
.list li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.list li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero::after {
  content: ""; position: absolute; right: -14%; bottom: -55%; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--burgundy), var(--burgundy-dark)); opacity: .95;
}
.hero::before {
  content: ""; position: absolute; right: 8%; bottom: -34%; width: 44%; aspect-ratio: 1; border-radius: 50%;
  border: 3px solid var(--gold); opacity: .6;
}
.hero-grid { display: flex; align-items: center; min-height: 620px; }
.hero-text { position: relative; z-index: 2; width: 40%; padding: 56px 0; }
.eyebrow { display: flex; align-items: center; gap: 14px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .85rem; color: var(--burgundy); margin: 0 0 8px; }
.eyebrow::after { content: ""; width: 64px; height: 2px; background: var(--gold); }
.hero h1 { margin: 0; font-size: clamp(3rem, 6.4vw, 5.2rem); font-weight: 900; color: var(--burgundy); letter-spacing: -.01em; line-height: .95; }
.script { font-family: var(--script); font-style: italic; font-weight: 600; font-size: clamp(1.8rem, 4.4vw, 3rem); color: var(--gold); margin: 6px 0 20px; line-height: 1.1; }
.hero h1 { margin: 0; font-size: clamp(3rem, 8vw, 5.6rem); font-weight: 900; color: var(--burgundy); letter-spacing: -.01em; line-height: .95; }
.script { font-family: var(--script); font-style: italic; font-weight: 600; font-size: clamp(1.8rem, 4.4vw, 3rem); color: var(--gold-text); margin: 6px 0 20px; line-height: 1.1; }
.lead { font-size: 1.15rem; font-weight: 500; max-width: 30em; }
.hero-text p:not(.lead):not(.script):not(.eyebrow) { max-width: 34em; color: var(--muted); }
/* La foto llega hasta el borde derecho de la pantalla para mostrar el documento y el rostro */
.hero-photo { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: min(60%, 880px); }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 35% 25%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%);
}

/* About */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: .85fr 1.2fr auto; gap: 48px; align-items: center; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 60% 30%; border-radius: 28px 120px 28px 28px; box-shadow: var(--shadow); }
.icon-rail { list-style: none; margin: 0; padding: 0 0 0 36px; border-left: 1px solid #e6d4cc; display: grid; gap: 22px; }
.icon-rail li { display: grid; justify-items: center; gap: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--burgundy); text-align: center; }
.icon-rail svg { width: 34px; height: 34px; }

/* Banner */
.banner { background: linear-gradient(100deg, var(--cream-2), #f1dcd8 60%, #ead0cc); border-block: 1px solid #e6d4cc; }
.banner-grid { display: grid; grid-template-columns: minmax(240px, 440px) 1fr; align-items: center; gap: 40px; padding: 28px 0; }
.banner-logo { width: 100%; }
.banner p { font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 600; color: var(--burgundy-dark); margin: 0; max-width: 24em; }

/* Work */
.work { background: var(--cream); }
.work-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.slants { display: flex; gap: 12px; }
.slants img { flex: 1; min-width: 0; height: 360px; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.slants img:nth-child(1) { transform: rotate(-3deg) translateY(10px); object-position: 40% center; }
.slants img:nth-child(2) { transform: translateY(-14px); object-position: 55% center; }
.slants img:nth-child(3) { transform: rotate(3deg) translateY(10px); object-position: 50% center; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 24px; }
.card { background: #fff; padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--burgundy); transition: transform .25s; }
.card:nth-child(2) { border-top-color: var(--gold); }
.card:nth-child(3) { border-top-color: var(--rose); }
.card:hover { transform: translateY(-5px); }
.card h3 { margin-top: 0; }

/* Results */
.results { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }
h3.group { margin: 48px 0 8px; display: inline-block; background: var(--burgundy); color: #fff; padding: 8px 22px; border-radius: 999px; font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 24px 0 32px; }
.stat { background: #fff; padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); border-bottom: 4px solid var(--gold); }
.stat strong { display: block; font-size: 2rem; color: var(--burgundy); line-height: 1.2; margin-bottom: 6px; font-weight: 800; }
.stat span { font-size: .92rem; color: var(--muted); }
.stat:nth-child(odd) { background: var(--burgundy); border-bottom-color: var(--gold); }
.stat:nth-child(odd) strong { color: #fff; }
.stat:nth-child(odd) span { color: #f0dcdf; }
.detail { background: #fff; border-radius: var(--radius); padding: 18px 26px; margin-bottom: 16px; box-shadow: var(--shadow); border-left: 5px solid var(--gold); }
.detail summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; color: var(--burgundy); }

/* Expandable text */
.more { margin: 6px 0 0; }
.more summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--burgundy); list-style: none; padding: 6px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 1rem; line-height: 1; }
.more[open] summary::after { content: "–"; }
.more p, .more .list { font-size: .95rem; color: var(--muted); }
.more.light summary { color: #fff; }
.more.light p { color: #f0dcdf; }
.card-icon { width: 44px; height: 44px; margin-bottom: 12px; fill: none; stroke: var(--burgundy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Results topics */
.results-head { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: center; margin-bottom: 32px; }
.results-head p { margin: 0 0 8px; }
.results-head .hint { font-size: .85rem; color: var(--gold-text); font-weight: 600; }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); }
.topic {
  display: grid; justify-items: center; align-content: start; gap: 12px; padding: 22px 14px;
  background: transparent; border: 0; border-left: 1px solid #e0cbc3; border-bottom: 4px solid transparent;
  font: inherit; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--burgundy);
  cursor: pointer; transition: .2s;
}
.topic:first-child { border-left: 0; }
.topic svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.topic:hover { background: rgba(255, 255, 255, .6); }
.topic.active { background: #fff; border-bottom-color: var(--burgundy); border-radius: 14px 14px 0 0; box-shadow: var(--shadow); }
.panels { background: #fff; border-radius: 0 0 var(--radius) var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel[hidden] { display: none; }
.panel .stats { margin: 0 0 16px; }
.panel .stat strong { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.panel .stat:nth-child(odd) { background: var(--burgundy); }
.panel .stat:nth-child(even) { background: var(--cream); }
.panel .detail { box-shadow: none; background: var(--cream); margin: 0; }

/* Reports */
.reports { background: linear-gradient(100deg, var(--burgundy-dark), var(--burgundy)); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.reports::after { content: ""; position: absolute; right: 6%; top: -70%; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(169, 149, 119, .45); }
.reports-grid { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.reports h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.reports p { margin: 0 0 8px; color: #f0dcdf; }
.wa-big { width: 84px; height: 84px; padding: 18px; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .6); border-radius: 50%; }
.note { font-size: .9rem; color: #f3d9a8 !important; }

/* News */
.news { background: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 28px; }
.news-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s; }
.news-card:hover { transform: translateY(-5px); }
.news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 60% 30%; }
.news-card div { padding: 18px 22px 22px; }
.news-card h3 { font-size: 1rem; line-height: 1.35; margin: 0 0 10px; }
.news-card time { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--gold-text); }

/* Contact */
.contact { background: var(--cream); text-align: center; }
.contact h2::after, .news h2::after { content: ""; display: block; width: 60px; height: 3px; background: var(--gold); margin: 12px auto 0; }
.news h2::after { margin-left: 0; }
.social { list-style: none; padding: 0; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--burgundy); border: 2px solid var(--burgundy); transition: .2s; }
.social a:hover { background: var(--burgundy); color: #fff; }

/* Footer */
.site-footer { background: #fff; padding: 36px 0; text-align: center; border-top: 4px solid var(--burgundy); }
.foot-logo { height: 46px; width: auto; margin: 0 auto 16px; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.site-footer nav a { text-decoration: none; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--burgundy-dark); }
.small { font-size: .8rem; color: var(--muted); margin: 18px 0 0; }

/* Aviso de privacidad */
.legal-back { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--burgundy-dark); }
.legal-back:hover { text-decoration: underline; }
.legal .container { max-width: 760px; }
.legal h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--burgundy); }
.legal h2 { margin: 40px 0 12px; font-size: 1.15rem; font-weight: 700; text-transform: none; }
.legal-date { margin: 0; font-size: .85rem; color: var(--muted); }
.legal mark { padding: 0 4px; font-weight: 600; }
.reports p a { color: #fff; font-weight: 600; }

/* Reveal */
/* Usa animation y la propiedad translate para no pisar los transform y transition propios de cada elemento (hover, fotos inclinadas). */
@keyframes reveal { from { opacity: 0; translate: 0 22px; } }
.reveal:not(.visible) { opacity: 0; }
.reveal.visible { animation: reveal .7s; }
@media (prefers-reduced-motion: reduce) {
  .reveal:not(.visible) { opacity: 1; }
  .reveal.visible { animation: none; }
  html { scroll-behavior: auto; }
}

/* El menú completo necesita unos 1030 px junto al logo */
@media (max-width: 1040px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(0, 0, 0, .12); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid #f1e4de; }
  .nav a.pill { justify-content: center; margin: 12px 0 0; }
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr 1.2fr; }
  .icon-rail { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); padding: 24px 0 0; border-left: 0; border-top: 1px solid #e6d4cc; }
  .work-grid { grid-template-columns: 1fr; }
  .results-head { grid-template-columns: 1fr; gap: 16px; }
  .reports-grid { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(0, 0, 0, .12); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid #f1e4de; }
  .nav a.pill { justify-content: center; margin: 12px 0 0; }
  .hero-grid { flex-direction: column; min-height: 0; }
  .hero-text { width: 100%; padding: 40px 0 24px; }
  .hero-photo { position: relative; width: auto; height: 400px; order: -1; align-self: stretch; margin: 0 -16px; }
  .hero-photo img { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 25%); mask-image: linear-gradient(to top, transparent 0, #000 25%); object-position: 50% 20%; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-text { padding: 40px 0 24px; }
  .hero-photo { height: 440px; order: -1; margin: 0 -16px; }
  .hero-photo img { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 25%); mask-image: linear-gradient(to top, transparent 0, #000 25%); object-position: 100% 20%; }
  .hero::after { width: 120%; right: -40%; bottom: -80%; }
  .hero::before { display: none; }
  .section { padding: 56px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo img { aspect-ratio: 4 / 4.2; }
  .icon-rail { grid-template-columns: repeat(2, 1fr); }
  .banner-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .banner p { margin: 0 auto; }
  .slants img { height: 240px; }
  .topics { grid-template-columns: repeat(2, 1fr); }
  .topic:nth-child(3) { border-left: 0; }
  .topic.active { border-radius: 14px; }
  .panels { border-radius: var(--radius); margin-top: 12px; padding: 20px; }
  /* Áreas táctiles de al menos 44 px */
  .more summary { min-height: 44px; }
  .site-footer nav { gap: 0 14px; }
  .site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .small a { display: inline-block; padding: 12px 4px; }
}
