/* Everything Procedural Conference */

:root {
  --pink: #ff1eb4;
  --pink-dark: #d10f92;
  --amber: #ffb400;
  --amber-dark: #e09e00;

  --ink: #0e0e10;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --card: #ffffff;
  --text: #333333;
  --muted: #7a7a7a;

  --font-display: 'Share Tech Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-meta: 'Montserrat', system-ui, sans-serif;

  --radius: 24px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--light);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--amber); color: #000; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.container { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { width: min(860px, 100%); }

.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li + li { margin-top: .35em; }
.prose h4 { font-size: 1.05rem; text-transform: uppercase; margin: 1.2em 0 .5em; }

.noscript, .load-error { padding: 160px var(--gutter) 80px; max-width: 760px; margin: 0 auto; }
.load-error h1 { font-size: 2rem; margin-bottom: .5em; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .35em 1.1em;
  border-radius: var(--radius-sm);
  font: 400 1.25rem/1 var(--font-display);
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  color: #fff;
  transition: background-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--pink); }
.btn--primary:hover { background: var(--pink-dark); }
.btn--secondary { background: var(--amber); color: #1a1a1a; }
.btn--secondary:hover { background: var(--amber-dark); }
/* "comingSoon" button: shown before its link exists, not clickable */
.btn--soon {
  flex-direction: column; gap: 2px; line-height: 1;
  background: #ececec; color: #555; cursor: default;
}
.btn--soon:hover { background: #ececec; transform: none; }
.btn--soon small { font-size: max(.55em, 10px); letter-spacing: .08em; opacity: .9; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: rgba(14, 14, 16, .6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
.site-header__inner {
  height: 100%; width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.site-header__logo img { height: 44px; width: auto; }

/* Event logo: hidden over the hero, slides in once the hero logo scrolls away (main.js) */
.site-header__event {
  margin-right: auto; /* pushes the nav / menu button to the right */
  padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .25);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s, transform .25s, visibility 0s .25s;
}
.site-header__event { flex-shrink: 0; }
.site-header__event img { display: block; height: 19px; width: auto; max-width: none; }
.site-header__logo { flex-shrink: 0; }
@media (max-width: 480px) {
  .site-header__inner { gap: 12px; }
  .site-header__logo img { height: 36px; }
  .site-header__event { padding-left: 12px; }
  .site-header__event img { height: 14px; }
}
.show-event-logo .site-header__event {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s, transform .25s, visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .site-header__event, .show-event-logo .site-header__event { transition: none; transform: none; }
}
/* keep the nav on the right when there is no event logo */
.site-nav, .nav-toggle { margin-left: auto; }
.site-header__event:not([hidden]) ~ .site-nav,
.site-header__event:not([hidden]) ~ .nav-toggle { margin-left: 0; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 2.2vw, 32px); }
.site-nav a {
  font: 1.05rem var(--font-display); text-transform: uppercase; letter-spacing: 1px;
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--pink); }

.nav-toggle { display: none; }

@media (max-width: 1010px) { /* hamburger: below this the nav plus both logos do not fit */
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; color: #fff; cursor: pointer;
  }
  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    content: ''; display: block; width: 24px; height: 2px; background: currentColor;
    position: relative; transition: transform .2s, opacity .2s;
  }
  .nav-toggle__bar::before { position: absolute; top: -7px; }
  .nav-toggle__bar::after { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; background: var(--ink);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.3rem; border-bottom: 1px solid #2a2a2a; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; place-items: center;
  /* bottom padding leaves room for the countdown bar (it overlaps the hero by 50px) */
  padding: calc(var(--header-h) + clamp(8px, 3svh, 24px)) var(--gutter) clamp(72px, 13svh, 110px);
  background: #fff; /* also the fallback when WebGL is unavailable */
  text-align: center;
  overflow: hidden;
}
/* WebGL chevron grid (js/hero-bg.js); fades in once it has drawn */
.hero__canvas {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity .8s;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__canvas.is-lost { display: none; }

/* White panel that blocks the field behind the text (same style as the countdown bar).
   Kept dense: tight line-height and spacing in px, not em of the huge title size. */
.hero__inner {
  --panel-pad-x: clamp(24px, 5vw, 56px);
  --logo-w: min(540px, calc(100vw - 2 * var(--gutter) - 2 * var(--panel-pad-x)), 50svh);
  background: #fff; color: #000;
  border-radius: 23px;
  box-shadow: 0 11px 24px -4px rgba(0, 0, 0, .22);
  padding: clamp(20px, 3.6svh, 40px) var(--panel-pad-x);
  max-width: 100%;
  font-family: var(--font-display);
  line-height: 1.1;
}
.hero__kicker { font-size: clamp(1.1rem, min(3.4vw, 4svh), 2.4rem); letter-spacing: .06em; margin: 0; }
.hero__title { font-size: clamp(3rem, 12vw, 9rem); line-height: .95; margin: 0; }
.hero__title:has(.hero__logo) { font-size: 0; line-height: 0; } /* logo only: no text box around it */
/* logo width follows the window height too, so short screens keep the countdown in view */
.hero__logo {
  display: block; height: auto; margin: clamp(6px, 1.4svh, 14px) auto;
  width: var(--logo-w);
}
/* With a logo, the kicker, dates and tagline are each sized to the logo's width.
   Share Tech Mono is monospaced (0.54em per character), so with --n characters and a
   letter spacing of --ls em the line is --n * 0.54 + (--n - 1) * --ls em wide.
   --n is set per line by main.js; the trailing letter space is cancelled by the margin. */
.hero__inner--fit > :is(.hero__kicker, .hero__dates, .hero__tagline) {
  font-size: calc(var(--logo-w) / (var(--n) * 0.54 + (var(--n) - 1) * var(--ls)));
  letter-spacing: calc(var(--ls) * 1em);
  margin-right: calc(var(--ls) * -1em);
  white-space: nowrap;
}
.hero__inner--fit > .hero__kicker { --ls: .06; }
.hero__inner--fit > .hero__dates { --ls: 0; }
.hero__inner--fit > .hero__tagline { --ls: .05; }
.hero__dates { font-size: clamp(1.4rem, min(3.8vw, 4.6svh), 3rem); margin: 0 0 4px; text-transform: uppercase; }
.hero__tagline { font-size: clamp(.8rem, 1.4vw, 1.05rem); letter-spacing: .05em; margin: 0; color: #333; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(10px, 2svh, 18px); }
.hero__actions:empty { display: none; }
.hero__actions .btn { font-size: clamp(1.3rem, min(2.6vw, 3.6svh), 1.8rem); min-width: 220px; min-height: clamp(50px, 7.5svh, 60px); }

/* Countdown: white bar pulled up over the bottom edge of the hero (as on the old site) */
.countdown {
  position: relative; z-index: 2;
  width: min(1024px, calc(100% - 2 * var(--gutter)));
  margin: -50px auto 0;
  padding: 10px 16px;
  background: #fff; color: #000;
  border-radius: 23px;
  box-shadow: 0 11px 19px -2px rgba(0, 0, 0, .2);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 clamp(10px, 2vw, 18px);
  font-family: var(--font-display);
}
.countdown[hidden] { display: none; }
.countdown__item { white-space: nowrap; }
.countdown__digits { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.4; font-variant-numeric: tabular-nums; }
.countdown__label { font-size: clamp(.8rem, 2vw, 1rem); margin-left: 2px; }
@media (max-width: 480px) {
  .countdown { display: grid; grid-template-columns: repeat(2, auto); justify-content: space-evenly; }
  .countdown[hidden] { display: none; }
}

/* With a countdown, the hero gives up a little height so the whole bar (which hangs
   below the hero's edge) is on screen on first load. --cd-trim = part of the bar below
   the edge + a little breathing room; the bar is taller when it wraps on phones. */
.hero:has(+ .countdown:not([hidden])) { --cd-trim: 48px; min-height: calc(100svh - var(--cd-trim)); }
@media (max-width: 480px) {
  .hero:has(+ .countdown:not([hidden])) { --cd-trim: 84px; }
}
/* Desktop: the hero takes about three quarters of the window, so the next section
   shows below the countdown. Phones and tablets keep the full height. */
@media (min-width: 1011px) {
  .hero,
  .hero:has(+ .countdown:not([hidden])) { min-height: 74svh; }
}
.countdown:not([hidden]) + .section { padding-top: clamp(40px, 6vw, 80px); }

/* ------------------------------------------------------------------ sections */

.section { padding: clamp(56px, 8vw, 112px) 0; }
.section--light { background: var(--light); color: var(--text); }
.section--dark { background: var(--dark); color: #fff; }
.section--ink { background: var(--ink); color: #fff; }
.section--grey { background: linear-gradient(#cccccc, #808080); color: #fff; }

/* Logo inks, used by the section dividers */
:root {
  --ink-pink: #ff00b4;
  --ink-cyan: #00b4ff;
  --ink-amber: #ffb400;
}

/* Section divider: a thin line across the top of the section with the EPC triangle
   pointing down from its middle. The ink cycles pink, cyan, amber down the page
   (--notch is set per section by addNotches in main.js). */
.has-notch { position: relative; }
.has-notch::before,
.has-notch::after {
  content: '';
  position: absolute; z-index: 1;
  background: var(--notch);
  pointer-events: none;
}
.has-notch::before { top: 0; left: 0; right: 0; height: 3px; }
.has-notch::after {
  top: 2px; left: 50%;
  width: 44px; height: 24px;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.section__head { text-align: center; margin-bottom: clamp(32px, 5vw, 64px); }
.section__title { font-size: clamp(2rem, 9vw, 6.25rem); text-transform: uppercase; }
.tba {
  margin: 0 auto; max-width: 720px; padding: clamp(28px, 5vw, 48px) 24px;
  text-align: center; text-transform: uppercase;
  font: clamp(1.4rem, 3.5vw, 2.2rem) var(--font-display); letter-spacing: .04em;
  border: 2px dashed currentColor; border-radius: var(--radius);
  opacity: .85;
}

.section__date { font: clamp(1.1rem, 2.6vw, 1.9rem) var(--font-display); text-transform: uppercase; color: var(--amber); margin: .3em 0 0; }
.section--grey .section__date { color: #1a1a1a; }

/* ------------------------------------------------------------------ about */

.about__title {
  font-size: clamp(2rem, 5vw, 3.25rem); text-transform: uppercase; text-align: center; margin-bottom: .75em;
}
.section--light .prose { font-size: 1.1rem; text-align: center; }

.editions__title {
  margin: clamp(40px, 6vw, 72px) 0 20px; text-align: center; text-transform: uppercase; font-size: 1.4rem; color: var(--muted);
}
.editions {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); /* 2x2, as on the old site */
}
@media (max-width: 560px) { .editions { grid-template-columns: 1fr; } }
.edition {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: #222; text-decoration: none; color: #fff;
}
.edition__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.edition::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .7)); }
.edition:hover .edition__img { transform: scale(1.05); }
.edition__label { position: absolute; z-index: 1; left: 20px; bottom: 14px; font: 2.1rem var(--font-display); }
.edition__play { position: absolute; z-index: 1; right: 18px; bottom: 16px; width: 40px; height: 40px; }
.edition__play svg { width: 100%; height: 100%; }

/* ------------------------------------------------------------------ talk cards */

/* 12-column grid; main.js sets --col/--span per card from the section's "rows" pattern */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 24px; grid-template-columns: repeat(12, minmax(0, 1fr));
}
.card { grid-column: var(--col, auto) / span var(--span, 4); }
@media (max-width: 900px) {
  .card { grid-column: auto / span 6; }
}
@media (max-width: 600px) {
  .card { grid-column: 1 / -1; }
}
.card {
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text);
  border-radius: var(--radius); overflow: hidden;
}
.card__media { aspect-ratio: 16 / 9; background: #ddd; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 24px; flex: 1; }
.card__title { font-size: 1.35rem; text-transform: uppercase; color: #000; }
.card .prose { font-size: .95rem; }

.speakers { list-style: none; margin: auto 0 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; gap: 14px 24px; }
.speaker { display: flex; align-items: center; gap: 12px; }
.speaker__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #ddd; flex: none; }
.speaker__text { display: flex; flex-direction: column; line-height: 1.25; }
.speaker__name { font: 1.1rem var(--font-display); color: #000; }
.speaker__org { font: .9rem var(--font-meta); color: var(--muted); }

/* ------------------------------------------------------------------ masterclasses */

.masterclasses { display: grid; gap: 32px; }
.mc {
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text); border-radius: var(--radius); overflow: hidden;
}
.mc__media { background: #ddd; }
.mc__media img { width: 100%; height: auto; }
.mc__body { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 16px; }
.mc__title { font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; color: #000; }
.mc__subtitle { font-size: 1.25rem; text-transform: uppercase; color: var(--pink-dark); }
.mc__practical {
  font-size: .95rem; padding: 14px 16px; border-radius: var(--radius-sm);
  background: #fff6dc; border-left: 4px solid var(--amber);
}
.mc .speakers { margin-top: 0; }

.mc__sessions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.mc__session { border: 1px solid #e4e4e4; border-radius: var(--radius-sm); padding: 14px 16px; }
.mc__session summary {
  cursor: pointer; font: 1.1rem var(--font-display); text-transform: uppercase; color: #000;
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.mc__session summary::-webkit-details-marker { display: none; }
.mc__session summary::after { content: '+'; color: var(--pink); font-size: 1.4rem; line-height: 1; }
.mc__session details[open] summary::after { content: '\2212'; }
.mc__session details .prose { margin-top: 12px; font-size: .95rem; }
.mc__session .speakers { padding-top: 12px; }


/* ------------------------------------------------------------------ partners */

.partners__title { text-align: center; text-transform: uppercase; font-size: 1.6rem; color: #bbb; margin-bottom: 32px; }
.partners__logos {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px clamp(32px, 6vw, 72px);
}
.partners__logos img { max-height: var(--logo-h, 72px); max-width: 220px; width: auto; height: auto; object-fit: contain; }
.partner--light { background: #fff; padding: 12px 18px; border-radius: var(--radius-sm); }
.partner--white img { filter: brightness(0) invert(1); } /* dark logo -> white silhouette */

/* ------------------------------------------------------------------ info */

/* Tickets is twice as wide as Newsletter and Contact; the map runs full width below.
   Tablet: tickets on its own row, the other two side by side. Phone: one column. */
.info { display: grid; gap: 24px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1010px) {
  .info { grid-template-columns: 1fr 1fr; }
  .info__block--tickets { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .info { grid-template-columns: 1fr; }
}
.info__block {
  background: var(--card); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.info__block > p { margin: 0; }
.info__block .btn { margin-top: auto; font-size: 1.1rem; white-space: nowrap; }
.info__title { font-size: 1.8rem; text-transform: uppercase; color: #000; }
.info__block--map { grid-column: 1 / -1; }
.info__address { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.info__address svg { width: 16px; height: 20px; color: var(--pink); flex: none; }
.info__map { width: 100%; height: 360px; border: 0; border-radius: var(--radius-sm); }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var(--ink); color: #aaa; padding: 48px 0; text-align: center; font-size: .9rem; }
.site-footer__inner { display: grid; gap: 14px; justify-items: center; }
.site-footer__copy { color: #777; }
.social { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: #222; color: #fff; transition: background-color .15s;
}
.social a:hover { background: var(--pink); }
.social svg { width: 20px; height: 20px; }
