/* =========================================================
   EXPOCASPE 2026 · Estilos comunes de las subpáginas
   (programa, jornadas técnicas, municipio invitado, empresa del año)
   Mismos tokens, cabecera y pie que index.html
   ========================================================= */
:root {
  --cream:        #F8E9C4;
  --cream-2:      #F2DEB0;
  --bone:         #FCF3D9;
  --ink:          #1B2A4E;
  --ink-soft:     #22345E;
  --wine:         #1E5BA8;
  --wine-deep:    #14427C;
  --terracotta:   #E8841A;
  --ochre:        #E8A92B;
  --olive:        #7A8F3F;
  --olive-soft:   #B8CC6A;
  --garnet:       #8C1F2A;
  --garnet-soft:  #C4505C;
  --muted:        #7D6F55;
  --line:         rgba(27,42,78,.12);
  --line-strong:  rgba(27,42,78,.3);
  --f-display:    "Fraunces", "Times New Roman", serif;
  --f-body:       "Instrument Sans", -apple-system, system-ui, sans-serif;
  --radius:       2px;
  --ease:         cubic-bezier(.2,.7,.2,1);
  --header-h:     78px;
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 70px); }
body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1360px; padding: 0 32px; margin: 0 auto; }
.container--narrow { max-width: 980px; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--wine);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 22px; height: 1px;
  background: currentColor; vertical-align: middle; margin: 0 12px 3px 0;
}
.marker {
  font-family: var(--f-display); font-weight: 300; font-style: italic;
  font-size: 14px; color: var(--muted); letter-spacing: .1em;
}

