/* =========================================================
   OITI — Design tokens
   Navy + academic blue, Lora display / Inter body
   ========================================================= */
:root {
    --navy: #1B1852;
    --navy-deep: #12103B;
    --blue: #0A95D6;
    --blue-light: #E6F4FB;
    --paper: #FAFAF9;
    --white: #FFFFFF;
    --ink: #2C2C38;
    --ink-soft: #62626F;
    --line: #E4E3EE;

    --font-display: 'Lora', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius: 10px;
    --shadow: 0 10px 30px rgba(18, 16, 59, 0.10);
    --shadow-sm: 0 3px 10px rgba(18, 16, 59, 0.08);
    --container: 1180px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 600;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--blue);
    color: var(--white);
    padding: .75em 1.25em;
    z-index: 999;
}
.skip-link:focus { left: 1em; top: 1em; }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   Layout helpers
   ========================================================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.85); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: .9em;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 800px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .85em 1.7em;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    border: 2px solid transparent;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
    cursor: pointer;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: #087cb3; transform: translateY(-1px); }
.btn-outline { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-white {
    background: var(--white);
    color: var(--blue);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.btn-white:hover { background: #eef6fb; transform: translateY(-1px); }

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    border-radius: 999px;
    padding: 8px 12px;
}
.brand-logo { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.brand-sub { font-size: .68rem; color: var(--ink-soft); letter-spacing: .02em; }

.primary-nav ul { display: flex; gap: 4px; }
.primary-nav a {
    display: block;
    padding: 10px 14px;
    font-size: .93rem;
    font-weight: 600;
    color: var(--navy);
    border-radius: 999px;
    transition: background-color .15s ease, color .15s ease;
    white-space: nowrap;
}
.primary-nav a:hover { background: var(--blue-light); color: var(--blue); }
.primary-nav a.is-active { background: var(--navy); color: var(--white); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--navy);
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .primary-nav.is-open { max-height: 480px; }
    .primary-nav ul { flex-direction: column; padding: 8px 24px 20px; gap: 2px; }
    .primary-nav a { padding: 12px 10px; border-radius: 8px; }
    .brand-sub { display: none; }
}

/* =========================================================
   Page hero (interior pages)
   ========================================================= */
.page-hero {
    position: relative;
    padding: 100px 0 64px;
    background-color: var(--navy);
    background-size: cover;
    background-position: center;
    color: var(--white);
}
.page-hero-inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.breadcrumb {
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    margin-bottom: 14px;
}
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: .3em; }
.hero-subtitle { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 680px; margin: 0; }

/* =========================================================
   Home — full hero
   ========================================================= */
.home-hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    background-color: var(--navy);
    background-size: cover;
    background-position: center;
    color: var(--white);
    overflow: hidden;
}
.home-hero-inner { max-width: 640px; margin: 0; padding: 150px 24px 80px clamp(24px, 6vw, 100px); position: relative; z-index: 2; }
.home-hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    max-width: 640px;
}
.home-hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 560px; }
.home-hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* =========================================================
   Card grids
   ========================================================= */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; margin-bottom: .4em; }
.card p { color: var(--ink-soft); margin-bottom: 0; }

.card--bg {
    background-size: cover;
    background-position: center;
    border: none;
}
.card--bg h3,
.card--bg p { color: var(--white); }
.card--bg p { color: rgba(255,255,255,.85); }
.card--bg .btn-ghost { border-color: rgba(255,255,255,.6); color: var(--white); }
.card--bg .btn-ghost:hover { border-color: var(--white); color: var(--white); }

.card--bg--mem { background-image: url('../assets/img/fondo1.jpg'); }
.card--bg--ourm { background-image: url('../assets/img/fondo2.jpg'); }
.card--bg--alum { background-image: url('../assets/img/fondo3.jpg'); }

/* Activity tiles (Home — "Our Activities") */
.activity-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.activity-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 22px;
    padding: 52px 24px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
    transition: background .2s ease;
}
.activity-tile:nth-child(3n) { border-right: none; }
.activity-tile:nth-child(n+4) { border-bottom: none; }
.activity-tile:hover { background: var(--blue-light); }
.activity-tile img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    opacity: 1;
    transition: transform .25s ease;
}
.activity-tile:hover img { transform: translateY(-3px) scale(1.06); }
.activity-tile span {
    position: static;
    background: none;
    padding: 0;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--navy);
    font-size: 1.05rem;
}
@media (max-width: 780px) {
    .activity-tiles { grid-template-columns: repeat(2, 1fr); }
    .activity-tile:nth-child(3n) { border-right: 1px solid var(--line); }
    .activity-tile:nth-child(2n) { border-right: none; }
    .activity-tile:nth-child(n+4) { border-bottom: 1px solid var(--line); }
    .activity-tile:nth-child(n+5) { border-bottom: none; }
}
@media (max-width: 480px) {
    .activity-tiles { grid-template-columns: 1fr; }
    .activity-tile { border-right: none; border-bottom: 1px solid var(--line); }
    .activity-tile:last-child { border-bottom: none; }
}

