/* ═══════════════════════════════════════════
   Charlie's Fried Chicken – Events page
   Body layout only. The hero reuses .cfc-about-hero (about.css) and the
   FAQ section reuses .cfc-faq-* (faq.css); both are enqueued alongside this.
   ═══════════════════════════════════════════ */

.cfc-event-page {
    --cfc-red: #ff0006;
    --cfc-dark-red: #b0001a;
    --cfc-cream: #f5f0eb;
    --cfc-black: #111111;
    --cfc-white: #ffffff;
    --cfc-grey: #4f4f4f;
    --cfc-line: #ececec;
    --cfc-font-heading: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    --cfc-font-body: Arial, 'Helvetica Neue', Helvetica, sans-serif;

    font-family: var(--cfc-font-body);
    color: var(--cfc-black);
    background: var(--cfc-white);
}

.cfc-event-page *,
.cfc-event-page *::before,
.cfc-event-page *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   Hero CTA — matches the menu page's white pill (.cfc-mp-hero-cta).
   Scoped to this page so the shared About/Our Story hero button is untouched.
   ═══════════════════════════════════════════ */
.cfc-event-page .cfc-about-hero__cta {
    /* The menu page's body font is Instrument Sans; this page's --cfc-font-body
       is Arial, so the stack is set explicitly to match the menu CTA exactly. */
    font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    margin-top: 28px;          /* same title → button gap as the menu hero */
    padding: 10px 22px;
    background: #fff;
    color: #000 !important;
    border-radius: 0;          /* squared off, unlike the menu page's pill */
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;          /* 21px → 41px pill, matching the menu */
    letter-spacing: 0.02em;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.cfc-event-page .cfc-about-hero__cta:hover {
    background: #fff;
    color: #000 !important;
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.cfc-event-page .cfc-about-hero__cta:active {
    transform: translateY(1px);
    filter: brightness(0.95);
}

@media (max-width: 899px) {
    .cfc-event-page .cfc-about-hero__cta {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 44px;   /* same 44px tap target as the menu hero */
    }
}

/* ═══════════════════════════════════════════
   Full-screen hero (desktop / tablet only) — the video banner runs the whole
   height of the screen rather than the desktop height in Charlie's Website →
   Settings → Hero, so that setting (and this page's own desktop override) no
   longer drives it. Mobile still uses the settings height — see the ≤720px
   block below.

   The hero's top sits at: body padding (= the fixed header's measured height,
   published as --cfc-h-height-actual by the JS in class-charlies-header.php)
   + Betheme's 30px content padding - the page row's own -70px pull. So it
   starts 40px ABOVE the header's bottom edge — that top strip is tucked behind
   the header — and "runs to the fold" means viewport - header + 40px.
   ═══════════════════════════════════════════ */
.cfc-event-page .cfc-about-hero {
    /* dvh tracks the mobile URL bar; the vh line above is the fallback for
       browsers without dvh — same pattern as the homepage hero. The literal
       fallback is the header's own CSS default, for the moment before its JS
       publishes the measured height. */
    min-height: calc(100vh - var(--cfc-h-height-actual, 96px) + 40px);
    min-height: calc(100dvh - var(--cfc-h-height-actual, 96px) + 40px);
}

/* Phones keep the fixed banner height from Settings → Hero (350px today)
   instead of the full-screen treatment. 720px is about.css's own mobile hero
   breakpoint, so the two agree on where "mobile" starts; this rule has to
   restate the height because the page-scoped selector above outranks
   about.css's .cfc-about-hero rule inside that media query. */
@media (max-width: 720px) {
    .cfc-event-page .cfc-about-hero {
        min-height: var(--about-hero-h-mobile, 350px);
    }
}

/* ═══════════════════════════════════════════
   Section shell + intro heading ("Events We Cater For")
   ═══════════════════════════════════════════ */
.cfc-event__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 6rem) 1.25rem clamp(3rem, 7vw, 5rem);
}

.cfc-event-intro {
    text-align: center;
    margin: 0 auto clamp(2.75rem, 7vw, 5rem);
    max-width: 780px;
}

.cfc-event-intro__eyebrow {
    display: inline-block;
    font-size: clamp(12px, 1.4vw, 15px);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cfc-red);
    margin-bottom: 0.9rem;
}

.cfc-event-intro__heading {
    font-family: var(--cfc-font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--cfc-black);
}

.cfc-event-intro__text {
    margin: 1.1rem auto 0;
    max-width: 640px;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.6;
    color: var(--cfc-grey);
}

/* ═══════════════════════════════════════════
   Event rows — 50/50 split, alternating,
   with a large display title overlapping the image top
   ═══════════════════════════════════════════ */
.cfc-event-rows {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 10vw, 8.5rem);
}

