/*
 * WiVor design system (docs/frontend/00-frontend-guide.md, Part A).
 * Loaded after the template CSS on public pages and the portal. Admin does not load it.
 * Component classes use the "wv-" prefix so they never collide with template classes.
 */
:root {
    --wivor-ink: #151b22;
    --wivor-ink-soft: #28323d;
    --wivor-text: #34404c;
    --wivor-muted: #596675;
    --wivor-bg: #f7f8f6;
    --wivor-surface: #ffffff;
    --wivor-surface-subtle: #f1f3f3;
    --wivor-border: #e1e6e7;
    --wivor-accent: #ff3d00;
    --wivor-accent-hover: #c64526;
    --wivor-accent-subtle: #fff0ea;
    --wivor-on-dark: #f7f8fa;
    --wivor-on-dark-muted: #dfe4e8;
    --wivor-success: #1d7755;
    --wivor-focus: #1174b8;
    --wivor-error: #b42318;
    --wivor-font-heading: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wivor-font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wivor-radius: 10px;
    --wivor-radius-card: 14px;
    --wivor-radius-panel: 18px;
    --wivor-content-width: 1240px;
    --wivor-control-height: 48px;
}

/* Icon fonts use <i>/<span> with their own classes, so they are not listed here. */
body,
body :is(p, a, li, label, input, select, textarea, button, summary, td, th) {
    font-family: var(--wivor-font-body);
}

body :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--wivor-font-heading);
    letter-spacing: -0.025em;
}

/* Page base */
body {
    background: var(--wivor-bg);
    color: var(--wivor-text);
}

/* Layout */
.wv-container {
    width: 100%;
    max-width: var(--wivor-content-width);
    margin: 0 auto;
    padding: 0 16px;
}

.wv-section {
    padding: 56px 0;
}

.wv-section--white { background: var(--wivor-surface); color: var(--wivor-text); }
.wv-section--light { background: var(--wivor-surface-subtle); color: var(--wivor-text); }
.wv-section--dark { background: var(--wivor-ink); color: var(--wivor-on-dark-muted); }
.wv-section--orange { background: var(--wivor-accent); color: var(--wivor-surface); }

.wv-section--dark :is(h1, h2, h3) { color: var(--wivor-on-dark); }
.wv-section--dark :is(p, li) { color: var(--wivor-on-dark-muted); }

.wv-section--orange :is(h1, h2, h3, p, li) {
    color: var(--wivor-surface);
}

/* Typography (mobile first) */
.wv-h1 { font-size: 34px; font-weight: 700; line-height: 1.12; color: var(--wivor-ink); margin: 0 0 16px; }
.wv-h2 { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--wivor-ink); margin: 0 0 16px; }
.wv-h3 { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--wivor-ink); margin: 0 0 8px; }
.wv-body { font-size: 16px; line-height: 1.6; }
.wv-lead { font-size: 17px; line-height: 1.55; max-width: 62ch; }
.wv-small { font-size: 14px; line-height: 1.5; margin-top: 16px; }

@media (min-width: 640px) {
    .wv-container { padding: 0 24px; }
}

@media (min-width: 1024px) {
    .wv-section { padding: 88px 0; }
    .wv-container { padding: 0 32px; }
    .wv-h1 { font-size: 48px; }
    .wv-h2 { font-size: 38px; }
    .wv-h3 { font-size: 24px; }
    .wv-lead { font-size: 19px; }
}

/* Buttons */
.wv-button-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

@media (min-width: 576px) {
    .wv-button-row { flex-direction: row; flex-wrap: wrap; }
}

.wv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--wivor-control-height);
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--wivor-radius);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.wv-btn--primary { background: var(--wivor-accent); border-color: var(--wivor-accent); color: var(--wivor-surface); }
.wv-btn--primary:hover,
.wv-btn--primary:focus-visible { background: var(--wivor-accent-hover); border-color: var(--wivor-accent-hover); color: var(--wivor-surface); }

