/* ==================================================================
   Events page (events.html). The old events page's film sits fixed
   behind everything; the page scrolls over it on Lenis, and the film
   dims and slowly pushes in as you go (js/events.js). Sections are
   glass panels, so the film keeps showing through.
   ================================================================== */

/* ---- the film -------------------------------------------------------- */

.ev-bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  background: var(--ink) url('../events/poster.webp') center / cover no-repeat;   /* until the film plays; the still for reduced motion */
}
.ev-bg__video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: 50% 40%;
}
/* a fixed grade (legible hero), plus a dimmer the scroll turns up */
.ev-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(8, 9, 10, .6), rgba(8, 9, 10, .1) 30%, rgba(8, 9, 10, .25) 60%, rgba(8, 9, 10, .92)),
    linear-gradient(to left, rgba(8, 9, 10, .55), rgba(8, 9, 10, 0) 60%);
}
.ev-bg__dim { position: absolute; inset: 0; z-index: 1; background: var(--ink); opacity: 0; }

/* WCAG 2.2.2 / ת״י 5568: a looping film needs a way to stop it */
.ev-bg__toggle {
  position: fixed; z-index: 40;
  inset-inline-start: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(8, 9, 10, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--chalk); font: 500 13px/1 var(--body); cursor: pointer;
}
.ev-bg__toggle:hover { border-color: rgba(245, 242, 234, .4); }
.ev-bg__icon { width: 10px; height: 12px; border-inline: 3px solid currentColor; }   /* pause bars */
.ev-bg__toggle[aria-pressed="true"] .ev-bg__icon {                                  /* play triangle (RTL: points left, the reading direction) */
  width: 0; height: 0; border: 0;
  border-block: 6px solid transparent; border-inline-end: 10px solid currentColor;
}

/* the page's own nav link */
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---- hero -------------------------------------------------------------- */

.ev-hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 48px) var(--pad) clamp(88px, 14vh, 150px);
}
.ev-hero .display { text-shadow: 0 10px 60px rgba(0, 0, 0, .6); max-width: 12ch; }
.ev-hero .lede { color: var(--chalk); text-shadow: 0 1px 16px rgba(0, 0, 0, .7); }
.ev-hero__hint {
  position: absolute; inset-inline: 0; bottom: 28px; margin: 0;
  text-align: center; font-size: 13px; letter-spacing: .3em; color: var(--dim);
}

/* ---- panels over the film ------------------------------------------------- */

.ev-panel {
  position: relative;
  margin-inline: auto;
  width: min(1240px, 100% - 2 * var(--pad));
  margin-block: 0 clamp(36px, 6vw, 72px);
  padding: clamp(32px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.6);
  background: rgba(10, 12, 11, .62);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
          backdrop-filter: blur(14px) saturate(1.1);
}
.ev-panel .section-head { margin-bottom: clamp(24px, 3vw, 40px); }

/* The "why us" spread: a lead-in and one balanced big line on one side, the
   story and three facts on the other; stacked on narrow screens. A felt-green
   glow from the top corner so the panel isn't just a grey box. */
.ev-intro {
  display: grid; gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(15, 110, 61, .34), rgba(15, 110, 61, 0) 60%),
    rgba(10, 12, 11, .66);
}
.ev-intro__lead { position: relative; padding-inline-start: 22px; }
.ev-intro__lead::before {                         /* a yellow rule down the reading edge */
  content: ''; position: absolute; inset-block: 6px 10px; inset-inline-start: 0;
  width: 3px; border-radius: 3px; background: linear-gradient(var(--yellow), rgba(255, 204, 26, 0));
}
.ev-intro__kicker { margin: 0 0 14px; font-size: clamp(16px, 1.2vw, 18px); font-weight: 500; color: var(--dim); }
.ev-intro__big {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 4.6vw, 72px); line-height: .95; color: var(--chalk);
  text-wrap: balance;
}
.ev-intro__big em { font-style: normal; color: var(--yellow); }

