/* Flip polaroids (Our Story team, Community past events), the Upcoming Events banner and the handwritten
   blurb. Client feedback 7 Nov 2026. Behaviour: assets/js/flip.js. */

/* ---------- flip polaroids ---------- */
.ek-flips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(22px, 3vw, 40px); }
.ek-flips__item { rotate: var(--ek-tilt, 0deg); transition: rotate .5s var(--ek-ease, ease); }
.ek-flips__item:hover, .ek-flips__item:focus-within { rotate: 0deg; }
.ek-flip {
    display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
    cursor: pointer; perspective: 1400px; -webkit-tap-highlight-color: transparent;
}
.ek-flip:focus-visible { outline: 3px solid var(--ek-maroon, #701c1c); outline-offset: 6px; border-radius: 4px; }
.ek-flip__inner { position: relative; display: grid; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.ek-flip[aria-pressed="true"] .ek-flip__inner { transform: rotateY(180deg); }
.ek-flip__face {
    grid-area: 1 / 1; display: flex; flex-direction: column; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    padding: 7% 7% 0; background: linear-gradient(180deg, #fbf8f2, #f1ebe0); border-radius: 3px;
    box-shadow: 0 18px 32px rgba(51, 34, 25, .18), 0 2px 5px rgba(51, 34, 25, .12);
}
.ek-flip__photo { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ek-sand, #f1e9d6); }
.ek-flip__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ek-flip__cap { display: block; padding: 12px 2px 16px; min-height: 3.2em; font-family: "Reenie Beanie", var(--ek-font-ui); font-size: 24px; line-height: 1.05; color: #3a2a20; text-align: center; }
.ek-flip__back { transform: rotateY(180deg); justify-content: center; gap: 10px; padding: 12% 11%; text-align: center; }
.ek-flip__date { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ek-maroon, #701c1c); }
/* round 5 (client, 12 Nov 2026): the name on the back is in the same handwriting as the caption on the front */
.ek-flip__title { font-family: "Reenie Beanie", var(--ek-font-ui); font-size: clamp(27px, 2.3vw, 32px); font-weight: 400; line-height: 1.05; color: #3a2a20; }
.ek-flip__text { font-size: 14.5px; line-height: 1.55; color: var(--ek-ink, #4f3017); }
.ek-flip__turn { position: absolute; right: 10px; top: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(251, 248, 242, .9); color: var(--ek-maroon, #701c1c); font-size: 14px; box-shadow: 0 2px 6px rgba(51, 34, 25, .2); pointer-events: none; }
.ek-flip[aria-pressed="true"] .ek-flip__turn { opacity: 0; }

/* ---------- Upcoming Events ribbon (same look as the homepage ribbon) ---------- */
.ek-events-band { background: var(--ek-maroon, #701c1c); color: var(--ek-on-dark, #f6efe3); position: relative; }
.ek-ribbon { overflow: hidden; padding: 18px 0; border-top: 1px solid rgba(246, 239, 227, .12); border-bottom: 1px solid rgba(246, 239, 227, .12); }
.ek-ribbon__track { display: flex; width: max-content; animation: ek-ribbon-x var(--ek-marquee-s, 46s) linear infinite; }
.ek-ribbon:hover .ek-ribbon__track, .ek-ribbon.is-paused .ek-ribbon__track { animation-play-state: paused; }
.ek-ribbon__set { display: flex; align-items: center; flex: none; }
.ek-ribbon__w { white-space: nowrap; padding: 0 24px; }
.ek-ribbon__w--serif { font-family: var(--ek-font-serif, Georgia, serif); font-weight: 100; text-transform: uppercase; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: .08em; }
.ek-ribbon__w--script { font-family: var(--ek-font-script, cursive); font-size: clamp(28px, 3.2vw, 44px); }
.ek-ribbon__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }
@keyframes ek-ribbon-x { to { transform: translateX(-50%); } }
.ek-events-band__bar { display: flex; justify-content: flex-end; padding: 8px 16px 10px; }
.ek-events-band__pause { border: 1px solid rgba(246, 239, 227, .35); background: transparent; color: rgba(246, 239, 227, .85); border-radius: 999px; padding: 5px 13px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.ek-events-band__pause:hover { border-color: var(--ek-on-dark, #f6efe3); color: var(--ek-on-dark, #f6efe3); }
.ek-events-band__pause:focus-visible { outline: 3px solid var(--ek-nude, #d1a478); outline-offset: 3px; }

/* ---------- handwritten blurb ---------- */
.ek-blurb { padding: clamp(56px, 8vw, 120px) 0; background: var(--ek-cream, #f5f0e6); text-align: center; }
.ek-blurb__text { max-width: 30ch; margin: 0 auto; font-family: "Reenie Beanie", var(--ek-font-ui); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; color: var(--ek-maroon, #701c1c); }
.ek-blurb__text p { margin: 0 0 .5em; }
.ek-blurb__text p:last-child { margin-bottom: 0; }

/* ---------- Past Events ---------- */
/* round 5 (client, 9 Nov 2026: "make this all the same nude/white"): Past Events shares the blurb's cream, so the page reads as one calm band */
.ek-past { padding: 0 0 clamp(56px, 7vw, 104px); background: var(--ek-cream, #f5f0e6); }
.ek-past__title { margin: 0; font-family: var(--ek-font-serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 64px); text-transform: uppercase; color: var(--ek-maroon, #701c1c); line-height: 1; }
.ek-past__hint { margin: 10px 0 clamp(26px, 3.4vw, 44px); font-family: "Reenie Beanie", var(--ek-font-ui); font-size: 24px; color: var(--ek-ink-soft, #7a5a45); }

@media (prefers-reduced-motion: reduce) {
    .ek-flip__inner, .ek-flips__item { transition: none; }
    .ek-ribbon__track { animation: none; }
}

/* Past Events: a sideways row like Meet the team */
.ek-flips--row { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 16px 4px 30px; }
.ek-flips--row::-webkit-scrollbar { display: none; }
.ek-flips--row.is-fit { justify-content: center; } /* a few past events: centred */
.ek-flips--row .ek-flips__item { flex: none; width: clamp(220px, 23vw, 290px); scroll-snap-align: center; }
