/*
 * Shared by every code-drawn page (Content_Page_Shortcode loads it before the page's own CSS).
 *
 * THE DESIGN TOKENS. Every colour, font, text size, line height, weight, spacing step, section
 * padding, radius and shadow that is (or is likely to be) used more than once is defined here, once.
 * Pages use them (var(--mo-h2), var(--mo-space-md), var(--mo-magenta)…) and never type the value
 * themselves, so a site-wide change is a one-line change here:
 *   "All H1s a little larger on phones"   → --mo-h1 in the phone block below
 *   "New heading font everywhere"          → --mo-font-heading
 *   "More space between sections"          → --mo-section-*
 * A genuine one-off may type its own value in the page's CSS, with a comment saying why.
 *
 * Sizes go by ROLE, not by HTML tag: a card title that is an <h3> for the page's structure still
 * uses --mo-h4 if that's how big it looks. The h1–h5 defaults below are only a starting point.
 *
 * Values are the Elementor kit's (Site Settings → Global Colours/Fonts, post 41) and measured from
 * the Elementor pages (Dec 2026). The magenta is under review by Brand Design: don't change it
 * without them.
 *
 * Breakpoints can't be variables (CSS doesn't allow them in @media), so every file uses these, as
 * Elementor does:
 *   tablet and below   @media (max-width: 1024px)
 *   phone              @media (max-width: 767px)
 *   (body text shrinks at max-width: 880px, the kit's own step)
 *
 * Every rule is under #mevents-oxford-page, so nothing reaches the header, footer or other pages.
 */

/*
 * Gotham comes from the site's Adobe Fonts kit with font-display "auto": the page is laid out in a
 * stand-in font first, then again when Gotham arrives. This stand-in is Arial scaled to Gotham's
 * width, ascent and descent (measured in Chrome: Gotham is 110.75% Arial's width at 400, 112.33% at
 * 500), so the swap barely moves anything. If the font changes, this stand-in needs re-measuring.
 */
@font-face {
    font-family: "mo-gotham-fallback";
    src: local("Arial"), local("ArialMT");
    size-adjust: 111%;
    ascent-override: 96%;
    descent-override: 30%;
    line-gap-override: 0%;
}

