/* ---------- Fringe AU brand tokens (Brand Guide v2.0, sections 07–08) ---------- */
:root {
  --studio-white: #FAFAFB;
  --ink: #14171C;
  --crimson: #D91E4F;      /* one highlight per composition: headline line or CTA */
  --deep-crimson: #8E1436; /* hovers, labels */
  --blush: #F2789B;        /* soft accent on Ink: kickers, hairlines */

  --bg: var(--studio-white);
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #5B616B;
  --line: #E4E5E9;
  --radius: 12px;
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* webinar room: the Ink world */
  --room-bg: var(--ink);
  --room-panel: #1C2027;
  --room-line: #2B3039;
  --room-text: #F4F5F7;
  --room-muted: #A3A9B3;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font); margin: 0 0 .5em; }
h1, h2 { font-weight: 800; text-transform: uppercase; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.hl { color: var(--crimson); font-style: normal; display: block; }
.kicker {
  font: 500 .78rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
}
.muted { color: var(--muted); }
.hidden { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

.topbar { padding: 22px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 30px; width: auto; display: block; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--crimson); color: #fff;
  font: 600 1rem var(--font); text-decoration: none; letter-spacing: .01em;
  transition: background .15s ease;
}
.btn:hover { background: var(--deep-crimson); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 16px; font-size: .85rem; }

.site-footer { padding: 28px 0 32px; font-size: .78rem; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line); margin-top: 48px; }
.site-footer .wrap { display: grid; gap: 6px; }
.site-footer .line { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; }

/* ---------- Registration ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; padding: 40px 0 24px; align-items: start; }
.hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 34em; margin: 0; }
.bullets { list-style: none; padding: 0; margin: 30px 0; display: grid; gap: 14px; }
.bullets li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.bullets li::before {
  content: ''; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: radial-gradient(circle, var(--ink) 0 3.5px, transparent 4px);
}
.presenter { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.presenter strong { font-weight: 600; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px;
  box-shadow: 0 24px 60px -36px rgba(20, 23, 28, .35);
}
.field { display: grid; gap: 6px; margin-top: 16px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input {
  font: inherit; font-size: 1rem; padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--studio-white);
}
.field input:focus { outline: none; border-color: var(--ink); background: #fff; }
.sessions { display: grid; gap: 8px; margin-top: 18px; }
.session {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); cursor: pointer; background: var(--studio-white); font-size: .95rem;
}
.session:has(input:checked) { border-color: var(--ink); background: #fff; }
.session input { accent-color: var(--ink); margin: 0; }
.session .when { font-weight: 500; }
.session .soon { margin-left: auto; font: 500 .68rem var(--mono); letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.form-error { color: var(--deep-crimson); font-size: .9rem; margin-top: 12px; min-height: 1.2em; }
.fineprint { font-size: .78rem; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }

/* Photo with the registration card overlapping its lower edge */
.register-col { position: relative; }
.hero-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo:not(.hidden) + .card { position: relative; margin: -36px 16px 0; }

/* ---------- Thanks ---------- */
.center { max-width: 660px; margin: 32px auto 40px; text-align: center; }
.big-time { font-size: 1.25rem; font-weight: 600; margin: 8px 0 24px; }
.countdown { display: flex; justify-content: center; gap: 10px; margin: 22px 0 30px; }
.countdown div { min-width: 78px; padding: 14px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.countdown b { display: block; font: 700 1.9rem/1 var(--font); font-variant-numeric: tabular-nums; }
.countdown span { font: 500 .66rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.cal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin-top: 18px; }
.cal-links .kicker { width: 100%; }
@media (min-width: 560px) { .cal-links .kicker { width: auto; margin-right: 4px; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.copy-row { display: flex; gap: 8px; margin-top: 18px; }
.copy-row input { flex: 1; min-width: 0; font: .85rem var(--mono); padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }

/* ---------- Webinar room (Ink world) ---------- */
body.room { background: var(--room-bg); color: var(--room-text); }
body.room .muted, body.room .kicker { color: var(--room-muted); }
body.room .tag { background: transparent; border-color: var(--room-line); color: var(--room-muted); }
body.room .countdown div { background: var(--room-panel); border-color: var(--room-line); }
body.room .countdown span { color: var(--room-muted); }
body.room .btn.secondary { color: var(--room-text); box-shadow: inset 0 0 0 1.5px var(--room-line); }
body.room .avatar { background: #fff; color: var(--ink); }
body.room .site-footer { border-color: var(--room-line); color: var(--room-muted); }
body.room > *:not(.backdrop) { position: relative; z-index: 1; }

/* Waiting room / end screen: the webinar photo, darkened into the Ink world */
.backdrop { position: fixed; inset: 0; z-index: 0; background: center / cover no-repeat; }
.backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 23, 28, .84), rgba(20, 23, 28, .94) 60%, var(--ink)); }

.live-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--room-line); background: rgba(20, 23, 28, .7); color: #fff;
  font: 500 .7rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--blush); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.topbar .wrap.room-head { justify-content: flex-start; flex-wrap: wrap; }