.wv-btn--outline { background: var(--wivor-surface); border-color: var(--wivor-border); color: var(--wivor-ink); }
.wv-btn--outline:hover,
.wv-btn--outline:focus-visible { background: var(--wivor-surface-subtle); border-color: var(--wivor-ink); color: var(--wivor-ink); }

.wv-section--dark .wv-btn--outline { background: transparent; border-color: var(--wivor-on-dark-muted); color: var(--wivor-on-dark); }
.wv-section--dark .wv-btn--outline:hover,
.wv-section--dark .wv-btn--outline:focus-visible { background: var(--wivor-on-dark); color: var(--wivor-ink); }

.wv-btn--inverse { background: var(--wivor-surface); border-color: var(--wivor-surface); color: var(--wivor-accent); }
.wv-btn--inverse:hover,
.wv-btn--inverse:focus-visible { background: var(--wivor-surface-subtle); border-color: var(--wivor-surface-subtle); color: var(--wivor-accent); }

/* Cards, icons, steps, links */
.wv-card {
    height: 100%;
    padding: 24px;
    background: var(--wivor-surface);
    border: 1px solid var(--wivor-border);
    border-radius: var(--wivor-radius-card);
    color: var(--wivor-text);
}

.wv-icon { font-size: 32px; color: var(--wivor-accent); margin-bottom: 12px; }
.wv-step-number { font-size: 48px; line-height: 1; color: var(--wivor-accent); margin-bottom: 8px; }

.wv-link { color: var(--wivor-accent); font-weight: 600; text-decoration: none; }
.wv-link:hover,
.wv-link:focus-visible { color: var(--wivor-accent-hover); text-decoration: underline !important; }
.wv-section--dark .wv-link { color: var(--wivor-on-dark); text-decoration: underline !important; }

/* FAQ accordion (native <details>) */
.wv-faq details {
    margin-bottom: 12px;
    background: var(--wivor-surface);
    border: 1px solid var(--wivor-border);
    border-radius: var(--wivor-radius);
}

.wv-faq summary {
    min-height: var(--wivor-control-height);
    padding: 14px 20px;
    font-size: 18px;
    color: var(--wivor-ink);
    cursor: pointer;
}

.wv-faq details > div { padding: 0 20px 16px; }

/* Header (spec section 3): fixed at top, white, colored logo left. */
.wv-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--wivor-surface);
    border-bottom: 1px solid var(--wivor-border);
}

.wv-header__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
}

.wv-header__logo img { height: 32px; width: auto; }

.wv-header__cta { margin-left: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; }

.wv-header__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--wivor-border);
    border-radius: var(--wivor-radius);
}

.wv-header__toggle-bar { display: block; height: 2px; background: var(--wivor-ink); }

/* Mobile: links collapse into a panel under the bar. */
.wv-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 16px 16px;
    background: var(--wivor-surface);
    border-bottom: 1px solid var(--wivor-border);
}

.wv-header__nav.is-open { display: block; }

.wv-header__links,
.wv-header__utility { list-style: none; margin: 0; padding: 0; }

.wv-header__nav a {
    display: flex;
    align-items: center;
    min-height: var(--wivor-control-height);
    color: var(--wivor-ink);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.wv-header__nav a:hover,
.wv-header__nav a.is-current { color: var(--wivor-accent); text-decoration: underline !important; text-underline-offset: 6px; }

.wv-header__utility { display: flex; gap: 20px; border-top: 1px solid var(--wivor-border); margin-top: 8px; }

.wv-header__utility a { position: relative; }

.wv-header__cart-count {
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--wivor-accent);
    color: var(--wivor-surface);
    font-size: 12px;
}

