/* Error pages: the site's palette and type, the explainer film first. */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("outfit-var.woff2") format("woff2");
}

:root {
  color-scheme: only light;
  --purple: #4f2854;
  --purple-hover: #6a2f70;
  --plum: #3a1f3e;
  --ink: #161517;
  --muted: #625c66;
  --line: #ddd9df;
  --tint: #f4f0f5;
  --paper: #fbfafb;
  --white: #ffffff;
  --yellow: #ffcc00;
  --lavender: #aba3bb;
  --gutter: 40px;
}

* { box-sizing: border-box; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body.ep {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Outfit", "Aptos", "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.ep) :is(h1, h2, p) { margin: 0; }
:where(.ep) img { display: block; max-width: 100%; height: auto; }
:where(.ep) a { color: inherit; }
.ep :focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
.ep [hidden] { display: none !important; }

/* The static form shows the visitor's language: it waits for error.js, at most a moment. */
.ep-root[data-mode="static"] body.ep:not(.is-ready) { visibility: hidden; animation: ep-reveal 0s linear 1.2s forwards; }
@keyframes ep-reveal { to { visibility: visible; } }

.ep-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.ep-skip {
  position: fixed; top: 12px; left: 12px; z-index: 20;
  padding: 10px 14px; border-radius: 10px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(33, 24, 35, .18);
  transform: translateY(-200%);
}
.ep-skip:focus { transform: none; }

/* Header: logo and language */
.ep-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 72px; padding: 0 var(--gutter);
}
.ep-logo { display: block; width: 140px; flex: none; }
.ep-logo img { width: 140px; }

.ep-lang { position: relative; }
.ep-lang summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 54px; min-height: 44px; padding: 0 12px;
  border: 1px solid rgba(79, 40, 84, .16); border-radius: 999px;
  background: rgba(79, 40, 84, .035);
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  list-style: none; cursor: pointer; user-select: none;
}
.ep-lang summary::-webkit-details-marker { display: none; }
.ep-lang summary svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform .18s ease; }
.ep-lang[open] summary svg { transform: rotate(180deg); }
.ep-lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 10;
  width: 184px; padding: 7px;
  border: 1px solid rgba(37, 29, 39, .1); border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 54px rgba(33, 24, 35, .16);
}
.ep-lang-menu a {
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px;
  min-height: 40px; padding: 7px 9px; border-radius: 9px;
  font-size: 14px; text-decoration: none;
}
.ep-lang-menu a:hover, .ep-lang-menu a[aria-current="true"] { background: var(--tint); }
.ep-lang-menu strong { color: var(--purple); font-size: 12px; letter-spacing: .06em; }
.ep-lang-menu span { color: var(--muted); }

/* The invitation and the film */
.ep-main { flex: 1; padding: 0 var(--gutter) 64px; text-align: center; }

.ep-hook {
  max-width: 16em;
  margin: clamp(12px, 3vh, 32px) auto 0;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.ep-marker {
  padding: .02em .16em .07em;
  margin-inline: -.06em;
  background: url("../ui/marker.svg") center / 100% 100% no-repeat;
  color: #241d25;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.ep-stage {
  position: relative;
  width: min(600px, 100%);
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--plum);
  box-shadow: 0 34px 80px -34px rgba(58, 31, 62, .6), 0 2px 0 rgba(58, 31, 62, .06);
  container-type: inline-size;
}