.room-head .title { font-weight: 600; font-size: .95rem; }
.room-head .watching { margin-left: auto; color: var(--room-muted); font: .8rem var(--mono); }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { width: 100%; height: 100%; display: block; pointer-events: none; }
.player:fullscreen { border-radius: 0; }
.player .controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  opacity: 0; transition: opacity .2s;
}
.player:hover .controls, .player.show-controls .controls { opacity: 1; }
.icon-btn { background: none; border: 0; color: #fff; cursor: pointer; font-size: 1.15rem; padding: 4px 6px; line-height: 1; }
.controls input[type=range] { width: 110px; accent-color: #fff; }
.controls .spacer { flex: 1; }
.controls .elapsed { font: .8rem var(--mono); color: #ddd; font-variant-numeric: tabular-nums; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 23, 28, .6); text-align: center; padding: 20px; }
.unmute {
  position: absolute; top: 14px; left: 14px; background: rgba(20, 23, 28, .85); color: #fff; border: 1px solid var(--room-line);
  border-radius: 999px; padding: 10px 16px; font: 600 .9rem var(--font); cursor: pointer;
}
.under-player { display: flex; align-items: center; gap: 14px; margin-top: 16px; }

/* "Starting soon" panel over the opening minutes of a recording */
.holding {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background: rgba(20, 23, 28, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity .8s ease;
}
.holding .kicker { color: var(--blush); }
.holding h3 { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 800; text-transform: uppercase; line-height: 1.1; margin: 10px 0 8px; color: #fff; }
.holding p { margin: 0; color: var(--room-muted); font-size: .95rem; }
.unmute { z-index: 2; }

.agenda { margin-top: 24px; padding: 22px 24px; border-radius: var(--radius); background: var(--room-panel); border: 1px solid var(--room-line); }
.agenda ol { list-style: none; counter-reset: item; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.agenda li { counter-increment: item; display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; font-size: .92rem; line-height: 1.5; color: var(--room-muted); }
.agenda li::before { content: counter(item, decimal-leading-zero); grid-row: span 2; font: 500 .78rem/1.9 var(--mono); color: var(--blush); }
.agenda li strong { color: var(--room-text); font-weight: 600; }

/* Offer card: Ink world uses a Blush hairline; the button is the single crimson element. */
.offer {
  margin-top: 18px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--room-panel); border: 1px solid var(--room-line); border-top: 2px solid var(--blush);
  display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center;
  animation: slideUp .5s ease;
}
.offer .kicker { color: var(--blush); }
.offer h3 { margin: 6px 0 4px; }
.offer p { margin: 0; color: var(--room-muted); font-size: .95rem; }
.offer .price { color: var(--room-text); font-weight: 600; }
.offer .footnote { grid-column: 1 / -1; font-size: .72rem; color: var(--room-muted); margin-top: 8px; line-height: 1.5; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

.chat {
  background: var(--room-panel); border: 1px solid var(--room-line); border-radius: var(--radius);
  display: flex; flex-direction: column; height: min(78vh, 680px); min-height: 0;
}
.chat header { padding: 14px 16px; border-bottom: 1px solid var(--room-line); display: flex; justify-content: space-between; }
.chat .log { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { font-size: .9rem; line-height: 1.45; animation: fadeIn .3s ease; }
.msg b { display: block; font-size: .76rem; color: var(--room-muted); font-weight: 600; margin-bottom: 1px; }
.msg.host b { color: var(--blush); }
.msg.host b::after { content: ' · Host'; }
.msg.mine b { color: #fff; }
.msg .note { font: .68rem var(--mono); letter-spacing: .06em; color: var(--room-muted); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--room-line); }
.chat input {
  flex: 1; min-width: 0; font: inherit; font-size: .95rem; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--room-line); background: var(--room-bg); color: var(--room-text);
}
.chat input:focus { outline: none; border-color: var(--room-muted); }
.chat button { border-radius: 10px; padding: 0 16px; background: #fff; color: var(--ink); }
.chat button:hover { background: var(--blush); }
.chat .hint { font: .68rem var(--mono); letter-spacing: .06em; color: var(--room-muted); padding: 0 14px 10px; }

.replay-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.player.native video { pointer-events: auto; }

/* ---------- Admin ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .stage { grid-template-columns: 1fr; }
  .chat { height: 460px; }
  .offer { grid-template-columns: 1fr; }
  .countdown div { min-width: 64px; }
  .room-head .watching { margin-left: 0; }
  .logo img { height: 26px; }
  .hero-photo:not(.hidden) + .card { margin: -28px 10px 0; padding: 24px; }
}
