/* ==========================================================================
   Deusto Founders · base styles (shared by every page)
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("../fonts/open-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Colour: monochrome, taken from the logo */
    --black: #0e0e0e;
    --charcoal: #262626;
    --graphite: #1b1b1b;
    --ink: #141414;
    --muted: #5c5c5c;
    --muted-light: #a3a3a3;
    --line: #e5e5e1;
    --line-dark: #2e2e2e;
    --paper: #f5f5f2;
    --white: #ffffff;

    /* Type */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-brand: "Open Sans", "Noto Sans", "Segoe UI", sans-serif;

    /* Shape: the logo is built from rounded pills */
    --radius-sm: 14px;
    --radius: 24px;
    --radius-lg: 36px;
    --pill: 999px;

    /* Layout */
    --container: 1160px;
    --gutter: 32px;
    --section-space: 120px;
    --header-height: 76px;

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}

img,
svg {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Helpers ---------- */

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 18px;
    border-radius: var(--pill);
    background: var(--white);
    color: var(--black);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

/* ---------- Brand lockup (logo mark + wordmark) ---------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand__mark {
    width: auto;
    height: 38px;
    fill: currentColor;
}

.brand__name {
    display: flex;
    flex-direction: column;
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.22;
    letter-spacing: -0.005em;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border: 1.5px solid transparent;
    border-radius: var(--pill);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
        transform 0.2s var(--ease);
}

.btn:active {
    transform: scale(0.98);
}

.btn--sm {
    min-height: 42px;
    padding: 0 20px;
    font-size: 0.9375rem;
}

.btn--block {
    width: 100%;
}

.btn--light {
    background: var(--white);
    color: var(--black);
}

.btn--light:hover {
    background: #e9e9e6;
}

.btn--dark {
    background: var(--black);
    color: var(--white);
}

.btn--dark:hover {
    background: var(--charcoal);
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--white);
}

.btn--ghost-light:hover {
    border-color: var(--white);
}

.btn--ghost-dark {
    border-color: var(--line);
    color: var(--black);
}

.btn--ghost-dark:hover {
    border-color: var(--black);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.link-arrow::after {
    content: "→";
    transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

/* ---------- Header & navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--black);
    color: var(--white);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-height);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-nav__list {
    display: flex;
    gap: 6px;
}

.site-nav__list a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--pill);
    color: var(--muted-light);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
    color: var(--white);
}

.site-nav__list a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--pill);
    background: transparent;
    cursor: pointer;
}

.nav-toggle__bar {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transform: translateX(-50%);
    transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}

.nav-toggle__bar:first-child {
    top: 17px;
}

.nav-toggle__bar:last-child {
    top: 23px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
}

/* ---------- Sections ---------- */

.section {
    padding-block: var(--section-space);
}

.section--tight {
    padding-block: 80px;
}

.section--paper {
    background: var(--paper);
}

.section--dark {
    background: var(--black);
    color: var(--white);
}

.section-head {
    max-width: 760px;
    margin-bottom: 56px;
}

.section-head--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    max-width: none;
}