#mevents-oxford-page {
    /* ---------- Colours: the Elementor kit's, darkest to lightest ---------- */
    --mo-black: #0d0802;
    --mo-ink: #25211b;
    --mo-ink-3: #3d3935;
    --mo-ink-soft: #56524e;
    --mo-ink-5: #6e6b67;
    --mo-muted: #868481;
    --mo-grey: #b6b5b3;
    --mo-line: #e7e6e6;
    --mo-bg-soft: #f5f5f5;
    --mo-white: #fff;
    --mo-magenta: #f906d0;
    --mo-magenta-soft: #fb6ae3;
    --mo-pink-bg: #f9edf8;
    --mo-charcoal: #333;          /* speaker cards (as the Elementor speakers widget had them) */

    /* Behind speakers' photos (cut-outs show it): grey to white */
    --mo-photo-backdrop: linear-gradient(135.73deg, #8e8e8e 1.33%, #fff 100.1%);

    /* Darkening over photos (heroes, video cards, the lightbox): the brand black, see-through */
    --mo-scrim: color-mix(in srgb, var(--mo-black) 65%, transparent);
    --mo-scrim-strong: color-mix(in srgb, var(--mo-black) 94%, transparent);

    /* ---------- Fonts ---------- */
    --mo-font-body: gotham, Gotham, "mo-gotham-fallback", "Helvetica Neue", Arial, sans-serif;
    --mo-font-heading: var(--mo-font-body);
    --mo-heading-case: uppercase;
    --mo-heading-tracking: 0;

    /* ---------- Text sizes: the scale ---------- */
    --mo-text-3xs: 11px;
    --mo-text-2xs: 12px;
    --mo-text-xs: 13px;
    --mo-text-sm: 14px;
    --mo-text-md: 16px;
    --mo-text-lg: 19px;
    --mo-text-xl: 24px;
    --mo-text-2xl: 28px;
    --mo-text-3xl: 30px;

    /* ...and by role. Change a role here to change it everywhere. */
    --mo-h1: var(--mo-text-3xl);    /* page title (the hero) */
    --mo-h2: var(--mo-text-3xl);    /* section titles */
    --mo-h3: var(--mo-text-2xl);    /* sub-headings: the theme's titles, ticket names, sign-up */
    --mo-h4: var(--mo-text-lg);     /* card titles, the hero's theme line */
    --mo-h5: var(--mo-text-md);     /* small headings: dates, names, notice titles */
    --mo-body: var(--mo-text-md);   /* body copy */
    --mo-small: var(--mo-text-xs);  /* small print, card text, lists in cards */
    --mo-label: var(--mo-text-xs);  /* chips, pills, form labels */
    --mo-stat: var(--mo-text-xl);   /* big numbers (hero stats) */

    /* Line heights */
    --mo-lh-tight: 1.2;
    --mo-lh-heading: 1.3;
    --mo-lh-snug: 1.45;
    --mo-lh-body: 1.65;

    /* Weights */
    --mo-weight-light: 300;
    --mo-weight-regular: 400;
    --mo-weight-medium: 500;
    --mo-weight-bold: 700;
    --mo-weight-heading: var(--mo-weight-regular);

    /* ---------- Spacing: the scale ---------- */
    --mo-space-3xs: 4px;
    --mo-space-2xs: 8px;
    --mo-space-xs: 12px;
    --mo-space-sm: 16px;
    --mo-space-md: 20px;
    --mo-space-lg: 24px;
    --mo-space-xl: 32px;
    --mo-space-2xl: 40px;
    --mo-space-3xl: 60px;
    --mo-space-4xl: 80px;

    /* Space above and below a section (smaller on tablets and phones, below) */
    --mo-section-hero: 120px;   /* heroes */
    --mo-section-lg: 100px;     /* main content sections */
    --mo-section-md: 80px;      /* lighter sections, the sign-up */
    --mo-section-sm: 40px;      /* compact sections */

    /* Card padding (sides); cards' tops and bottoms use the spacing scale */
    --mo-card-pad: 28px;

    /* ---------- Container ---------- */
    --mo-content: 1140px;
    --mo-content-narrow: 800px; /* tickets, FAQs */
    --mo-gutter: 20px;

    /* ---------- Shapes and depth ---------- */
    --mo-radius-pill: 99px;
    --mo-radius-sm: 4px;
    --mo-radius-md: 12px;
    --mo-shadow-card: 0 0 4px rgba(0, 0, 0, 0.12);
    --mo-shadow-control: 0 1px 4px rgba(0, 0, 0, 0.25);
    --mo-shadow-raised: 0 8px 24px color-mix(in srgb, var(--mo-black) 18%, transparent);

    /* ---------- Controls ---------- */
    --mo-control-height: 46px;   /* selects, and buttons sitting beside them */
    --mo-chip-height: 34px;      /* filter chips and the small selects beside them */
    --mo-icon-sm: 32px;          /* round icons on open/close bars (FAQs, More information) */
    --mo-icon-button: 38px;      /* round icon buttons over photos (play, carousel arrows) */
    --mo-icon-button-lg: 44px;   /* round icon buttons over the full-screen lightbox */
    --mo-transition: 0.15s;
    --mo-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356524e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); /* the down arrow on our dropdowns (ink-soft, #56524e) */
    --mo-scroll-offset: 96px;    /* room left above a section jumped to, for the sticky header */
    /* Scrollbars we show on purpose (e.g. under the speakers carousel, so people see it scrolls),
       with a mouse only: a thin magenta bar on a faint track; the track's colour is for dark sections */
    --mo-scrollbar-size: 6px;
    --mo-scrollbar-thumb: var(--mo-magenta);
    --mo-scrollbar-thumb-hover: var(--mo-magenta-soft);
    --mo-scrollbar-track: color-mix(in srgb, var(--mo-white) 12%, transparent);

    font-family: var(--mo-font-body);
    font-size: var(--mo-body);
    color: var(--mo-ink-soft);
    line-height: var(--mo-lh-body);
}

/* Tablets */
@media (max-width: 1024px) {
    #mevents-oxford-page {
        --mo-section-hero: 40px;
        --mo-section-lg: 60px;
        --mo-section-md: 60px;
    }
}

/* Body text: the kit's smaller size (14.592px) from 880px down */
@media (max-width: 880px) {
    #mevents-oxford-page {
        --mo-body: 14.592px;
    }
}

