/* Base 2 · segunda ronda (aplica impeccable + taste-skill): sin kickers, sin bordes laterales de color, capa de hover común, entrada única del hero. */
:root {
  --bg: #fff; --fg: #141414; --muted: #55565a; --surface: #f3f3f2; --surface2: #e7e7e5; --line: #cfcfcc;
  --accent: #a21b1b; --accent-fg: #fff; --accent-text: #a21b1b; --link: #a21b1b;
  --dark: #111; --dark-fg: #fff; --dark-muted: #cfcfd3; --focus: #0b57d0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px; --maxw: 1240px; --gut: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
html.hc {
  --bg: #000; --fg: #fff; --muted: #fff; --surface: #000; --surface2: #000; --line: #fff;
  --accent: #ffe600; --accent-fg: #000; --accent-text: #ffe600; --link: #ffe600;
  --dark: #000; --dark-fg: #fff; --dark-muted: #fff; --focus: #00e5ff;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--muted) var(--surface); scroll-padding-top: 5rem; }
body { overflow-x: clip; margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--fg); background: var(--bg); }
::selection { background: var(--accent); color: var(--accent-fg); }
input, textarea { caret-color: var(--accent-text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--accent); color: var(--accent-fg); padding: .75rem 1rem; font-weight: 700; border-radius: 4px; }
.skip:focus { top: 8px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
[hidden] { display: none !important; }
.ph { display: grid; place-items: center; background: var(--surface2); color: var(--muted); font-size: .8125rem; text-align: center; padding: .5rem; border: 1px dashed var(--line); }
.tnum, .cal-grid, .date { font-variant-numeric: tabular-nums; }

/* Accesibilidad */
.a11y { display: inline-flex; align-items: center; gap: 4px; }
.a11y button { min-width: 40px; height: 40px; padding: 0 .5rem; border: 1px solid currentColor; background: transparent; border-radius: 4px; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.a11y button:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.a11y button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.a11y button:disabled { opacity: .4; cursor: not-allowed; background: transparent; color: inherit; border-color: currentColor; }
.a11y .sep { width: 1px; height: 20px; background: currentColor; opacity: .4; margin: 0 4px; }

/* Botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .55rem 1.2rem; border-radius: var(--radius); border: 2px solid var(--accent); background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 700; transition: transform .2s var(--ease), background .2s, color .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(.9); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.ghost { background: transparent; color: var(--accent-text); }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field { display: flex; align-items: center; gap: .5rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: .2rem .85rem; min-height: 50px; }
.field:focus-within { border-color: var(--focus); }
.field input, .field select { flex: 1; border: 0; background: transparent; min-height: 46px; outline: none; min-width: 0; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .cal-chip { min-height: 40px; padding: .3rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg); font-weight: 600; font-size: .9rem; transition: background .2s, border-color .2s; }
.chip:hover, .cal-chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"], .cal-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* Capa de hover (taste-skill): enlace con subrayado que se dibuja, tarjeta que sube 2px, foto que hace zoom 1.03 */
.ul-draw { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.ul-draw:hover, .ul-draw:focus-visible { background-size: 100% 1px; }
.lift { transition: transform .25s var(--ease); }
.lift:hover { transform: translateY(-2px); }
.zoom { overflow: hidden; display: block; }
.zoom img { transition: transform .6s var(--ease); }
a:hover .zoom img, .zoom:hover img, a.zoom:hover img { transform: scale(1.03); }
.card-link { color: inherit; text-decoration: none; }

/* Entrada del hero: una sola vez al cargar */
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
[data-enter] > * { animation: enter .8s var(--ease) backwards; }
[data-enter] > *:nth-child(2) { animation-delay: .08s; } [data-enter] > *:nth-child(3) { animation-delay: .16s; } [data-enter] > *:nth-child(4) { animation-delay: .24s; } [data-enter] > *:nth-child(5) { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Carrusel */
[data-carousel] { --per: 1; position: relative; }
.c-viewport { overflow: hidden; }
.c-track { display: flex; transition: transform .6s var(--ease); }
.c-slide { flex: 0 0 calc(100% / var(--per)); min-width: 0; }
.c-ctrl { display: flex; align-items: center; gap: 8px; }
.c-ctrl button { min-width: 44px; height: 44px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 50%; display: grid; place-items: center; padding: 0; transition: background .2s, transform .2s var(--ease); }
.c-ctrl button:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.c-ctrl button:active { transform: scale(.94); }
.c-dots { display: flex; gap: 2px; }
.c-dots button { width: 24px; height: 24px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; min-width: 24px; }
.c-dots button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.c-dots button[aria-current="true"]::after { background: currentColor; }
.c-dots button:hover { background: none; }
[data-play] .i-play { display: none; } [data-play]:not(.is-playing) .i-pause { display: none; } [data-play]:not(.is-playing) .i-play { display: block; }

/* Pestañas y acordeón */
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 4px; }
[role="tab"] { min-height: 46px; padding: .5rem 1.1rem; border: 1px solid var(--line); background: transparent; color: var(--fg); font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; transition: background .2s; }
[role="tab"]:hover { background: var(--surface); }
[role="tab"][aria-selected="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.acc-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; min-height: 52px; padding: .8rem 0; background: transparent; border: 0; font-weight: 700; }
.acc-btn::after { content: ""; width: .55em; height: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--ease); flex: none; }
.acc-btn[aria-expanded="true"]::after { transform: rotate(-135deg); }

/* Modal */
dialog { border: 0; padding: 0; border-radius: 8px; background: var(--bg); color: var(--fg); width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 60px -12px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.2); }
dialog[open] { animation: enter .35s var(--ease); }
dialog::backdrop { background: rgba(0,0,0,.65); }
html.hc dialog { border: 3px solid var(--fg); }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.m-head h2 { margin: 0; font-size: 1.1rem; }
.m-x { min-width: 44px; height: 44px; border: 1px solid var(--line); background: var(--bg); border-radius: 50%; font-size: 1.3rem; line-height: 1; transition: background .2s; }
.m-x:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.m-body { padding: 1rem; overflow: auto; max-height: calc(100vh - 110px); }
.m-body img { width: 100%; border-radius: 4px; margin-bottom: 1rem; }
.m-date { color: var(--muted); font-size: .9rem; margin: 0 0 .25rem; }
.m-note { color: var(--muted); font-size: .9rem; }
.s-list { margin-top: .75rem; display: grid; gap: 2px; }
.s-list a { display: grid; gap: 2px; padding: .6rem .75rem; border-radius: 4px; text-decoration: none; color: var(--fg); border: 1px solid transparent; }
.s-list a:hover, .s-list a:focus-visible { background: var(--surface); border-color: var(--line); }
.s-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); font-weight: 700; }

/* Calendario (sin bordes laterales de color) */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.cal-title { font-weight: 800; font-size: 1.15rem; margin: 0; }
.cal-head button { min-width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; border-radius: 50%; padding: 0; display: grid; place-items: center; transition: background .2s; }
.cal-head button:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.cal-head button.txt { width: auto; border-radius: 999px; padding: 0 .9rem; font-size: .875rem; font-weight: 600; }
.cal-grid table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal-grid th { font-size: .78rem; text-transform: uppercase; color: var(--muted); padding: .25rem 0; font-weight: 700; }
.cal-day { position: relative; width: 100%; aspect-ratio: 1.15; min-height: 44px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); padding: 4px 6px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .2s, background .2s; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.is-today .cal-n { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cal-day.has-ev { background: var(--surface2); }
.cal-day.is-sel { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.cal-dot { align-self: flex-end; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-size: .7rem; line-height: 18px; text-align: center; font-weight: 700; }
.cal-day:not(.has-ev) .cal-dot { display: none; }
.cal-day.is-sel .cal-dot { background: var(--accent-fg); color: var(--accent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .75rem; }
.cal-list { margin-top: 1rem; }
.cal-lead { font-weight: 800; margin-bottom: .5rem; }
.cal-list li { display: grid; gap: 2px; padding: .7rem 0; border-top: 1px solid var(--line); }
.cal-t { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); font-weight: 700; }
.cal-h, .cal-empty { color: var(--muted); font-size: .9rem; }
.cal-blank { padding: 0; }
.news-date { font-size: .8125rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { padding: 1rem; background: var(--surface); border-radius: var(--radius); }
.mod-ico { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; background: var(--surface2); color: var(--accent-text); border-radius: var(--radius); }
.mod-ico .ico { width: 34%; height: auto; max-height: 64%; aspect-ratio: 1; stroke-width: 1.5; }
html.hc a { text-decoration: underline; }
html.hc img:not(.logo) { filter: grayscale(1) contrast(1.15); }
html.hc img.logo { background: #fff; padding: .35rem .6rem; border-radius: 4px; filter: none; }
html.hc * { box-shadow: none !important; text-shadow: none !important; }
html.hc .btn, html.hc .chip, html.hc .cal-chip, html.hc .a11y button, html.hc [role="tab"], html.hc .cal-day { border-width: 2px; border-color: var(--fg); }
html.hc .shade { background: #000 !important; opacity: .85 !important; }

/* Texto largo o sin espacios no desborda (break-ui) */
h1, h2, h3, h4, p, li, a, dt, dd, td, th, summary, .m-note, .tn, .st, .rt, .tt, .tc, .sc, .cat { overflow-wrap: anywhere; }
.row, .srow, .prow, .trk, .task, .tile { min-width: 0; }
