/* Key-visual cards — the shareable images.
 *
 * Design: "Variant 4 — accented" from the Claude Design project
 * "Design variants for OG and square visuals". Brand signal comes from four
 * repeated devices: the gradient top rail, a 48px grid texture, twin
 * violet/red corner glows, and the blue→violet→red gradient itself (rail,
 * claim badge, footer rule, portrait ring, session title bar).
 *
 * Type follows the letsboot design system: Roboto 900 for anything that
 * carries the brand voice, Source Sans 3 for the reading lines.
 *
 * Hand-written CSS, deliberately NOT Tailwind: the cards are fixed-pixel
 * artwork (1200×1200 / 1200×627) that gets rasterised, not a responsive page,
 * and the download button inlines this whole file into an SVG to draw it.
 *
 * The two variants are NOT one scale factor apart — the wide card re-lays-out
 * rather than shrinking, so every dimension that differs is declared per
 * variant as a custom property on .card.sq / .card.og.
 */

@font-face {
  font-family: 'AEDHead';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'AEDHead';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'AEDBody';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/fonts/sourcesans3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'AEDBody';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/fonts/sourcesans3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.card,
.card * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.card {
  --ink: #07070B;
  --blue: #3b6bf5;
  --violet: #8b5cf6;
  --red: #e02b34;
  --brand-gradient: linear-gradient(90deg, #3b6bf5 0%, #8b5cf6 55%, #e02b34 100%);
  --text: #fff;
  --text-muted: #a6a6b0;
  --text-quiet: #9a9aa6;

  position: relative;
  overflow: hidden;
  width: 1200px;
  height: 1200px;
  background: var(--ink);
  color: #e7e7ec;
  font-family: 'AEDBody', system-ui, sans-serif;
  /* Antialiasing that survives rasterisation: subpixel AA turns into coloured
     fringes once the card is drawn into a canvas. */
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* ---------------------------------------------------------- per variant */

.card.sq {
  --pad: 72px;
  --top: 62px;
  --rocket: 112px;
  --brandgap: 22px;
  --brandname: 42px;
  --dash-w: 34px;
  --zurich: 20px;
  --foot-bottom: 50px;
  --foot-size: 19px;
  --foot-gap: 22px;
  --badge: 34px;
  --badge-pad: 20px 44px;
  --role: 32px;
}

.card.og {
  --pad: 56px;
  --top: 42px;
  --rocket: 92px;
  --brandgap: 18px;
  --brandname: 34px;
  --dash-w: 28px;
  --zurich: 17px;
  --foot-bottom: 30px;
  --foot-size: 17px;
  --foot-gap: 18px;
  --badge: 25px;
  --badge-pad: 15px 32px;
  --role: 26px;

  height: 627px;
}

/* ---------------------------------------------------------- background */

/* Twin corner glows — violet top right, brand red bottom left. */
.card .glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 620px at 88% 6%, rgba(124, 58, 237, 0.34), transparent 66%),
    radial-gradient(820px 640px at 6% 104%, rgba(224, 43, 52, 0.22), transparent 68%);
}
.card.og .glow {
  background:
    radial-gradient(620px 520px at 92% 4%, rgba(124, 58, 237, 0.34), transparent 66%),
    radial-gradient(700px 560px at 2% 108%, rgba(224, 43, 52, 0.22), transparent 68%);
}

/* 48px engineering grid, barely there — it reads as texture, not as a table. */
.card .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

.card .rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: var(--brand-gradient);
}

/* ---------------------------------------------------------- brand lockup */

.brandbar {
  position: absolute;
  top: var(--top);
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: var(--brandgap);
}
.brandbar img {
  height: var(--rocket);
  width: auto;
  display: block;
}
.brandtext {
  display: flex;
  flex-direction: column;
  gap: calc(var(--brandgap) * 0.32);
}
.brandname {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: var(--brandname);
  line-height: 1;
  color: var(--red);
  white-space: nowrap;
}
.brandsub {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brandsub i {
  width: var(--dash-w);
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}
.brandsub span {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: var(--zurich);
  letter-spacing: 0.2em;
  color: #fff;
}

/* ---------------------------------------------------------- footer */

.footline {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: var(--foot-bottom);
  display: flex;
  flex-direction: column;
  gap: var(--foot-gap);
}
.footline .rule {
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet) 55%, rgba(224, 43, 52, 0.9));
}
.footline .items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: var(--foot-size);
  letter-spacing: 0.1em;
}
.footline .items span:first-child { color: #fff; }
.footline .items span:nth-child(2) { color: var(--text-quiet); }
.footline .hashtag { color: var(--red); }

/* ---------------------------------------------------------- body slots */

/* Every card body is absolutely positioned inside the frame: the brand lockup
   and the footer own their corners, and nothing can push them out of place. */
.body {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
}
.body,
.body-center,
.body-row,
.body-stack {
  display: flex;
}
.body-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.body-row {
  align-items: center;
}
/* Column stacks nest inside a body slot, so this class must carry its own
   display — without it the lines inside collapse back to inline flow and a
   name and its role line end up on the same line. */
.body-stack {
  flex-direction: column;
}

/* ---------------------------------------------------------- pieces */

/* The portrait sits inside a conic gradient ring — the same three brand
   colours, wrapped around the circle. */
.portrait {
  position: relative;
  flex: none;
  width: 540px;
  height: 540px;
}
.portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: conic-gradient(from 210deg, #3b6bf5, #8b5cf6 40%, #e02b34 68%, #3b6bf5);
}
.portrait img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 999px;
  object-fit: cover;
  border: 6px solid var(--ink);
  background: #111524;
}
.card.og .portrait {
  width: 388px;
  height: 388px;
}

