/* =========================================================================
   theme.css  ·  Sistema de diseño y chrome de Meta-Data
   Fichero único. Tokens, base, botones, bandas, cabecera, mega menú, menú
   móvil, selector de idioma, pie y utilidades de revelado.
   El CSS específico de cada página vive en su propia página, no aquí.
   Reglas tomadas verbatim de los prototipos aprobados.
   ========================================================================= */

:root{
  --navy-950:#0A1626; --navy-800:#0E2140; --navy-600:#1E3C61; --panel:#0F2A4A; --stroke-dark:#2C4A75;
  --ink:#16243A; --slate:#46597A; --read:#2C3A52; --sec:#5A6E8C; --mist:#8FA2BC; --line:#E3E9F2;
  --paper:#F7F9FC; --soft:#F2F5FA;
  --blue:#0B6CF2; --blue-d:#0857C7; --cyan:#2BD9FF; --cyan-soft:#7FE7FF; --green:#3DDC97;
  --s2:16px; --s3:24px; --s4:32px; --s5:48px; --s6:64px;
  --radius:16px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; color-scheme:light;}
body{font-family:'Montserrat',sans-serif; color:var(--read); background:#fff; font-size:17px; line-height:1.7; -webkit-font-smoothing:antialiased;}
::selection{background:var(--blue); color:#fff;}
.wrap{max-width:1180px; margin:0 auto; padding:0 36px;}
.mono{font-family:'Montserrat',sans-serif; font-weight:600; font-size:12px;}
.frame .mono{font-family:'IBM Plex Mono',monospace; font-weight:400; font-size:13px;}
.eyebrow{display:flex; align-items:center; gap:10px; font-family:'Montserrat',sans-serif; font-size:12px; font-weight:700; letter-spacing:0.14em; color:var(--blue); text-transform:uppercase; margin-bottom:20px;}
.eyebrow::before{content:''; width:18px; height:2px; border-radius:2px; background:currentColor; flex:none;}
.band-deep .eyebrow{color:var(--cyan-soft);}
.hi{color:var(--blue);}
.band-deep .hi{color:var(--cyan);}
.glo{filter:drop-shadow(0 0 6px rgba(43,217,255,.75));}
.btn{display:inline-block; padding:15px 26px; border-radius:10px; font-size:15px; font-weight:600; text-decoration:none; cursor:pointer; white-space:nowrap; transition:background .18s,border-color .18s,color .18s,transform .18s;}
.btn:active{transform:translateY(1px);}
.btn-solid{background:var(--blue); color:#fff;}
.btn-solid:hover{background:var(--blue-d); box-shadow:0 10px 24px rgba(11,108,242,.28);}
.btn-ghost{border:1.5px solid #C9D4E4; color:var(--ink);}
.btn-ghost:hover{border-color:var(--blue); color:var(--blue);}
.btn-cyan{background:var(--cyan); color:var(--navy-950);}
.btn-cyan:hover{background:#5BE2FF;}

/* Cabecera, navegación y mega menú */
header{position:sticky; top:0; background:rgba(255,255,255,.96); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); z-index:10;}
.nav{display:flex; align-items:center; justify-content:space-between; gap:var(--s3); height:80px; position:relative;}
.nav img{height:34px; width:auto; display:block;}
.links{display:flex; align-items:center; gap:30px; font-size:14px; font-weight:600; color:var(--slate); margin-left:auto; margin-right:var(--s3);}
.links a{color:inherit; text-decoration:none; transition:color .15s;}
.links a:hover{color:var(--blue);}
.has-mega{display:flex; align-items:center; height:80px;}
.has-mega > a{display:inline-flex; align-items:center; gap:6px;}
.mega{display:none; position:absolute; top:100%; left:50%; transform:translateX(-50%); background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 24px 60px rgba(13,38,76,.13); padding:30px 32px; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px 40px; width:min(900px, calc(100vw - 40px)); z-index:20;}
.has-mega:hover .mega, .has-mega:focus-within .mega{display:grid;}
.has-mega.open .mega{display:grid;}
.mega a{display:block; font-size:13px; padding:4px 0; font-weight:600;}
.mega .mt{font-size:14px; font-weight:700; color:var(--ink); padding:0 0 8px;}
.mega .vt{color:var(--blue); font-size:13px; padding-top:6px;}
.nav-cta{padding:12px 20px; font-size:14px;}

/* Selector de idioma */
.lang{display:inline-flex; align-items:center; gap:7px; margin-right:16px;}
.lang button, .lang a{font-family:inherit; font-size:13px; font-weight:700; color:var(--mist); background:none; border:none; cursor:pointer; padding:4px 2px; transition:color .15s; text-decoration:none;}
.lang button.on, .lang a.on{color:var(--ink);}
.lang button:hover, .lang a:hover{color:var(--blue);}
.lang span{width:1px; height:13px; background:var(--line); display:block;}

/* Menú móvil y hamburguesa */
.burger{display:none; flex-direction:column; justify-content:center; gap:5px; width:44px; height:44px; border:0; background:transparent; cursor:pointer; padding:0;}
.burger span{display:block; width:24px; height:2px; background:var(--ink); border-radius:2px; margin:0 auto; transition:transform .25s ease, opacity .2s ease;}
.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.burger[aria-expanded="true"] span:nth-child(2){opacity:0;}
.burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
.mobnav{display:none; border-top:1px solid var(--line); background:#fff;}
.mobnav .mob-inner{display:flex; flex-direction:column; padding:10px 0 22px;}
.mobnav .mob-link, .mob-acc-t{font-size:16px; font-weight:600; color:var(--ink); padding:14px 2px; text-decoration:none; border-bottom:1px solid var(--line);}
.mob-acc-t{display:flex; align-items:center; justify-content:space-between; width:100%; background:transparent; border-top:0; border-left:0; border-right:0; cursor:pointer; font-family:inherit; text-align:left;}
.mob-acc-t svg{transition:transform .25s ease;}
.mob-acc-t[aria-expanded="true"] svg{transform:rotate(180deg);}
.mob-acc-p{display:none; flex-direction:column; padding:2px 0 8px 12px;}
.mob-acc-p.open{display:flex;}
.mob-acc-p a{font-size:15px; font-weight:500; color:var(--slate); padding:11px 2px; text-decoration:none;}
.mob-cta{margin-top:18px; text-align:center; justify-content:center; border-bottom:0;}

/* Bandas y títulos de sección */
.band{padding:88px 0; background:#fff;}
.band-soft{background:var(--soft);}
.band-deep{background:var(--navy-950); color:#fff; position:relative; overflow:hidden;}
h1, .hl{font-family:'Montserrat',sans-serif; font-weight:700; color:var(--ink); line-height:1.14; letter-spacing:-0.02em; margin-bottom:22px; font-size:clamp(32px,3.9vw,45px);}
h2{font-family:'Montserrat',sans-serif; font-size:clamp(28px,3vw,36px); font-weight:700; color:var(--ink); line-height:1.18; letter-spacing:-0.012em; margin-bottom:24px;}
.head{max-width:none; margin-bottom:40px;}
.crumbs{display:flex; gap:8px; font-size:13px; font-weight:600; color:var(--mist); margin-bottom:22px;}
.crumbs a{color:inherit; text-decoration:none;}
.crumbs a:hover{color:var(--blue);}
.crumbs i{font-style:normal; color:#C2CDDD;}

/* Pie */
footer{background:#fff; border-top:1px solid var(--line); padding:var(--s6) 0 var(--s3); font-size:14px;}
footer img{height:30px; width:auto; display:block; margin-bottom:var(--s2);}
footer .news{display:flex; align-items:center; justify-content:space-between; gap:var(--s4); flex-wrap:wrap; padding-bottom:var(--s5); border-bottom:1px solid var(--line); margin-bottom:var(--s5);}
footer .news h3{font-family:'Montserrat',sans-serif; font-size:18px; font-weight:700; color:var(--ink); margin-bottom:8px;}
footer .news p{font-size:14px; color:var(--sec); max-width:52ch;}
footer .news form{display:flex; flex-direction:column; align-items:flex-end; gap:10px;}
footer .news .news-row{display:flex; gap:10px; flex-wrap:wrap;}
.nf{border:1px solid #CBD6E5; border-radius:10px; padding:13px 16px; font-family:'Montserrat',sans-serif; font-size:15px; min-width:260px; color:var(--ink); background:#fff;}
.nf:focus{outline:none; border-color:var(--blue);}
.nf::placeholder{color:#8FA2BC; opacity:1;}
.hp-news{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;}
.cf-turnstile-news{flex-basis:100%; display:none; margin-top:4px;}
.cf-turnstile-news.show{display:block;}
.news-msg{flex-basis:100%; margin-top:8px; font-size:13px; font-weight:600; color:var(--green);}
.news-msg.err{color:#C2453A;}
footer .cols{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:var(--s4); padding-bottom:var(--s5);}
footer .desc{font-size:14px; color:var(--sec); max-width:34ch; line-height:1.65;}
footer h4{font-family:'Montserrat',sans-serif; color:var(--ink); font-size:11px; font-weight:700; letter-spacing:0.14em; text-transform:uppercase; margin-bottom:var(--s2);}
footer a{display:block; color:var(--slate); text-decoration:none; padding:5px 0; transition:color .15s;}
footer a:hover{color:var(--blue);}
footer .base{display:flex; justify-content:space-between; align-items:center; gap:var(--s2); flex-wrap:wrap; padding-top:var(--s3); border-top:1px solid #EBF0F7; font-size:13px; color:var(--mist);}
footer .base nav{display:flex; gap:18px;}
footer .base nav a{display:inline; padding:0; color:var(--mist);}
.tlink{color:var(--blue); font-weight:600; text-decoration:none; border-bottom:1.5px solid rgba(11,108,242,.35); transition:border-color .15s;}
.tlink:hover{border-color:var(--blue);}
:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}

/* Revelado al hacer scroll */
.reveal{animation:fadeUp .6s ease both;}
@keyframes fadeUp{from{opacity:0; transform:translateY(16px);} to{opacity:1; transform:none;}}

/* Responsive del chrome */
@media (max-width:1100px){
  .links{gap:22px; font-size:14px;}
  .mega{gap:24px 32px;}
}
@media (max-width:920px){
  h1,.hl{font-size:30px;}
  .links{display:none;}
  .nav-cta{display:none;}
  .lang{display:none;}
  .burger{display:flex;}
  .mobnav.open{display:block;}
  footer .news{flex-direction:column; align-items:stretch;}
  footer .news form{width:100%; align-items:stretch;}
  footer .news .news-row{width:100%;}
  footer .news .nf{flex:1; min-width:0;}
  footer .cols{grid-template-columns:1fr 1fr;}
}
@media (prefers-reduced-motion: reduce){
  .reveal{animation:none;}
}
