:root {
    --bg: #2d3a44;
    --bg-deep: #232d35;
    --bg-alt: #344450;
    --text: #f1ece2;
    --text-muted: #c4bdae;
    --accent: #9B191C;
    --accent-hover: #b8262a;
    --border: rgba(241, 236, 226, 0.15);
    --max-width: 1100px;
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.narrow { max-width: 760px; }
.center  { text-align: center; }

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    transition: color .2s ease;
}
a:hover { color: var(--accent-hover); }

/* ---------- Hero (header) ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 72px;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(70, 90, 105, 0.45), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(40, 55, 65, 0.55), transparent 60%),
        linear-gradient(160deg, #354553 0%, #2a363f 55%, #1f2930 100%);
    display: block;
}

/* SVG grain overlay for the worn/paper texture */
.hero-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 18px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    line-height: 1.05;
    margin: 0 0 28px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text);
    margin: 0 0 8px;
    max-width: 30ch;
}

.hero-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.05em;
}

/* Flyer */
.hero-flyer {
    margin: 0;
    max-width: 360px;
    justify-self: center;
}
.zoom-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform .25s ease, box-shadow .25s ease;
}
.zoom-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 8px 22px rgba(0, 0, 0, 0.35);
}
.zoom-trigger:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
.zoom-trigger img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Hojas del programa ---------- */
.programa-sheets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    margin-top: 36px;
}
.programa-sheets figure { margin: 0; }
.programa-sheets figcaption {
    margin-top: 12px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 20, 25, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
    animation: lightboxIn .2s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.1); }
.lightbox-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Tabs ---------- */
.tabs {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.tabs-inner {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }

.tabs [role="tab"] {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    padding: 22px 22px;
    cursor: pointer;
    position: relative;
    transition: color .2s ease, background .2s ease;
    white-space: nowrap;
}
.tabs [role="tab"]:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}
.tabs [role="tab"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}
.tabs [role="tab"][aria-selected="true"] {
    color: var(--text);
}
.tabs [role="tab"][aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    background: var(--accent);
}

/* ---------- Panels ---------- */
.panels { display: block; }

.panel {
    padding: 72px 0 88px;
    animation: fadeIn .25s ease-out;
}
.panel[hidden] { display: none; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 36px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.sub {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 1rem;
    margin: 36px 0 14px;
    color: var(--text);
}

.lead {
    font-size: 1.1rem;
    color: var(--text);
}

.muted { color: var(--text-muted); }

.plain-list, .todo-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.plain-list li, .todo-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}
.plain-list li:last-child, .todo-list li:last-child { border-bottom: 0; }

/* TODO markers — visible but not garish */
.todo {
    color: var(--accent);
    background: rgba(155, 25, 28, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
    font-style: italic;
    font-size: 0.95em;
}

.deadline-card {
    margin-top: 36px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}
.deadline-label {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.deadline-date {
    font-size: 1.4rem;
    font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 26px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: var(--text);
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--text); }

.btn-large { padding: 18px 36px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
    padding: 40px 0;
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.site-footer p { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero { padding: 56px 0 48px; }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-flyer { max-width: 260px; }
    .panel { padding: 56px 0 72px; }
    .tabs [role="tab"] { padding: 18px 16px; font-size: 12px; }
}

@media (max-width: 480px) {
    body { font-size: 16px; }
    .container { padding: 0 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
    .btn:hover { transform: none; }
    .panel { animation: none; }
}