.ep-poster { position: relative; aspect-ratio: 1 / 1; background: #fef8ff; }
.ep-poster-image { width: 100%; height: 100%; }

/* The three role cards of the poster, at the same places in every language. */
.ep-roles { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.ep-role { position: absolute; top: 30.67%; width: 26.41%; height: 43.93%; }
.ep-role--1 { left: 7.4%; }
.ep-role--2 { left: 36.79%; }
.ep-role--3 { left: 66.19%; }
.ep-role a {
  display: block; width: 100%; height: 100%;
  border-radius: 2.1cqi;
  transition: box-shadow .16s ease, transform .16s ease;
}
.ep-role a:hover { box-shadow: 0 0 0 3px var(--purple), 0 18px 40px -18px rgba(58, 31, 62, .55); transform: translateY(-3px); }
.ep-role a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 2.1cqi; box-shadow: 0 0 0 3px var(--purple); }

.ep-poster-hint {
  position: absolute; top: 80.5%; left: 8%; right: 8%;
  color: var(--plum);
  font-size: clamp(14px, 2.9cqi, 18px); font-weight: 500; line-height: 1.35;
}

.ep-loading {
  position: absolute; inset: 0;
  display: none; place-content: center; justify-items: center; gap: 14px;
  background: rgba(254, 248, 255, .86);
  color: var(--plum); font-size: 16px; font-weight: 500;
}
.ep-stage.is-loading .ep-loading { display: grid; }
.ep-stage.is-loading .ep-loading::before {
  content: ""; width: 38px; height: 38px;
  border: 3px solid rgba(79, 40, 84, .2); border-top-color: var(--purple); border-radius: 50%;
  animation: ep-spin .9s linear infinite;
}
@keyframes ep-spin { to { transform: rotate(360deg); } }

.ep-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 16px 0 12px;
  color: #fef8ff;
}
.ep-play {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 16px 0 6px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
}
.ep-play svg { width: 30px; height: 30px; padding: 8px 7px 8px 9px; border-radius: 50%; background: var(--yellow); fill: var(--plum); }
.ep-play:hover { background: rgba(254, 248, 255, .08); }
.ep-play:focus-visible { outline-color: var(--yellow); }
.ep-meta { color: var(--lavender); font-size: 14px; }

/* The film in place of its poster: a square frame plus the player's 56 px bar. */
.ep-frame { display: block; width: 100%; height: calc(100cqi + 56px); border: 0; background: var(--plum); }
.ep-stage.is-loading .ep-frame { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.ep-stage.is-playing .ep-poster, .ep-stage.is-playing .ep-bar { display: none; }

/* Why you are here */
.ep-why { max-width: 620px; margin: clamp(48px, 8vh, 80px) auto 0; }
.ep-why h2 { font-size: clamp(23px, 2.6vw, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.ep-life { margin-top: 14px; font-size: 20px; line-height: 1.5; text-wrap: pretty; }
.ep-fact { margin-top: 14px; color: var(--muted); font-size: 16px; text-wrap: pretty; }
.ep-ref { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* Sign up and a few ways on */
.ep-next { margin: 44px auto 0; }
.ep-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 38px;
  border-radius: 999px;
  background: var(--purple); color: var(--white) !important;
  font-size: 18px; font-weight: 600; text-decoration: none;
  box-shadow: 0 16px 34px -18px rgba(79, 40, 84, .8);
  transition: background-color .2s ease;
}
.ep-cta:hover { background: var(--purple-hover); }
.ep-free { margin-top: 12px; color: var(--muted); font-size: 15px; }

.ep-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 30px; }
.ep-links a, .ep-links button {
  padding: 0; border: 0; background: none;
  color: var(--purple); font: inherit; font-size: 16px;
  text-decoration: underline; text-decoration-color: rgba(79, 40, 84, .3); text-underline-offset: 4px;
  cursor: pointer;
}
.ep-links a:hover, .ep-links button:hover { text-decoration-color: currentColor; }
.ep-links small { color: var(--muted); font-size: 12px; }

/* Footer */
.ep-footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  padding: 20px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.ep-footer a { text-decoration: none; }
.ep-footer a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body.ep { font-size: 16px; }
  .ep-header { height: 62px; }
  .ep-logo, .ep-logo img { width: 118px; }
  .ep-lang summary { min-width: 48px; min-height: 40px; padding: 0 10px; }
  .ep-stage { margin-top: 20px; border-radius: 18px; }
  .ep-life { font-size: 18px; }
  .ep-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ep *, .ep *::before { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .ep-marker { background: none; text-decoration: underline; }
  .ep-role a:hover, .ep-role a:focus-visible { outline: 3px solid CanvasText; }
}