.cfc-event-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(1.75rem, 5vw, 4.5rem);
    /* keep an overflowing title from forcing a horizontal scrollbar */
    overflow-x: clip;
    overflow-clip-margin: 3rem;
}

/* Default markup order is media-then-text = image left.
   Flip the columns for image-right rows. */
.cfc-event-row--img-right .cfc-event-row__media { order: 2; }
.cfc-event-row--img-right .cfc-event-row__text  { order: 1; }

/* ─── Media column + overlapping title ─── */
.cfc-event-row__media {
    position: relative;
}

.cfc-event-row__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #efeae4;
    box-shadow: 0 24px 50px -26px rgba(0, 0, 0, 0.5);
}

.cfc-event-row__frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cfc-event-row__frame--empty {
    background:
        repeating-linear-gradient(-45deg, #eceae7 0 22px, #e4e1dd 22px 44px);
}

/* Video rows keep the same portrait frame ratio as image rows; the video is
   scaled to COVER the frame (fill it, cropping overflow) like object-fit:cover.
   A 16:9 Vimeo background embed is sized taller/wider than the frame and
   centred, with the overflow clipped by the frame. */
.cfc-event-row__frame--video {
    background: #000;
}

.cfc-event-row__video {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* JS (data-cover-ar) sizes the iframe to cover its frame at the video's ratio.
   These are the pre-JS / no-JS fallback: fill the frame. */
.cfc-event-row__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

/* ─── Text column ─── */
/* Large grey label above the heading — same treatment as the Our Story
   (timeline) year label so the two pages read consistently. */
.cfc-event-row__label {
    display: block;
    font-family: var(--cfc-font-heading);
    font-weight: 900;
    /* Deliberately a step below the heading (~24–30px) so the grey label reads
       as a label rather than competing with the title beneath it. */
    font-size: clamp(1.125rem, 2vw, 1.5rem);      /* ~18–24px */
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #b0b0b0;
    margin: 0 0 0.55rem;
    user-select: none;
}

.cfc-event-row__eyebrow {
    display: inline-block;
    font-size: clamp(11px, 1.3vw, 14px);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cfc-red);
    margin-bottom: 0.85rem;
}

.cfc-event-row__heading {
    font-family: var(--cfc-font-heading);
    font-size: clamp(1.5rem, 2.6vw, 1.875rem);   /* ~24–30px */
    font-weight: 800;
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0 0 0.9rem;
    color: var(--cfc-black);
}

.cfc-event-row__body {
    font-size: clamp(0.95rem, 1.15vw, 1.0625rem);
    line-height: 1.72;
    color: var(--cfc-grey);
}

.cfc-event-row__body p { margin: 0 0 1rem; }
.cfc-event-row__body p:last-child { margin-bottom: 0; }

/* ─── Enquire button ─── */
.cfc-event-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.9rem;
    padding: 1rem 2.4rem;
    background: var(--cfc-red);
    color: var(--cfc-white) !important;
    border: none;
    border-radius: 0;          /* squared off, matching the hero CTA */
    font-family: var(--cfc-font-body);
    font-weight: 700;
    font-size: clamp(0.92rem, 1.3vw, 1.02rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cfc-event-cta:hover {
    transform: translateY(-2px);
    background: var(--cfc-black);
    color: var(--cfc-white) !important;
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.6);
}

.cfc-event-cta:active { transform: translateY(0); }

/* ═══════════════════════════════════════════
   Enquiry / booking section
   ═══════════════════════════════════════════ */
.cfc-event-enquiry {
    position: relative;
    /* full-bleed: break out of the constrained content column, edge to edge */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--cfc-black);
    color: var(--cfc-white);
    scroll-margin-top: 90px;
    overflow: hidden;
}

/* Blurred background image layer (scaled up so blurred edges never show). */
.cfc-event-enquiry__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(var(--enq-blur, 10px));
    transform: scale(1.12);
    z-index: 0;
}

/* Background video layer — covers the section, tinted like the hero banner. */
.cfc-event-enquiry__video {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* JS (data-cover-ar) sizes the iframe to cover the section at the video's
   ratio. These are the pre-JS / no-JS fallback: fill the section. */
.cfc-event-enquiry__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

/* Tint overlay on top of the image/video. */
.cfc-event-enquiry__tint {
    position: absolute;
    inset: 0;
    background: var(--enq-tint, #000);
    opacity: var(--enq-tint-alpha, 0.7);
    z-index: 1;
    pointer-events: none;
}

.cfc-event-enquiry__inner {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 7rem) 1.25rem;
    text-align: center;
}

.cfc-event-enquiry__eyebrow {
    display: inline-block;
    font-size: clamp(12px, 1.4vw, 15px);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cfc-red);
    margin-bottom: 1rem;
}