.ev-intro__body { display: grid; gap: 16px; padding-top: 6px; }
.ev-intro__body p { margin: 0; max-width: 58ch; color: #dde1dc; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.75; }
.ev-spell {                                        /* "ל-כ-ו-ל-ם", as one word that never breaks */
  white-space: nowrap; font-weight: 800; color: var(--yellow); letter-spacing: .04em;
}

.ev-facts {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ev-facts li {
  display: grid; gap: 4px; align-content: start;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(8, 9, 10, .45);
}
.ev-facts strong { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 2.6vw, 40px); line-height: .95; color: var(--yellow); }
.ev-facts span { font-size: 13px; line-height: 1.45; color: var(--dim); }

@media (max-width: 900px) {
  .ev-intro { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .ev-facts { grid-template-columns: 1fr; }
  .ev-facts li { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
}

/* ---- event types: colour as taxonomy ---------------------------------------
   Lifted from GSAP.com's system: every category owns one hue and keeps it
   wherever it appears (the list, the ball, the focus frame, a mention in the
   copy). The hues are pool-ball colours — 2 blue, 4 violet, 5 orange, 6 green,
   7 rose — and deliberately not Lincoln's yellow or red, which already mean
   brand/CTA and logo/alert. Rows are stacked giant type between hairlines,
   not cards. */
.page-events {
  --ev-1: #4d8dff;   /* אירועי חברה וגיבוש */
  --ev-2: #a58bff;   /* השקות ואירועים פרטיים */
  --ev-3: #ff8a2b;   /* מסיבות ימי הולדת */
  --ev-4: #2fd27f;   /* חיילים / מסיבות שחרור */
  --ev-5: #ff6fa6;   /* מסיבות רווקות / רווקים */
}
.ev-ref { color: var(--hue); font-weight: 700; }

.ev-types {
  list-style: none; margin: 0; padding: 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.ev-type {
  display: grid; grid-template-columns: 2.6em auto minmax(0, 1fr); align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  padding-block: clamp(14px, 2.2vw, 28px);
  border-bottom: 1px solid var(--line);
}
.ev-type__num { font: 700 13px/1 var(--body); letter-spacing: .12em; color: var(--dim); transition: color .5s ease; }
.ev-type__ball {
  width: clamp(18px, 2.2vw, 30px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 60% 70%, rgba(0, 0, 0, 0), rgba(0, 0, 0, .45) 80%),
    var(--hue);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.ev-type__name {
  justify-self: start; width: fit-content;               /* the focus frame hugs the words, not the row */
  font-family: var(--display); font-weight: 700;
  font-size: clamp(42px, 7vw, 118px); line-height: .92; letter-spacing: -.005em;
  color: var(--chalk); text-wrap: balance;
}

/* TrueFocus (js/truefocus.js): the rest blur back, the focused one takes its colour */
.tf-root { position: relative; }
.tf-root.is-live .ev-type__name {
  filter: blur(var(--tf-blur, 4px)); opacity: .42;
  transition: filter var(--tf-duration, .5s) ease, opacity var(--tf-duration, .5s) ease, color var(--tf-duration, .5s) ease;
}
.tf-root.is-live .ev-type.is-focus .ev-type__name { filter: none; opacity: 1; color: var(--hue); }
.tf-root.is-live .ev-type.is-focus .ev-type__num { color: var(--hue); }
.tf-root.is-live .ev-type.is-focus .ev-type__ball { transform: scale(1.3); }
.tf-frame { position: absolute; top: 0; left: 0; width: 0; height: 0; pointer-events: none; opacity: 0; }
.tf-corner {
  position: absolute; width: 1rem; height: 1rem;
  border: 3px solid var(--border-color, #fff); border-radius: 3px;
  filter: drop-shadow(0 0 6px var(--glow-color, #fff));
  transition: border-color var(--tf-duration, .5s) ease, filter var(--tf-duration, .5s) ease;
}
.tf-tl { top: -10px; left: -10px; border-right: none; border-bottom: none; }
.tf-tr { top: -10px; right: -10px; border-left: none; border-bottom: none; }
.tf-bl { bottom: -10px; left: -10px; border-right: none; border-top: none; }
.tf-br { bottom: -10px; right: -10px; border-left: none; border-top: none; }

/* packages */
.ev-packs {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
}
.ev-pack {
  position: relative;
  padding: 28px 26px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(8, 9, 10, .55);
}
.ev-pack--hot { border-color: rgba(255, 204, 26, .55); box-shadow: 0 0 0 1px rgba(255, 204, 26, .2), 0 30px 80px -40px rgba(255, 204, 26, .45); }
.ev-pack__brand { margin: 0; font-size: 14px; font-weight: 700; color: var(--dim); }
.ev-pack__tier {
  margin: 2px 0 18px;
  font-family: var(--display); font-weight: 700; font-size: clamp(54px, 5vw, 76px); line-height: .9;
  letter-spacing: .02em; color: var(--yellow);
  text-align: right;
}
.ev-pack__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ev-pack__list li { position: relative; padding-inline-start: 22px; }
.ev-pack__list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .6em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--felt-lit); box-shadow: 0 0 0 2px rgba(15, 110, 61, .35);
}
.ev-pack__drinks { margin: 0; padding: 16px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 4px 0; font-size: 15px; }
.ev-pack__drinks dt { font-weight: 700; color: var(--chalk); margin-top: 8px; }
.ev-pack__drinks dd { margin: 0; color: var(--dim); }

.ev-notes {
  margin-top: 22px; padding: 20px 24px;
  border-radius: var(--radius); background: rgba(255, 204, 26, .07); border: 1px solid rgba(255, 204, 26, .22);
}
.ev-notes h3 { margin: 0 0 10px; font-size: 16px; color: var(--yellow); }
.ev-notes ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px 36px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); color: #dde1dc; }

/* contact */
.ev-form {
  display: grid; gap: 16px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
}
.ev-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.ev-field small { font-weight: 400; color: var(--dim); }
.ev-field--wide { grid-column: 1 / -1; }
.ev-field input, .ev-field select {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1px solid rgba(245, 242, 234, .22); border-radius: 12px;
  background: rgba(8, 9, 10, .6); color: var(--chalk);
  font: 400 16px/1.2 var(--body);
}
.ev-field input[dir="ltr"] { text-align: right; }
.ev-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(-45deg, transparent 50%, var(--dim) 50%); background-position: 18px 22px, 24px 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.ev-field input:focus, .ev-field select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 204, 26, .25); }
.ev-field [aria-invalid="true"] { border-color: var(--red); }
.ev-form__row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.ev-form__status { margin: 0; font-size: 15px; color: var(--dim); max-width: 52ch; }
.ev-form__status.is-ok { color: #9fe0b5; }
.ev-form__status.is-err { color: #ff9a9f; }

.ev-branches { margin: 34px 0 0; color: var(--dim); font-size: 15px; }
.ev-branches a { color: var(--chalk); text-underline-offset: 4px; }

.page-events .footer { background: var(--ink); }

@media (max-width: 760px) {
  .ev-form { grid-template-columns: 1fr; }
  .ev-panel { padding: 26px 20px; }
  .ev-bg__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ev-bg__toggle { padding: 8px 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .ev-bg__video { display: none; }            /* the poster still stays, via .ev-bg's background */
  .ev-bg__toggle { display: none; }
}
