/* =========================================================================
   IPI Events — events.css
   Event-brochure components built on the IPI tokens (colors_and_type.css).
   Markup is rendered by event-core.js. Each brochure version sets a theme
   on <body data-ev-theme="…"> and may add its own layout block on top.

   Theme hooks (override on body[data-ev-theme]):
     --ev-accent           strong accent for rules, ticks, chevrons
     --ev-accent-2         secondary accent
     --ev-ink              primary text
     --ev-bg               page background
     --ev-surface          card background
     --ev-line             hairline colour
     --ev-display          display font family
     --ev-radius           component radius
     --ev-ph-bg / --ev-ph-stripe / --ev-ph-ink   placeholder styling
   ========================================================================= */

:root {
  --ev-accent: var(--ipi-sky);
  --ev-accent-2: var(--ipi-yellow-warm);
  --ev-ink: var(--ipi-ink);
  --ev-ink-muted: var(--ipi-ink-muted);
  --ev-bg: var(--ipi-paper);
  --ev-surface: var(--ipi-paper);
  --ev-line: var(--ipi-line);
  --ev-display: var(--font-display);
  --ev-body: var(--font-body);
  --ev-radius: 14px;
  --ev-radius-lg: 20px;
  --ev-wrap: 1180px;
  --ev-pad: clamp(18px, 4vw, 40px);
  --ev-ph-bg: #eef1f5;
  --ev-ph-stripe: rgba(28, 52, 89, 0.06);
  --ev-ink-ph: #8893a4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--ev-body);
  color: var(--ev-ink);
  background: var(--ev-bg);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img { max-width: 100%; display: block; }

/* ---- Layout helpers ------------------------------------------------- */
.ev-wrap { max-width: var(--ev-wrap); margin: 0 auto; padding-inline: var(--ev-pad); }
.ev-wrap--narrow { max-width: 920px; }
.ev-section { padding-block: clamp(56px, 8vw, 110px); }
.ev-section--tight { padding-block: clamp(40px, 5vw, 72px); }

.ev-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ev-display);
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ev-accent);
  margin: 0 0 14px;
}
.ev-eyebrow::before {
  content: ""; width: 26px; height: 3px; background: var(--ev-accent-2); display: inline-block;
}
.ev-section__title {
  font-family: var(--ev-display);
  font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; line-height: 1.04; letter-spacing: -0.015em;
  color: var(--ipi-navy); margin: 0 0 14px; text-wrap: balance;
}
.ev-section__lede {
  font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--ev-ink-muted);
  max-width: 62ch; text-wrap: pretty; margin: 0;
}
.ev-sectionhead { margin-bottom: clamp(28px, 4vw, 48px); }

/* ---- Three-bar brand motif ------------------------------------------ */
.ev-bars { display: inline-flex; gap: 5px; align-items: flex-end; height: 30px; }
.ev-bars i { display: block; width: 9px; border-radius: 2px; }
.ev-bars i:nth-child(1) { height: 100%; background: var(--ipi-sky); }
.ev-bars i:nth-child(2) { height: 78%; background: var(--ipi-yellow); }
.ev-bars i:nth-child(3) { height: 60%; background: var(--ipi-navy); }

/* ---- Buttons -------------------------------------------------------- */
.ev-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ev-display); font-weight: 800; font-size: 16px;
  padding: 14px 24px; border-radius: 12px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1;
  transition: transform 160ms var(--easing-standard), background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.ev-btn .ev-arrow { transition: transform 160ms ease; }