.cfc-event-enquiry__heading {
    font-family: var(--cfc-font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.04;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--cfc-white);
}

.cfc-event-enquiry__text {
    margin: 1.1rem auto 0;
    max-width: 560px;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

/* External form shortcode drop-in */
.cfc-event-enquiry__custom {
    margin-top: clamp(2rem, 5vw, 3rem);
    text-align: left;
}

/* ─── Native quote form ─── */
.cfc-event-form {
    margin-top: clamp(2rem, 5vw, 3rem);
    text-align: left;
    background: var(--cfc-white);
    color: var(--cfc-black);
    border-radius: 20px;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.cfc-event-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

.cfc-event-field { display: flex; flex-direction: column; }
.cfc-event-field--full { grid-column: 1 / -1; }

.cfc-event-field label {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--cfc-black);
}

.cfc-event-field label .req { color: var(--cfc-red); }

.cfc-event-page .cfc-event-field input,
.cfc-event-page .cfc-event-field select,
.cfc-event-page .cfc-event-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
    /* Pinned to 16px rather than 1rem: below 16px iOS Safari zooms the viewport
       on focus and never zooms back. 1rem only happens to be 16px while the
       root stays at its default — a theme using the common `html { font-size:
       62.5% }` trick would silently drop these to 10px. */
    font-size: 16px;
    line-height: 1.4;
    color: var(--cfc-black);
    background: var(--cfc-white);
    border: 1.5px solid var(--cfc-line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
}

.cfc-event-page .cfc-event-field textarea { min-height: 130px; resize: vertical; }

.cfc-event-page .cfc-event-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.cfc-event-page .cfc-event-field input:focus,
.cfc-event-page .cfc-event-field select:focus,
.cfc-event-page .cfc-event-field textarea:focus {
    outline: none;
    border-color: var(--cfc-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 6, 0.1);
}

.cfc-event-form__actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.cfc-event-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 2.75rem;
    background: var(--cfc-black);
    color: var(--cfc-white);
    border: none;
    border-radius: 0;          /* squared off, matching the Enquire buttons */
    font-family: var(--cfc-font-body);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cfc-event-form__submit:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--cfc-red);
    box-shadow: 0 12px 26px -14px rgba(255, 0, 6, 0.7);
}

.cfc-event-form__submit:disabled { opacity: 0.6; cursor: default; }

.cfc-event-form__spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cfcEventSpin 0.7s linear infinite;
    display: none;
}

.cfc-event-form.is-sending .cfc-event-form__spinner { display: inline-block; }

@keyframes cfcEventSpin { to { transform: rotate(360deg); } }

.cfc-event-form__status {
    margin: 0;
    font-weight: 600;
    font-size: 0.98rem;
    text-align: center;
}
.cfc-event-form__status.is-error   { color: var(--cfc-red); }
.cfc-event-form__status.is-success { color: #1a7f37; }

.cfc-event-form.is-sent .cfc-event-form__grid,
.cfc-event-form.is-sent .cfc-event-form__submit { display: none; }

/* ═══════════════════════════════════════════
   FAQ section header (accordion styling comes from faq.css)
   ═══════════════════════════════════════════ */
.cfc-event-faq {
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 9vw, 8rem);
}

.cfc-event-faq__header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto clamp(2rem, 5vw, 3rem);
    padding: 0 1.25rem;
}

.cfc-event-faq__eyebrow {
    display: inline-block;
    font-size: clamp(12px, 1.4vw, 15px);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cfc-red);
    margin-bottom: 0.9rem;
}

.cfc-event-faq__heading {
    font-family: var(--cfc-font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--cfc-black);
}

/* Constrain the reused FAQ list to a comfortable reading width */
.cfc-event-faq .cfc-faq__list {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ═══════════════════════════════════════════
   Scroll-in animation
   ═══════════════════════════════════════════ */
.cfc-event-anim {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cfc-event-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 860px) {
    .cfc-event-row {
        grid-template-columns: 1fr;
        gap: clamp(2.75rem, 8vw, 3.5rem);
    }
    /* Always stack image (with its title) above the text on mobile. */
    .cfc-event-row--img-right .cfc-event-row__media,
    .cfc-event-row__media { order: 1; }
    .cfc-event-row--img-right .cfc-event-row__text,
    .cfc-event-row__text { order: 2; }

    /* Keep the desktop 4/5 portrait frame here. Stacked full-width it used to
       drop to 4/3 landscape, and since the row photos are portrait (3/4) the
       object-fit:cover crop then ate roughly a third of their height — the
       bottom of the Corporate van banner ("the secret is in the sauce") was
       cut off on a phone but visible on desktop. Same ratio = same crop. */
}

@media (max-width: 620px) {
    .cfc-event-form__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .cfc-event-anim {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .cfc-event-form__spinner { animation: none; }
}
