/* Public organiser page. The accent colour comes from the organiser (--op-accent, --op-on-accent). */
:root {
    --op-accent: #0390b5;
    --op-on-accent: #ffffff;
    --op-ink: #1a1d2e;
    --op-text: #33384d;
    --op-muted: #646b82;
    --op-bg: #f4f5f9;
    --op-surface: #ffffff;
    --op-border: #e3e6ee;
    --op-radius: 16px;
    --op-radius-sm: 10px;
    --op-shadow: 0 1px 2px rgba(26, 29, 46, 0.04), 0 6px 20px rgba(26, 29, 46, 0.06);
    --op-shadow-hover: 0 2px 4px rgba(26, 29, 46, 0.06), 0 14px 34px rgba(26, 29, 46, 0.12);
    --op-success: #1f8a5b;
    --op-warning: #b45309;
    --op-danger: #c0392b;
}

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

html {
    scroll-behavior: smooth;
}

body.op-body {
    margin: 0;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--op-text);
    background: var(--op-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--op-accent);
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

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

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

/* Buttons */
.op-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}

.op-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.op-btn--accent {
    background: var(--op-accent);
    color: var(--op-on-accent);
}

.op-btn--light {
    background: #ffffff;
    color: var(--op-ink);
}

.op-btn--ghost {
    background: transparent;
    color: var(--op-muted);
    box-shadow: inset 0 0 0 1px var(--op-border);
}

/* Hero */
.op-hero {
    position: relative;
    padding: 4.5rem 1rem 6.5rem;
    color: var(--op-on-accent);
    text-align: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.18), transparent 50%),
        var(--op-accent);
}

.op-hero.has-cover {
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(10, 12, 24, 0.35) 0%, rgba(10, 12, 24, 0.72) 100%),
        var(--op-cover) center / cover no-repeat,
        var(--op-accent);
}

.op-hero__inner {
    max-width: 760px;
    margin: 0 auto;
}

.op-hero__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.op-hero__logo img {
    max-height: 100%;
    object-fit: contain;
}

.op-hero__title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.op-hero__tagline {
    max-width: 620px;
    margin: 0.875rem auto 0;
    font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
    opacity: 0.92;
}

.op-hero__tagline.is-empty {
    display: none;
}

.op-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1.75rem;
}

.op-hero__count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    opacity: 0.92;
}

.op-hero .op-btn--accent {
    background: #ffffff;
    color: var(--op-ink);
}

/* Layout */
.op-main {
    position: relative;
    margin-top: -3.5rem;
    padding: 0 1rem 4rem;
}

.op-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1180px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .op-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }

    .op-aside {
        position: sticky;
        top: 1.5rem;
    }
}

.op-events,
.op-panel {
    background: var(--op-surface);
    border-radius: var(--op-radius);
    box-shadow: var(--op-shadow);
}

.op-events {
    padding: 1.75rem;
    scroll-margin-top: 1rem;
}

@media (max-width: 575.98px) {
    .op-events {
        padding: 1.25rem 1rem;
    }
}

.op-section-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--op-ink);
}

.op-section-title--small {
    font-size: 1.125rem;
}

.op-events__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* List / calendar toggle */
.op-viewtoggle {
    display: inline-flex;
    padding: 4px;
    background: var(--op-bg);
    border-radius: 999px;
}

.op-viewtoggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--op-muted);
    text-decoration: none;
    border-radius: 999px;
}

.op-viewtoggle__btn.is-active {
    background: var(--op-surface);
    color: var(--op-ink);
    box-shadow: 0 1px 3px rgba(26, 29, 46, 0.12);
}

/* Search */
.op-search {
    position: relative;
    margin-bottom: 1.25rem;
}

.op-search i {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: var(--op-muted);
    transform: translateY(-50%);
}

.op-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font: inherit;
    color: var(--op-ink);
    background: var(--op-bg);
    border: 1px solid transparent;
    border-radius: 999px;
}

.op-search input:focus {
    outline: none;
    background: var(--op-surface);
    border-color: var(--op-accent);
}

/* Event cards */
.op-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .op-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.op-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--op-surface);
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.op-card:hover,
.op-card:focus-within {
    transform: translateY(-3px);
    box-shadow: var(--op-shadow-hover);
}

.op-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--op-bg);
}

.op-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.op-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--op-on-accent);
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.25), transparent 50%),
        var(--op-accent);
    line-height: 1;
}

.op-card__placeholder span:first-child {
    font-size: 3.5rem;
    font-weight: 700;
}

.op-card__placeholder span:last-child {
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.op-card__datechip {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: 0.4rem 0.5rem;
    line-height: 1;
    background: #ffffff;
    border-radius: var(--op-radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.op-card__placeholder ~ .op-card__datechip {
    display: none;
}

.op-card__day {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--op-ink);
}

.op-card__month {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--op-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.op-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--op-ink);
    border-radius: 999px;
}

.op-badge--sold_out {
    background: var(--op-danger);
}

.op-badge--few_left {
    background: var(--op-warning);
}

.op-badge--ongoing {
    background: var(--op-success);
}

.op-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.125rem 1.25rem 1.25rem;
}

.op-card__title {
    margin: 0 0 0.625rem;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
}

.op-card__link {
    color: var(--op-ink);
    text-decoration: none;
}

/* The whole card is clickable. */
.op-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.op-card__link:focus-visible {
    outline: none;
}

.op-card:focus-within {
    outline: 3px solid var(--op-accent);
    outline-offset: 2px;
}

.op-card__facts {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    color: var(--op-muted);
}

.op-card__facts li {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.op-card__facts i {
    width: 1rem;
    text-align: center;
    color: var(--op-accent);
}

.op-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--op-border);
}