.claim {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: var(--badge);
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(90deg, #3b6bf5, #8b5cf6 60%, #e02b34);
  padding: var(--badge-pad);
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
  align-self: center;
  text-transform: uppercase;
}
.card.og .claim { align-self: flex-start; }

.name {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: var(--name);
  line-height: 1;
  color: #fff;
}
.role {
  font-size: var(--role);
  color: var(--text-muted);
}
.role b {
  color: #fff;
  font-weight: 700;
}
.title {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: var(--title);
  line-height: 1.06;
  color: #fff;
  text-wrap: pretty;
}
.card.og .title { line-height: 1.08; }

/* Pill badges. The format badge is tinted from its own accent, passed in as
   three inline values — see formatStyle in render.go. */
.badge {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.16em;
  border-radius: 999px;
  padding: 14px 28px;
  white-space: nowrap;
  flex: none;
  text-transform: uppercase;
  border: 2px solid transparent;
}
.card.og .badge {
  font-size: 16px;
  padding: 10px 22px;
}
.badge-spotlight {
  color: var(--ink);
  background: linear-gradient(90deg, #ffd27a, #ffb25c);
  border-color: transparent;
}
.badge-role {
  font-size: 30px;
  letter-spacing: 0.14em;
  color: #c9bbff;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(38, 28, 68, 0.6);
  padding: 16px 36px;
}
.card.og .badge-role {
  font-size: 22px;
  padding: 12px 26px;
}

.badgerow {
  display: flex;
  gap: 16px;
}
.card.og .badgerow { gap: 14px; }

/* The title carries a vertical gradient bar instead of a heading rule — it
   marks the block without spending a line. */
.titlerow {
  display: flex;
  gap: 26px;
}
.card.og .titlerow { gap: 20px; }
.titlerow .bar {
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #3b6bf5, #8b5cf6 60%, #e02b34);
  flex: none;
}
.card.og .titlerow .bar {
  width: 6px;
  border-radius: 3px;
}

/* Speaker chips: two columns on the square card, one wrapping row on the wide
   one — four names fit either way. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 6px;
}
.chips .chip { max-width: calc(50% - 10px); }
.card.og .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(90deg, rgba(59, 107, 245, 0.18), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.36);
  border-radius: 999px;
  padding: 12px 38px 12px 12px;
  min-width: 0;
}
.chip img {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  object-fit: cover;
  flex: none;
  background: #111524;
}
.chip span {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 700;
  font-size: 38px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card.og .chip {
  gap: 12px;
  padding: 7px 20px 7px 7px;
}
.card.og .chip img {
  width: 50px;
  height: 50px;
}
.card.og .chip span { font-size: 21px; }

/* Topic chips on the event fallback — what the conference is actually about,
   in the words the CFP used. */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 940px;
}
.topics span {
  font-weight: 600;
  font-size: 22px;
  color: #d6d6e0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 11px 24px;
  white-space: nowrap;
}
.card.og .topics {
  justify-content: flex-start;
  max-width: 680px;
  gap: 10px;
}
.card.og .topics span {
  font-size: 18px;
  padding: 8px 18px;
}

/* ---------------------------------------------------------- event card */

.eventmark {
  height: 210px;
  width: auto;
  display: block;
  flex: none;
}
.card.og .eventmark { height: 250px; }
.eventname {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: 86px;
  line-height: 1.02;
  color: var(--red);
  white-space: nowrap;
}
.card.og .eventname { font-size: 66px; }
.eventzurich {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: 46px;
  letter-spacing: 0.2em;
  color: #fff;
}
.card.og .eventzurich { font-size: 34px; }
.eventrule {
  display: block;
  width: 200px;
  height: 4px;
  border-radius: 2px;
  background: var(--brand-gradient);
}
.card.og .eventrule {
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #e02b34);
}
.eventclaim {
  font-size: 32px;
  color: #c9c9d2;
  line-height: 1.35;
  max-width: 820px;
  text-wrap: pretty;
}
.card.og .eventclaim {
  font-size: 26px;
  max-width: 660px;
}
.datepill {
  font-family: 'AEDHead', system-ui, sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(90deg, #3b6bf5, #8b5cf6 60%, #e02b34);
  padding: 18px 38px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
}
.card.og .datepill {
  font-size: 19px;
  padding: 14px 28px;
  align-self: flex-start;
}

/* ---------------------------------------------------------- sponsor card */

/* Not in the variant sheet — built from its parts: the logo needs a light
   plate (most sponsor logos are dark-on-white), the tier reuses the team
   role badge, the line reuses the event claim. */
.logoplate {
  background: #fff;
  border-radius: 28px;
  padding: 46px 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.logoplate img {
  width: auto;
  max-width: 700px;
  object-fit: contain;
}
.card.og .logoplate {
  border-radius: 22px;
  padding: 32px 40px;
}
.card.og .logoplate img { max-width: 420px; }

/* ---------------------------------------------------------- editing */

[contenteditable='true'] {
  outline: 2px dashed rgba(139, 92, 246, 0.75);
  outline-offset: 6px;
  cursor: text;
}
[contenteditable='true']:focus {
  outline-color: #8b5cf6;
}