@media (min-width: 1024px) {
    .wv-header__bar { min-height: 76px; }

    .wv-header__logo img { height: 40px; }

    .wv-header__toggle { display: none; }

    .wv-header__nav,
    .wv-header__nav.is-open {
        display: flex;
        position: static;
        align-items: center;
        gap: 24px;
        margin-left: auto;
        padding: 0;
        border: 0;
    }

    .wv-header__links { display: flex; gap: 24px; }

    .wv-header__nav a { font-size: 15px; }

    .wv-header__utility { border-top: 0; margin-top: 0; gap: 16px; }

    .wv-header__cta { margin-left: 0; min-height: var(--wivor-control-height); padding: 12px 20px; }
}

/* Footer (spec section 3): slate background, white logo, four columns. */
.wv-footer {
    padding: 56px 0 24px;
    background: var(--wivor-ink);
    color: var(--wivor-on-dark-muted);
}

.wv-footer__logo img { height: 40px; width: auto; }

.wv-footer__title { font-size: 15px; font-weight: 600; color: var(--wivor-on-dark); margin: 0 0 12px; }

.wv-footer ul { list-style: none; margin: 0; padding: 0; }

.wv-footer nav a,
.wv-footer__social a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--wivor-on-dark-muted);
    text-decoration: none;
}

.wv-footer nav a:hover,
.wv-footer__social a:hover { color: var(--wivor-on-dark); text-decoration: underline !important; }

.wv-footer__social { display: flex; gap: 16px; margin-top: 16px !important; font-size: 22px; }

.wv-footer__copyright {
    margin: 32px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--wivor-ink-soft);
    font-size: 14px;
    color: var(--wivor-on-dark-muted);
}

.wv-footer__credit { margin: 8px 0 0; font-size: 13px; color: var(--wivor-on-dark-muted); }

.wv-footer__credit a { color: var(--wivor-on-dark); text-decoration: underline !important; }

.wv-footer__credit a:hover { color: var(--wivor-surface); }

/* Link underlines use !important because bootstrap.css sets a { text-decoration: none !important }. */

/* Keyboard focus: the template CSS removes outlines globally. */
.wv-header__logo:focus-visible,
.wv-header__nav a:focus-visible,
.wv-header__toggle:focus-visible,
.wv-footer a:focus-visible,
.wv-faq summary:focus-visible,
.wv-btn:focus-visible,
.wv-link:focus-visible,
.wv-input:focus-visible,
.wv-search__field:focus-visible {
    outline: 3px solid var(--wivor-focus);
    outline-offset: 2px;
}

/* Home photos */
/* Cookie consent (spec section 12): small and out of the way. */
.wv-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1100;
    padding: 16px;
    background: var(--wivor-ink);
    color: var(--wivor-surface);
    border-radius: var(--wivor-radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.wv-cookie__text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--wivor-surface); }

.wv-cookie__text a { color: var(--wivor-surface); text-decoration: underline !important; }

.wv-cookie__actions { display: flex; gap: 8px; }

.wv-cookie__button { flex: 1; padding: 8px 16px; font-size: 14px; }

.wv-cookie__button--reject { background: transparent; border-color: var(--wivor-surface); color: var(--wivor-surface); }

.wv-cookie__button--reject:hover,
.wv-cookie__button--reject:focus-visible { background: var(--wivor-surface); color: var(--wivor-ink); }

.wv-cookie a:focus-visible,
.wv-cookie__button:focus-visible { outline: 3px solid var(--wivor-focus); outline-offset: 2px; }

@media (min-width: 576px) {
    .wv-cookie { right: auto; max-width: 360px; }
    .wv-cookie__button { flex: 0 0 auto; }
}

/* Event directory: live, upcoming and past groups. */
.wv-events-group { margin-bottom: 56px; }

/* Divider: heading and count over a thin bar that starts with a short orange segment. */
.wv-events-group__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--wivor-accent) 0 56px, var(--wivor-border) 56px) bottom / 100% 2px no-repeat;
}