.ev-btn:hover .ev-arrow { transform: translateX(4px); }
.ev-btn--primary { background: var(--ipi-navy); color: #fff; }
.ev-btn--primary .ev-arrow { color: var(--ipi-yellow); }
.ev-btn--primary:hover { background: var(--ipi-navy-2); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(28,52,89,0.22); }
.ev-btn--ghost { background: transparent; color: var(--ipi-navy); border-color: currentColor; }
.ev-btn--ghost:hover { background: rgba(28,52,89,0.05); }
.ev-btn--on-dark { background: #fff; color: var(--ipi-navy); }
.ev-btn--on-dark .ev-arrow { color: var(--ipi-sky); }
.ev-btn--on-dark:hover { color: var(--ipi-navy); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.25); }

/* ---- Image placeholder (tasteful, honest) --------------------------- */
.ev-ph {
  position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
  background-color: var(--ev-ph-bg);
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px, var(--ev-ph-stripe) 11px 22px);
  display: grid; place-items: center; border-radius: inherit;
}
.ev-ph__tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--ev-ink-ph); background: var(--ev-bg);
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ev-line);
  max-width: 80%; text-align: center; line-height: 1.3;
}
.ev-ph--portrait { aspect-ratio: 4 / 5; }
.ev-ph--logo { aspect-ratio: 2 / 1; background-color: var(--ipi-paper); }
.ev-ph--logo .ev-ph__tag { font-weight: 700; font-family: var(--ev-display); letter-spacing: 0; border: none; background: none; color: var(--ipi-navy); font-size: 13.5px; line-height: 1.25; max-width: 92%; }
.ev-ph--wide { aspect-ratio: 21 / 9; }
.ev-ph--tall { aspect-ratio: 3 / 4; }
.ev-ph--square { aspect-ratio: 1 / 1; }

/* =====================================================================
   Programme — day tabs + accordion sessions
   ===================================================================== */
.ev-daytabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.ev-daytab {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  font-family: var(--ev-display); cursor: pointer;
  padding: 12px 20px; border-radius: 12px; border: 1.5px solid var(--ev-line);
  background: var(--ev-surface); color: var(--ev-ink-muted);
  transition: border-color 160ms, color 160ms, background 160ms;
}
.ev-daytab__kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ev-accent); white-space: nowrap; }
.ev-daytab__label { font-size: 18px; font-weight: 800; color: inherit; white-space: nowrap; }
.ev-daytab:hover { border-color: var(--ipi-navy); color: var(--ipi-navy); }
.ev-daytab.is-active { background: var(--ipi-navy); border-color: var(--ipi-navy); color: #fff; }
.ev-daytab.is-active .ev-daytab__kicker { color: var(--ipi-yellow); }

.ev-daypanel { display: none; }
.ev-daypanel.is-active { display: block; }
.ev-daynote {
  font-size: 16px; color: var(--ev-ink-muted); margin: 0 0 22px; max-width: 70ch;
  padding-left: 16px; border-left: 3px solid var(--ev-accent-2);
}

.ev-sessions { display: flex; flex-direction: column; gap: 12px; }
.ev-session {
  border: 1px solid var(--ev-line); border-radius: var(--ev-radius);
  background: var(--ev-surface); overflow: hidden;
}
.ev-session__head {
  display: grid; grid-template-columns: 124px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px; list-style: none; cursor: default;
}
details.ev-session > .ev-session__head { cursor: pointer; }
.ev-session__head::-webkit-details-marker { display: none; }
.ev-session__time {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ipi-navy);
  white-space: nowrap;
}
.ev-session__main { display: flex; flex-direction: column; gap: 4px; }
.ev-session__title { font-family: var(--ev-display); font-weight: 800; font-size: 18px; color: var(--ipi-navy); line-height: 1.25; }
.ev-session__venue { font-size: 14px; color: var(--ev-ink-muted); }
.ev-session__sponsor { font-size: 13px; color: var(--ipi-teal); font-style: italic; }
.ev-session__chev {
  width: 13px; height: 13px; border-right: 2.5px solid var(--ev-accent); border-bottom: 2.5px solid var(--ev-accent);
  transform: rotate(45deg); transition: transform 200ms var(--easing-standard); margin-right: 4px;
}
details[open] > .ev-session__head .ev-session__chev { transform: rotate(-135deg); }
.ev-session__body { padding: 0 22px 20px 22px; }
details.ev-session > .ev-session__head + .ev-session__body { padding-top: 4px; }
.ev-session__detail { margin: 0 0 14px; color: var(--ev-ink-muted); font-size: 15.5px; max-width: 68ch; }
.ev-session--session { border-left: 4px solid var(--ipi-navy); }
.ev-session--social { border-left: 4px solid var(--ipi-yellow-warm); }
.ev-session--break { background: transparent; border-style: dashed; }
.ev-session--break .ev-session__title { font-weight: 700; color: var(--ev-ink-muted); }