/* ---------- TOPBAR ---------- */
.topbar { background: var(--ink); color: var(--cream); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar .dates { font-weight: 500; }
.topbar .dates span { color: var(--ochre); margin: 0 10px; }
.topbar nav { display: flex; gap: 22px; align-items: center; }
.topbar nav a { opacity: .7; transition: opacity .2s; }
.topbar nav a:hover { opacity: 1; }
.topbar nav a.ig { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- HEADER ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,233,196,.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.site .container {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; height: var(--header-h); gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 44px; width: auto; }
.logo sup {
  font-weight: 600; font-size: 11px; letter-spacing: .18em;
  color: var(--muted); text-transform: uppercase; align-self: center; padding-top: 2px;
}
header.site nav.primary { display: flex; justify-content: center; gap: 30px; }
header.site nav.primary a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color .2s;
}
header.site nav.primary a:hover,
header.site nav.primary a[aria-current="page"] { color: var(--wine); }
header.site nav.primary a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--wine);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
header.site nav.primary a:hover::after,
header.site nav.primary a[aria-current="page"]::after { transform: scaleX(1); }
header.site nav.primary > .btn { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  background: var(--ink); color: var(--cream);
  font-size: 13px; font-weight: 500; letter-spacing: .05em;
  border-radius: 100px;
  transition: background .25s, transform .25s var(--ease), color .25s;
}
.btn:hover { background: var(--wine); transform: translateY(-1px); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--cream:hover { background: var(--ochre); color: var(--ink); }
.hamburger { display: none; }

/* ---------- MIGAS / VOLVER ---------- */
.crumbs {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.crumbs a { color: var(--wine); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- CABECERA DE PÁGINA ---------- */
.page-hero { padding: 70px 0 60px; position: relative; overflow: hidden; }
.page-hero h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(48px, 8vw, 120px);
  line-height: .92; letter-spacing: -.035em;
  margin: 22px 0 26px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.page-hero h1 em { font-style: italic; font-weight: 300; color: var(--wine); }
.page-hero .lede { max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

.section { padding: 100px 0; }
.section--bone { background: var(--bone); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--ink { background: var(--ink); color: var(--cream); }
.section-title {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(38px, 5vw, 68px); line-height: 1; letter-spacing: -.03em;
  margin: 16px 0 24px;
}
.section-title em { font-style: italic; font-weight: 400; color: var(--wine); }
.section--ink .section-title em { color: var(--ochre); }
.prose p { font-size: 17px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 18px; }
.prose p strong { color: var(--ink); }

/* ---------- PIE ---------- */
footer.site { background: var(--ink); color: var(--cream); padding: 80px 0 40px; }
footer.site .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; }
footer .logo img { height: 52px; filter: brightness(0) invert(1); opacity: .95; }
footer .tagline { margin-top: 18px; font-size: 14px; line-height: 1.6; color: rgba(248,233,196,.6); max-width: 320px; }
footer h5 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ochre); font-weight: 600; margin: 0 0 20px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 10px; font-size: 14px; }
footer ul a { color: rgba(248,233,196,.75); transition: color .2s; }
footer ul a:hover { color: var(--ochre); }
footer .social { display: flex; gap: 12px; margin-top: 20px; }
footer .social a {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(248,233,196,.2); border-radius: 50%; transition: all .25s;
}
footer .social a:hover { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
footer .legal {
  grid-column: 1/-1; margin-top: 60px; padding-top: 30px;
  border-top: 1px solid rgba(248,233,196,.12);
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(248,233,196,.5);
}

footer .legal a { margin-left: 24px; color: rgba(248,233,196,.6); }
footer .legal a:hover { color: var(--ochre); }

/* ---------- ANIMACIONES ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
/* si el JS tarda o falla, el contenido aparece igualmente a los 2,5 s */
@keyframes show { to { opacity: 1; } }
.reveal { opacity: 0; animation: show .4s 2.5s forwards; }
.reveal.is-in { animation: rise .9s var(--ease) forwards; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .reveal.is-in { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE COMÚN ---------- */
@media (max-width: 1280px) {
  header.site nav.primary { gap: 20px; }
  header.site .container { gap: 20px; }
}
@media (max-width: 1080px) {
  footer.site .container { grid-template-columns: 1fr 1fr; gap: 40px; }
  .topbar nav a.hide-md { display: none; }
}
header.site nav.primary a { white-space: nowrap; }
@media (max-width: 1100px) {
  :root { --header-h: 64px; }
  .container { padding: 0 22px; }
  header.site nav.primary {
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column; gap: 0;
    padding: 20px 22px 30px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 50px -20px rgba(27,42,78,.25);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .25s var(--ease);
    z-index: 49; max-height: calc(100vh - 64px); overflow-y: auto;
  }
  header.site nav.primary.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  header.site nav.primary a {
    font-family: var(--f-display); font-size: 26px; letter-spacing: -.015em;
    padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%;
  }
  header.site nav.primary a::after { display: none; }
  header.site nav.primary > .btn {
    display: inline-flex; align-self: flex-start; width: auto; margin-top: 22px;
    font-family: var(--f-body); font-size: 13px; padding: 13px 22px; border-bottom: 0;
  }
  .hamburger {
    display: flex; flex-direction: column; gap: 5px;
    width: 40px; height: 40px; justify-content: center; align-items: center;
    z-index: 51; position: relative;
  }
  .hamburger span { width: 22px; height: 1.5px; background: var(--ink); display: block; transition: transform .3s var(--ease), opacity .2s; }
  .hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  header.site .container > .btn { display: none; }
  header.site .container { grid-template-columns: 1fr auto; }
  .logo img { height: 36px; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 720px) {
  .topbar .container { height: auto; padding: 8px 22px; flex-wrap: nowrap; gap: 14px; }
  .topbar nav { display: flex; }
  .topbar .ig-txt { display: none; }
  .page-hero { padding: 44px 0 40px; }
  .page-hero .lede { font-size: 16.5px; }
  .section { padding: 70px 0; }
  .prose p { font-size: 16px; }
  footer.site .container { grid-template-columns: 1fr; }
  footer .legal { flex-direction: column; gap: 12px; }
  footer .legal a { margin: 0 16px 0 0; }
}