/* Members strip */
.members-strip { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; }
.members-strip img { height: 56px; width: auto; filter: grayscale(1); opacity: .7; transition: opacity .2s ease, filter .2s ease; }
.members-strip img:hover { filter: grayscale(0); opacity: 1; }

/* =========================================================
   Timeline — Tax Moot Court history (recovered custom widget,
   restyled to match the new design system)
   ========================================================= */
.timeline-wrap { padding: 40px 0 20px; }
.timeline {
    position: relative;
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.timeline::-webkit-scrollbar { height: 10px; }
.timeline::-webkit-scrollbar-track { background: var(--line); border-radius: 20px; }
.timeline::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 20px; }
.timeline ol {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    grid-template-rows: auto auto auto;
    row-gap: 16px;
    column-gap: 16px;
    padding: 20px;
}
.timeline li { list-style: none; display: contents; }
.timeline li .rail {
    grid-row: 2;
    grid-column: var(--col);
    width: 170px;
    height: 6px;
    border-radius: 4px;
    background: var(--line);
    position: relative;
    align-self: center;
    scroll-snap-align: start;
}
.timeline li:not(:last-child) .rail::after {
    content: "";
    position: absolute; right: -13px; top: 50%;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--blue); transform: translateY(-50%);
}
.timeline li .card-year {
    grid-row: 1;
    grid-column: var(--col);
    align-self: end;
    width: 220px;
    background: var(--navy);
    color: var(--white);
    padding: 16px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.timeline li:nth-child(even) .card-year { grid-row: 3; align-self: start; }
.timeline li .card-year time {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 4px;
}
.timeline li .card-year .host { color: rgba(255,255,255,.85); font-size: .85rem; margin-bottom: 8px; }
.timeline li .card-year .place { font-size: .82rem; margin: 0 0 4px; color: rgba(255,255,255,.9); }
.timeline li .card-year .place b { color: var(--white); }
.timeline li .card-year a.case-link {
    display: inline-block;
    margin-top: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--white);
    background: var(--blue);
    padding: 6px 12px;
    border-radius: 999px;
}
.timeline li .card-year a.case-link:hover { background: #087cb3; }
.timeline-hint { text-align: center; color: var(--ink-soft); font-size: .85rem; margin-top: 8px; }

/* =========================================================
   Annual Meeting — vertical stacked history
   ========================================================= */
.meeting-list { display: flex; flex-direction: column; gap: 0; }
.meeting-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}
.meeting-item:first-child { padding-top: 0; }
.meeting-meta { color: var(--ink-soft); font-size: .92rem; }
.meeting-meta .year { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.meeting-body h3 { font-size: 1.2rem; margin-bottom: .5em; }
.meeting-body p { color: var(--ink-soft); }
@media (max-width: 720px) {
    .meeting-item { grid-template-columns: 1fr; gap: 10px; }
}

/* =========================================================
   Docs / resources list (Tax Moot Court)
   ========================================================= */
.doc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.doc-card .num { font-family: var(--font-display); color: var(--blue); font-weight: 700; font-size: 1.4rem; display: block; margin-bottom: 6px; }
.doc-card h4 { margin-bottom: .6em; font-size: 1.02rem; }

/* =========================================================
   Two-column feature (mission / impact / etc.)
   ========================================================= */
.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } }
.feature-row h3 { font-size: 1.15rem; }
.feature-row p { color: var(--ink-soft); }

/* =========================================================
   Contact form
   ========================================================= */
.contact-form { max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.contact-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .contact-form .row-2 { grid-template-columns: 1fr; } }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    background: var(--white);
    color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); }
.contact-form .form-msg { font-size: .88rem; padding: 10px 14px; border-radius: 8px; display: none; }
.contact-form .form-msg.success { display: block; background: #E6F7EC; color: #1B7A3D; }
.contact-form .form-msg.error { display: block; background: #FCEBEC; color: #B3261E; }

/* =========================================================
   Podcast / Webinars
   ========================================================= */
.episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .episode-grid { grid-template-columns: 1fr; } }
.episode-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.episode-card img { aspect-ratio: 16/10; object-fit: cover; }
.episode-card .episode-body { padding: 20px; }
.episode-card .btn { margin-top: 10px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.75); }
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 56px 24px 32px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo { height: 50px; width: auto; max-width: 220px; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; margin: 0; max-width: 320px; }
.footer-heading { color: var(--white); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: .92rem; color: rgba(255,255,255,.75); }
.footer-nav a:hover { color: var(--blue); }
.footer-contact a { color: rgba(255,255,255,.85); font-size: .92rem; }
.footer-contact a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 24px; text-align: center; font-size: .8rem; color: rgba(255,255,255,.5); }

/* =========================================================
   Utilities
   ========================================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