.ev-talks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ev-talk {
  padding: 13px 0 13px 20px; border-top: 1px solid var(--ev-line); position: relative;
}
.ev-talk::before { content: ""; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; border-radius: 999px; background: var(--ev-accent); }
.ev-talk:first-child { border-top: none; }
.ev-talk__title { display: block; font-weight: 700; font-size: 16px; color: var(--ev-ink); }
.ev-talk__who { display: block; margin-top: 2px; line-height: 1.45; }
.ev-talk__name { font-weight: 700; color: var(--ipi-navy); font-size: 15px; }
.ev-talk__role { color: var(--ev-ink-muted); font-size: 14px; }
.ev-talk__role::before { content: "·"; color: var(--ev-ink-soft); margin: 0 8px; font-weight: 700; }

@media (max-width: 640px) {
  .ev-session__head { grid-template-columns: 1fr auto; }
  .ev-session__time { grid-column: 1 / -1; }
}

/* =====================================================================
   Speakers
   ===================================================================== */
.ev-speakers {
  display: grid; gap: clamp(16px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.ev-speaker {
  border: 1px solid var(--ev-line); border-radius: var(--ev-radius-lg); overflow: hidden;
  background: var(--ev-surface); display: flex; flex-direction: column;
  transition: transform 200ms var(--easing-standard), box-shadow 200ms ease;
}
.ev-speaker:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(28,52,89,0.13); }
.ev-speaker__media { border-bottom: 1px solid var(--ev-line); }
.ev-speaker__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 7px; }
.ev-speaker__name { font-family: var(--ev-display); font-size: 19px; font-weight: 800; color: var(--ipi-navy); margin: 0; line-height: 1.2; }
.ev-speaker__role { margin: 0; display: flex; flex-direction: column; gap: 1px; }
.ev-speaker__job { font-weight: 700; font-size: 14px; color: var(--ev-ink); }
.ev-speaker__org { font-size: 13.5px; color: var(--ev-ink-muted); }
.ev-speaker__bio { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ev-ink-muted); }

/* =====================================================================
   Sponsors
   ===================================================================== */
.ev-sptier { margin-bottom: 40px; }
.ev-sptier:last-child { margin-bottom: 0; }
.ev-sptier__label {
  font-family: var(--ev-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ev-ink-muted); margin: 0 0 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--ev-line);
}
.ev-sponsors { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.ev-sponsor {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: start;
  padding: 18px; border: 1px solid var(--ev-line); border-radius: var(--ev-radius); background: var(--ev-surface);
}
.ev-sponsor__logo { border: 1px solid var(--ev-line); border-radius: 10px; overflow: hidden; }
.ev-sponsor__meta { display: flex; flex-direction: column; gap: 4px; }
.ev-sponsor__name { font-family: var(--ev-display); font-weight: 800; font-size: 17px; color: var(--ipi-navy); line-height: 1.22; display: block; }
.ev-sponsor__note { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ev-accent); }
.ev-sponsor__bio { margin: 4px 0 0; font-size: 14px; color: var(--ev-ink-muted); line-height: 1.5; }
@media (max-width: 480px) { .ev-sponsor { grid-template-columns: 1fr; } }

/* =====================================================================
   Fees
   ===================================================================== */