/* Phones */
@media (max-width: 767px) {
    #mevents-oxford-page {
        --mo-section-lg: 40px;
        --mo-section-md: 40px;
        --mo-card-pad: 16px;
    }
}

#mevents-oxford-page *,
#mevents-oxford-page *::before,
#mevents-oxford-page *::after {
    box-sizing: border-box;
}

#mevents-oxford-page [hidden] {
    display: none !important;
}

#mevents-oxford-page .mo-wrap {
    max-width: calc(var(--mo-content) + 2 * var(--mo-gutter));
    margin: 0 auto;
    padding: 0 var(--mo-gutter);
}

#mevents-oxford-page .mo-wrap--narrow {
    max-width: calc(var(--mo-content-narrow) + 2 * var(--mo-gutter));
}

#mevents-oxford-page .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/*
 * Headings. Not inside Elementor templates drawn into the page (the sign-up form) or MEvents Core's
 * speakers app: those keep their own styles.
 */
#mevents-oxford-page :where(h1, h2, h3, h4, h5):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) {
    margin: 0;
    font-family: var(--mo-font-heading);
    font-style: normal;
    font-weight: var(--mo-weight-heading);
    line-height: var(--mo-lh-heading);
    text-transform: var(--mo-heading-case);
    letter-spacing: var(--mo-heading-tracking);
}

#mevents-oxford-page :where(h1):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) { font-size: var(--mo-h1); }
#mevents-oxford-page :where(h2):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) { font-size: var(--mo-h2); }
#mevents-oxford-page :where(h3):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) { font-size: var(--mo-h3); }
#mevents-oxford-page :where(h4):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) { font-size: var(--mo-h4); }
#mevents-oxford-page :where(h5):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) { font-size: var(--mo-h5); }

/*
 * Elementor templates drawn into a page (the sign-up form) and Core's speakers app (with its bio
 * popup) start from the page's normal text colour, as they would on an Elementor page, not from the
 * section they sit in: otherwise the white bio popup inside the dark Speakers section got
 * light-grey text.
 */
#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) {
    color: var(--mo-ink-soft);
}

/* Our line icons (not those inside Elementor templates or Core's speakers app) */
#mevents-oxford-page :where(svg):not(:where(#mevents-oxford-page :is(.elementor, .mevents-speakers-wrap) *)) {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mevents-oxford-page a:focus-visible,
#mevents-oxford-page button:focus-visible,
#mevents-oxford-page select:focus-visible,
#mevents-oxford-page summary:focus-visible,
#mevents-oxford-page input:focus-visible {
    outline: 2px solid var(--mo-magenta);
    outline-offset: 2px;
}

/* ---------- Button: the magenta pill (40px tall, as on the Elementor pages) ---------- */

#mevents-oxford-page .mo-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: var(--mo-space-xs) 60px;
    border: 0;
    border-radius: var(--mo-radius-pill);
    background: var(--mo-magenta);
    font-family: var(--mo-font-body);
    font-size: var(--mo-text-md);
    font-weight: var(--mo-weight-medium);
    line-height: var(--mo-text-md);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--mo-white);
    cursor: pointer;
    transition: background-color var(--mo-transition), color var(--mo-transition);
}

#mevents-oxford-page .mo-button:hover,
#mevents-oxford-page .mo-button:focus-visible {
    background: var(--mo-black);
    color: var(--mo-white);
}

/* On dark backgrounds, hovering goes white rather than black */
#mevents-oxford-page .mo-on-dark .mo-button:hover,
#mevents-oxford-page .mo-on-dark .mo-button:focus-visible {
    background: var(--mo-white);
    color: var(--mo-black);
}

/* Something light inside a dark section (e.g. the white ticket cards on the black tickets section):
   mark it mo-on-light and its buttons hover black again, not white on white (Paul, 4 Dec 2026) */
#mevents-oxford-page .mo-on-dark .mo-on-light .mo-button:hover,
#mevents-oxford-page .mo-on-dark .mo-on-light .mo-button:focus-visible {
    background: var(--mo-black);
    color: var(--mo-white);
}

@media (prefers-reduced-motion: reduce) {
    #mevents-oxford-page * {
        transition: none !important;
    }
}