.op-card__price {
    font-weight: 700;
    color: var(--op-ink);
}

.op-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--op-accent);
}

.op-card__cta i {
    transition: transform 0.2s ease;
}

.op-card:hover .op-card__cta i {
    transform: translateX(3px);
}

.op-empty {
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--op-muted);
    background: var(--op-bg);
    border-radius: var(--op-radius-sm);
}

.op-empty i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    color: var(--op-accent);
}

/* Past events */
.op-past {
    margin-top: 2.25rem;
}

.op-past__list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.op-past__item a {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0.25rem 1rem;
    padding: 0.75rem 0;
    color: var(--op-text);
    text-decoration: none;
    border-top: 1px solid var(--op-border);
}

.op-past__item a:hover .op-past__title {
    color: var(--op-accent);
}

.op-past__date {
    font-size: 0.875rem;
    color: var(--op-muted);
}

.op-past__title {
    font-weight: 500;
    color: var(--op-ink);
}

.op-past__venue {
    grid-column: 2;
    font-size: 0.875rem;
    color: var(--op-muted);
}

@media (max-width: 479.98px) {
    .op-past__item a {
        grid-template-columns: minmax(0, 1fr);
    }

    .op-past__venue {
        grid-column: 1;
    }
}

/* Calendar */
.op-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.op-cal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--op-ink);
}

.op-cal__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--op-ink);
    background: var(--op-bg);
    border-radius: 50%;
    text-decoration: none;
}

.op-cal__nav:hover {
    background: var(--op-accent);
    color: var(--op-on-accent);
}

.op-cal__grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.op-cal__grid th {
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--op-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.op-cal__grid td {
    height: 104px;
    padding: 0.375rem;
    vertical-align: top;
    border: 1px solid var(--op-border);
}

.op-cal__grid td.is-outside {
    background: var(--op-bg);
}

.op-cal__grid td.is-outside .op-cal__daynum {
    color: #aab0c0;
}

.op-cal__daynum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--op-ink);
    border-radius: 999px;
}

.is-today .op-cal__daynum {
    background: var(--op-accent);
    color: var(--op-on-accent);
}

.op-cal__event {
    display: block;
    margin-bottom: 0.25rem;
    padding: 0.2rem 0.4rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--op-ink);
    text-decoration: none;
    overflow-wrap: anywhere;
    background: color-mix(in srgb, var(--op-accent) 14%, #ffffff);
    border-left: 3px solid var(--op-accent);
    border-radius: 4px;
}

.op-cal__event:hover {
    background: color-mix(in srgb, var(--op-accent) 24%, #ffffff);
}

.op-cal__event.is-past,
.op-cal__agenda a.is-past {
    opacity: 0.55;
}

.op-cal__time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.op-cal__none {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--op-muted);
}

.op-cal__agenda {
    display: none;
}

@media (max-width: 639.98px) {
    .op-cal__grid,
    .op-cal__none {
        display: none;
    }

    .op-cal__agenda {
        display: block;
    }
}

.op-cal__agenda-day {
    display: flex;
    gap: 1rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--op-border);
}

.op-cal__agenda-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 3rem;
    line-height: 1.1;
}

.op-cal__agenda-date span:first-child {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--op-ink);
}

.op-cal__agenda-date span:last-child {
    font-size: 0.8125rem;
    color: var(--op-muted);
    text-transform: uppercase;
}

.op-cal__agenda-day.is-today .op-cal__agenda-date span:first-child {
    color: var(--op-accent);
}

.op-cal__agenda ul {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

.op-cal__agenda li + li {
    margin-top: 0.5rem;
}

.op-cal__agenda a {
    display: block;
    color: var(--op-ink);
    font-weight: 500;
    text-decoration: none;
}

.op-cal__agenda .op-cal__time {
    display: block;
    font-size: 0.8125rem;
    color: var(--op-accent);
}

.op-cal.is-loading {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

/* Aside */
.op-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.op-panel {
    padding: 1.5rem;
}

.op-about__text {
    color: var(--op-text);
}

.op-about__text > :first-child {
    margin-top: 0;
}

.op-about__text > :last-child {
    margin-bottom: 0;
}

.op-about__text h1,
.op-about__text h2,
.op-about__text h3 {
    font-size: 1.125rem;
    color: var(--op-ink);
}

.op-about.is-empty {
    display: none;
}

.op-contact__list {
    margin: 0.875rem 0 0;
    padding: 0;
    list-style: none;
}

.op-contact__list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.375rem 0;
    overflow-wrap: anywhere;
}

.op-contact__list i {
    width: 1rem;
    text-align: center;
    color: var(--op-accent);
}

.op-contact__list a {
    text-decoration: none;
}

.op-contact__list a:hover {
    text-decoration: underline;
}

.op-contact__list li.is-empty {
    display: none;
}

.op-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.op-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--op-ink);
    background: var(--op-bg);
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.op-social a:hover {
    background: var(--op-accent);
    color: var(--op-on-accent);
}

/* Footer */
.op-footer {
    padding: 2rem 1rem;
    font-size: 0.875rem;
    color: var(--op-muted);
}

.op-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    max-width: 1180px;
    margin: 0 auto;
}

.op-footer a {
    color: var(--op-muted);
    font-weight: 700;
}

/* Edit mode (the shared editor styles are in page-editor.css) */
body.is-editing .op-hero__tagline.is-empty,
body.is-editing .op-about.is-empty {
    display: block;
}

body.is-editing .op-contact__list li.is-empty {
    display: flex;
}

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

    .op-btn,
    .op-card,
    .op-card__cta i {
        transition: none;
    }

    .op-card:hover,
    .op-btn:hover {
        transform: none;
    }
}