.ev-fees-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ev-feecard { border: 1px solid var(--ev-line); border-radius: var(--ev-radius-lg); padding: 26px; background: var(--ev-surface); }
.ev-feecard__mode {
  font-family: var(--ev-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: var(--ipi-navy); display: inline-block; padding: 6px 14px; border-radius: 999px; margin: 0 0 18px; white-space: nowrap;
}
.ev-feetable { width: 100%; border-collapse: collapse; }
.ev-feetable th, .ev-feetable td { text-align: left; padding: 14px 0; border-top: 1px solid var(--ev-line); vertical-align: baseline; }
.ev-feetable tr:first-child th, .ev-feetable tr:first-child td { border-top: none; }
.ev-feetable th { font-weight: 600; font-size: 15.5px; color: var(--ev-ink); padding-right: 16px; }
.ev-feetable td { text-align: right; font-family: var(--ev-display); font-weight: 800; font-size: 22px; color: var(--ipi-navy); white-space: nowrap; }
.ev-feeterms { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ev-feeterms li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ev-ink-muted); }
.ev-feeterms li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--ev-accent); border-bottom: 2px solid var(--ev-accent); transform: rotate(-45deg); }

/* =====================================================================
   Travel
   ===================================================================== */
.ev-travels { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ev-travel { }
.ev-travel__mode { font-family: var(--ev-display); font-size: 18px; font-weight: 800; color: var(--ipi-navy); margin: 0 0 8px; padding-top: 14px; border-top: 3px solid var(--ipi-navy); display: inline-block; }
.ev-travel__text { margin: 0; font-size: 15.5px; color: var(--ev-ink-muted); }

/* =====================================================================
   Countdown
   ===================================================================== */
.ev-countdown { display: inline-flex; gap: 10px; }
.ev-cd-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 62px; }
.ev-cd-num {
  font-family: var(--ev-display); font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ipi-navy);
  background: var(--ev-surface); border: 1px solid var(--ev-line); border-radius: 12px; padding: 12px 8px; width: 100%; text-align: center;
}
.ev-cd-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ev-ink-muted); }

/* =====================================================================
   Sticky register bar
   ===================================================================== */
.ev-stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: var(--ipi-navy); color: #fff;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  transform: translateY(110%); transition: transform 260ms var(--easing-standard);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
}
.ev-stickybar.is-shown { transform: translateY(0); }
.ev-stickybar__title { font-family: var(--ev-display); font-weight: 800; font-size: 16px; }
.ev-stickybar__meta { font-size: 13.5px; color: rgba(255,255,255,0.72); }
.ev-stickybar__spacer { margin-left: auto; }
.ev-stickybar .ev-btn { padding: 11px 20px; }
@media (max-width: 620px) {
  .ev-stickybar__meta { display: none; }
  .ev-stickybar__title { font-size: 14px; }
}

/* =====================================================================
   Reveal
   ===================================================================== */
/* Reveal: the IPI brand is "almost no motion" — content is always visible
   (no opacity gating), so it renders correctly in print, reduced-motion and
   static capture. The data-reveal hooks are retained for optional future use. */

/* =====================================================================
   Footer (shared)
   ===================================================================== */
.ev-footer { background: var(--ipi-navy); color: rgba(255,255,255,0.82); padding-block: clamp(48px, 6vw, 80px); }
.ev-footer a { color: #fff; }
.ev-footer__grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr; align-items: start; }
.ev-footer__grid div:last-of-type { text-align: right; }
.ev-footer h4 { font-family: var(--ev-display); color: #fff; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; }
.ev-footer p { margin: 0 0 10px; font-size: 15px; }
.ev-qr {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 16px;
}
.ev-qr__code { width: 92px; height: 92px; border-radius: 8px; background:
  conic-gradient(from 0deg, #fff 0 25%, #0a1a30 0 50%, #fff 0 75%, #0a1a30 0);
  background-size: 16px 16px; background-color: #fff; position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 8px #fff;
}
.ev-qr__label { font-size: 14px; line-height: 1.5; }
.ev-footer__legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 13px; color: rgba(255,255,255,0.6); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .ev-footer__grid { grid-template-columns: 1fr; } }