.wv-events-group__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; line-height: 1.2; color: var(--wivor-ink); }
.wv-events-group__count { margin: 0; font-size: 14px; color: var(--wivor-muted); white-space: nowrap; }
.wv-events-group__note { margin: -12px 0 24px; font-size: 15px; }

.wv-events-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

@media (min-width: 768px) { .wv-events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .wv-events-grid { grid-template-columns: repeat(3, 1fr); } }

/* Live group: slate panel so it stands apart from the rest of the page. */
.wv-events-group--live {
    padding: 28px 20px;
    background: var(--wivor-ink);
    border-radius: calc(var(--wivor-radius) * 2);
}

.wv-events-group--live .wv-events-group__head {
    background-image: linear-gradient(to right, var(--wivor-accent) 0 56px, rgba(255, 255, 255, 0.2) 56px);
}

.wv-events-group--live :is(.wv-events-group__title, .wv-events-group__note) { color: var(--wivor-surface); }
.wv-events-group--live .wv-events-group__count { color: rgba(255, 255, 255, 0.7); }

@media (min-width: 992px) { .wv-events-group--live { padding: 40px; } }

.wv-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wivor-accent);
    box-shadow: 0 0 0 0 rgba(255, 61, 0, 0.6);
    animation: wv-live-pulse 2s ease-out infinite;
}

@keyframes wv-live-pulse {
    to { box-shadow: 0 0 0 10px rgba(255, 61, 0, 0); }
}

@media (prefers-reduced-motion: reduce) { .wv-live-dot { animation: none; } }

/* Event card */
.wv-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--wivor-surface);
    border: 1px solid var(--wivor-border);
    border-radius: var(--wivor-radius);
}

.wv-events-group--live .wv-event-card { border-color: transparent; }

.wv-event-card__media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.wv-event-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.wv-event-card__sport { margin: 0 0 6px; font-size: 14px; color: var(--wivor-accent); }
.wv-event-card__title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.wv-event-card__title a { color: var(--wivor-ink); text-decoration: none; }
.wv-event-card__title a:hover { color: var(--wivor-accent); }
.wv-event-card__meta { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--wivor-muted); }
.wv-event-card__status { margin: auto 0 0; font-size: 15px; color: var(--wivor-ink); }
.wv-event-card__action { margin-top: auto; align-self: flex-start; }

/* Past events step back so the current ones lead. */
.wv-events-group--past .wv-event-card__media img { filter: saturate(0.6); }

.wv-event-card a:focus-visible { outline: 3px solid var(--wivor-focus); outline-offset: 2px; }

/* Forms: visible labels, 48px controls, helper text below the field. */
.wv-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--wivor-ink); }

.wv-input {
    display: block;
    width: 100%;
    min-height: var(--wivor-control-height);
    padding: 12px 14px;
    background: var(--wivor-surface);
    border: 1px solid var(--wivor-muted);
    border-radius: var(--wivor-radius);
    font-size: 16px;
    color: var(--wivor-ink);
}

.wv-help { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--wivor-muted); }

/* Search bar: one field and one action. */
.wv-search { display: flex; flex-direction: column; gap: 12px; }

.wv-search__field-wrap { position: relative; flex: 1; }

.wv-search__icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--wivor-muted);
    pointer-events: none;
}

.wv-search__field { min-height: 52px; padding-left: 44px; }

.wv-search .wv-btn { min-height: 52px; }

@media (min-width: 640px) {
    .wv-search { flex-direction: row; align-items: flex-end; }
}

.wv-section--dark .wv-label { color: var(--wivor-on-dark); }

/* Status badges always carry a text label. */
.wv-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.wv-badge--available { background: var(--wivor-success); color: var(--wivor-surface); }
.wv-badge--upcoming { background: var(--wivor-accent-subtle); color: var(--wivor-accent-hover); }
.wv-badge--past { background: var(--wivor-surface-subtle); color: var(--wivor-muted); }