.section-title {
    font-size: 3rem;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.section-lead {
    margin-top: 20px;
    color: var(--muted);
    font-size: 1.1875rem;
    max-width: 640px;
}

.section--dark .section-lead {
    color: var(--muted-light);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* tiny pill before every eyebrow, echoing the logo */
.eyebrow::before {
    content: "";
    width: 22px;
    height: 8px;
    border-radius: var(--pill);
    background: currentColor;
}

.eyebrow--light,
.section--dark .eyebrow {
    color: var(--muted-light);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------- Inner page header (dark band under the nav) ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 112px 0 104px;
    background: var(--black);
    color: var(--white);
}

.page-hero--compact {
    padding: 72px 0 80px;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.page-hero__title {
    font-size: 4rem;
    font-weight: 650;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.page-hero__lead {
    max-width: 640px;
    margin-top: 28px;
    color: var(--muted-light);
    font-size: 1.25rem;
    line-height: 1.55;
}

.page-hero__art {
    position: absolute;
    right: -40px;
    bottom: -90px;
    width: 380px;
    height: auto;
    fill: var(--graphite);
    pointer-events: none;
}

.back-link {
    display: flex;
    width: fit-content;
    margin-bottom: 32px;
    color: var(--muted-light);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}

.back-link:hover {
    color: var(--white);
}

/* ---------- Event card (used on home and events page) ---------- */

.event-grid {
    display: grid;
    gap: 16px;
}

.event-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 20px 28px 20px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    text-decoration: none;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.event-card:hover {
    border-color: var(--black);
}

.event-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 92px;
    border-radius: 20px;
    background: var(--black);
    color: var(--white);
    line-height: 1;
}

.event-card__day {
    font-size: 2rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.event-card__month {
    margin-top: 6px;
    color: var(--muted-light);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.event-card__title {
    font-size: 1.375rem;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.event-card__meta {
    color: var(--muted);
    font-size: 0.9375rem;
}

.event-card__arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    font-size: 1.125rem;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.event-card:hover .event-card__arrow {
    border-color: var(--black);
    background: var(--black);
    color: var(--white);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line-dark);
    background: var(--black);
    color: var(--white);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 36px;
}

/* logo and tagline side by side, split by a thin rule */
.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-footer__brand p {
    max-width: 300px;
    padding-left: 24px;
    border-left: 1px solid var(--line-dark);
    color: var(--muted-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.site-footer__nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.site-footer__nav a {
    color: var(--muted-light);
    font-size: 0.9375rem;
    text-decoration: none;
}

.site-footer__nav a:hover {
    color: var(--white);
}

.site-footer__bottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--gutter);
    right: var(--gutter);
    height: 1px;
    background: var(--line-dark);
}

.site-footer__bottom {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 22px;
    color: #7a7a7a;
    font-size: 0.8125rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-space: 96px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .page-hero__title {
        font-size: 3.25rem;
    }

    .page-hero__art {
        width: 300px;
        opacity: 0.8;
    }

    /* not enough room for brand + links on one row: stack them */
    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
}

/* Collapse navigation into a menu */
@media (max-width: 800px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 16px var(--gutter) 28px;
        background: var(--black);
        border-bottom: 1px solid var(--line-dark);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
    }

    .site-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(0, 0, 0, 0.6);
    }

    .site-nav__list {
        flex-direction: column;
        gap: 2px;
    }

    .site-nav__list a {
        padding: 14px 16px;
        border-radius: var(--radius-sm);
        font-size: 1.125rem;
    }

    .site-nav .btn {
        min-height: 52px;
        font-size: 1rem;
    }
}

/* Phone */
@media (max-width: 600px) {
    :root {
        --gutter: 20px;
        --section-space: 72px;
        --header-height: 64px;
    }

    body {
        font-size: 1rem;
    }

    .brand__mark {
        height: 32px;
    }

    .brand__name {
        font-size: 13px;
    }

    .btn {
        min-height: 50px;
        white-space: normal;
        text-align: center;
    }

    .section--tight {
        padding-block: 56px;
    }

    .section-head {
        margin-bottom: 36px;
    }

    .section-head--split {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section-title {
        font-size: 2rem;
        letter-spacing: -0.03em;
    }

    .section-lead {
        font-size: 1.0625rem;
    }

    .page-hero {
        padding: 64px 0 72px;
    }

    .page-hero--compact {
        padding: 48px 0 56px;
    }

    .page-hero__title {
        font-size: 2.5rem;
        letter-spacing: -0.04em;
    }

    .page-hero__lead {
        margin-top: 20px;
        font-size: 1.0625rem;
    }

    .page-hero__art {
        display: none;
    }

    .event-card {
        grid-template-columns: auto 1fr;
        gap: 16px;
        padding: 14px;
        border-radius: 20px;
    }

    .event-card__date {
        width: 64px;
        height: 72px;
        border-radius: 16px;
    }

    .event-card__day {
        font-size: 1.5rem;
    }

    .event-card__title {
        font-size: 1.125rem;
    }

    .event-card__meta {
        font-size: 0.875rem;
    }

    .event-card__arrow {
        display: none;
    }

    .site-footer__inner {
        gap: 24px;
        padding-top: 32px;
        padding-bottom: 28px;
    }

    .site-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .site-footer__brand p {
        padding-left: 0;
        border-left: 0;
    }

    .site-footer__nav ul {
        gap: 8px 20px;
    }

    .site-footer__bottom {
        flex-direction: column;
        gap: 2px;
        padding-top: 16px;
        padding-bottom: 20px;
    }
}