/* The template animates every link for 500ms, which also delays focus rings. */
.wv-link,
.wv-header__nav a,
.wv-footer a,
.wv-input {
    transition: color 0.16s ease, border-color 0.16s ease;
}

@media (prefers-reduced-motion: reduce) {
    .wv-btn,
    .wv-link,
    .wv-header__nav a,
    .wv-footer a,
    .wv-input { transition: none; }
}

/* Homepage reference */
.wv-hero { padding: 40px 0 0; }

.wv-hero__grid { display: grid; gap: 32px; }

.wv-hero__title { font-size: clamp(2.125rem, 9.4vw, 2.5rem); font-weight: 800; line-height: 1.1; text-wrap: balance; }

.wv-hero__title span { display: block; }

.wv-hero__title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 20px;
    background: var(--wivor-accent);
    transform-origin: left;
    animation: wv-hero-rule 400ms ease-out 240ms backwards;
}

/* One entrance on page load. Backwards fill leaves no transform behind once it ends. */
.wv-hero__intro > * { animation: wv-hero-rise 400ms ease-out backwards; }
.wv-hero__intro > :nth-child(2) { animation-delay: 80ms; }
.wv-hero__intro > :nth-child(3) { animation-delay: 160ms; }
.wv-hero__intro > :nth-child(4) { animation-delay: 240ms; }

@keyframes wv-hero-rise {
    from { opacity: 0; transform: translateY(12px); }
}

@keyframes wv-hero-rule {
    from { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .wv-hero__intro > *,
    .wv-hero__title::after { animation: none; }
}

.wv-hero .wv-search { margin-top: 24px; }

.wv-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 30%;
}

.wv-split { display: grid; gap: 32px; align-items: center; }

.wv-split__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--wivor-radius-panel);
}

.wv-steps {
    margin: 24px 0;
    padding: 0;
    list-style: none;
    counter-reset: wv-step;
}

.wv-steps li {
    position: relative;
    padding: 0 0 20px 48px;
    counter-increment: wv-step;
}

.wv-steps li::before {
    content: counter(wv-step);
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wivor-ink);
    color: var(--wivor-on-dark);
    font-family: var(--wivor-font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
}

.wv-reassurance { display: grid; gap: 24px; margin-top: 32px; }

.wv-section.wv-band { padding: 32px 0; }

.wv-band__row { display: flex; flex-direction: column; gap: 12px; }

.wv-band__row p { margin: 0; }

.wv-section.wv-photographers { padding: 0; }

.wv-photographers__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.wv-photographers__copy { padding-top: 40px; padding-bottom: 56px; }

@media (min-width: 768px) {
    .wv-reassurance { grid-template-columns: repeat(3, 1fr); }

    .wv-band__row { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }

    .wv-band__row > a { flex-shrink: 0; }
}

@media (min-width: 1024px) {
    .wv-hero { padding: 0; }

    .wv-hero__grid {
        grid-template-columns: 48fr 52fr;
        align-items: center;
        gap: 56px;
        max-width: none;
        padding-right: 0;
        padding-left: max(32px, calc((100% - var(--wivor-content-width)) / 2 + 32px));
    }

    .wv-hero__title { font-size: clamp(2.5rem, 3.7vw, 3.25rem); }

    .wv-hero__media img { height: 600px; aspect-ratio: auto; }

    .wv-split { grid-template-columns: 1fr 1fr; gap: 64px; }

    .wv-photographers {
        display: grid;
        grid-template-columns: 52fr 48fr;
        align-items: center;
        gap: 56px;
    }

    .wv-section.wv-photographers { padding-right: max(32px, calc((100% - var(--wivor-content-width)) / 2 + 32px)); }

    .wv-photographers__image { height: 100%; min-height: 480px; aspect-ratio: auto; }

    .wv-photographers__copy { max-width: none; margin: 0; padding: 64px 0; }
}
