/* MDIL demo · 8 September 2026 — one-pager.
   Built on the MDIL design-system tokens (site/_ds). Nothing here redefines a
   brand value; everything is a token or a composition of tokens. The page is a
   web adaptation of the deck grammar: mono chrome, kicker bars, the crimson
   trust line. Dark top, lilac body, dark footer — the mdil.ai order. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--head);
  color: var(--ink);
  letter-spacing: var(--ls-head);
  margin: 0;
}

em { font-style: normal; color: var(--brand-2); }
strong { color: var(--ink); font-weight: 600; }

/* ── Frame ───────────────────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
section { padding: var(--sp-8) 0; }
/* The chrome is sticky, so an anchor jump must clear it. */
section[id] { scroll-margin-top: 72px; }

/* ── Mono chrome ─────────────────────────────────────── */
.chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Solid, not a scrim: the bar rides over the black hero and then over the
     lilac body, and a translucent black would go grey-violet on the second. */
  background: var(--bg);
  border-bottom: 1px solid var(--hair-2);
}
.chrome-in {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 58px;
}
.brandmark { display: flex; align-items: center; gap: 10px; }
.brandmark img { height: 42px; width: auto; display: block; }
.chrome-meta {
  font-family: var(--mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.chrome-meta.hide-sm { margin-left: auto; }
.conf {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--brand-2);
  border: 1px solid rgba(161, 0, 255, .35);
  background: var(--brand-dim);
  border-radius: var(--r-pill);
  padding: 5px 13px;
  white-space: nowrap;
}
.chrome .conf { margin-left: auto; }
.chrome-meta.hide-sm + .conf { margin-left: 0; }

/* ── Kicker: 34×2px purple bar, mono, wide tracking ──── */
.kicker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: var(--sp-5);
}
.kicker { flex-wrap: wrap; }
.kicker::before {
  content: "";
  flex: none;
  width: 34px;
  height: 2px;
  background: var(--brand);
}
.kicker .fi { color: var(--ink-dim); letter-spacing: var(--ls-label); }

/* ── Trust line: 2px repeating-dotted crimson ────────── */
.trustline {
  height: 2px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--accent-dim) 0 6px,
    transparent 6px 12px
  );
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
  /* The dark top's own material — mdil.ai's hero wash, not a page-wide one,
     because the page stops being dark directly below it. */
  background:
    radial-gradient(1200px 620px at 14% 2%, rgba(161, 0, 255, .19), transparent 62%),
    radial-gradient(1000px 560px at 86% 12%, rgba(161, 0, 255, .16), transparent 64%),
    radial-gradient(1500px 700px at 50% 112%, rgba(161, 0, 255, .12), transparent 60%),
    var(--glow-top),
    var(--bg);
}
.hero h1 {
  font-size: clamp(32px, 7.2vw, 82px);
  font-weight: var(--fw-title);
  letter-spacing: var(--ls-title);
  line-height: 1.02;
  max-width: 15ch;
}
.hero h1 .turn { display: block; color: var(--ink-faint); }
.lede {
  font-size: clamp(18px, 2.1vw, var(--fs-lede));
  line-height: var(--lh-lede);
  color: var(--ink-faint);
  max-width: 56ch;
  margin: var(--sp-5) 0 0;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-6);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-soft);
}
.hero-facts .sep { color: var(--brand); }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

/* ── Light body ──────────────────────────────────────────
   mdil.ai runs its dark top into a lilac body and back out to a dark footer.
   The same move here, done as a token flip rather than a second stylesheet:
   the surfaces, the ink ladder and the semantic pairs are redefined once, and
   every component below the hero keeps reading the tokens it already read. */
.lightbody {
  background: var(--lilac-bg);
  /* body sets `color: var(--ink-soft)`, but colour inherits as a computed
     value, not as the variable — so the ink has to be re-read here. */
  color: var(--ink-soft);

  /* Surfaces: cards go white on lilac, wells barely off it. */
  --bg-card: #FFFFFF;
  --bg-card-2: rgba(22, 9, 31, .05);
  --bg-well: rgba(22, 9, 31, .03);

  /* Ink — the violet-black mdil.ai writes with, on the same five-step ladder
     as the white one it replaces. */
  --ink: #16091F;
  --ink-soft: rgba(22, 9, 31, .78);
  --ink-faint: rgba(22, 9, 31, .62);
  --ink-mute: rgba(22, 9, 31, .52);
  --ink-dim: rgba(22, 9, 31, .42);

  /* The lighter purple exists to carry on black. On lilac the brand itself
     carries — 4.9:1 against #F2EAF8 — so links, kickers and em go to it. */
  --brand-2: var(--brand);

  /* Crimson at full strength: dimmed crimson reads pink on a light ground. */
  --accent-2: #B4232E;
  --accent-dim: var(--accent);

  /* The `-2` semantics are "text on dark" by definition, so each pair flips:
     dark ink on a tint lifted off white instead of pale ink on a dark one. */
  --amber-2: #8A5200;
  --amber-soft: rgba(217, 138, 43, .13);
  --amber-line: rgba(154, 91, 0, .34);
  --success-2: #16613F;
  --success-soft: rgba(30, 138, 85, .08);
  --success-line: rgba(30, 138, 85, .32);
  --info: #4B63C8;
  --info-2: #2E3F8F;
  --info-soft: rgba(75, 99, 200, .07);
  --info-line: rgba(75, 99, 200, .26);

  /* Hairlines drawn out of the ink rather than out of white. */
  --hair: rgba(22, 9, 31, .13);
  --hair-2: rgba(22, 9, 31, .085);
}

/* Three things the flip cannot reach on its own. */

/* The primary button keeps its purple fill, so its label stays white —
   `var(--ink)` would put violet-black on purple. */
.lightbody .btn-primary,
.lightbody .btn-primary:hover { color: #FFFFFF; }

/* The seat form is the page's one brand-edged card, as on mdil.ai. */
.lightbody .signup {
  border-color: rgba(161, 0, 255, .35);
  box-shadow: var(--shadow-brand);
}

/* Card labels go purple on light, where dim ink stops registering. */
.lightbody .card .num { color: var(--brand); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 15px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand);
  color: var(--ink);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: #B62BFF; color: var(--ink); }
.btn-ghost {
  border-color: var(--hair);
  color: var(--ink-soft);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-card-2); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.cta-note {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-mute);
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.card h3 {
  font-size: 21px;
  font-weight: var(--fw-semibold);
  margin-bottom: 10px;
}
.card p { margin: 0; color: var(--ink-faint); font-size: 16px; }
.card .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  color: var(--ink-dim);
  display: block;
  margin-bottom: var(--sp-3);
}

/* ── Spec & run lists ────────────────────────────────── */
.speclist { list-style: none; margin: 0; padding: 0; }
.speclist li {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hair-2);
  font-family: var(--mono);
  font-size: 15px;
}
.speclist li:last-child { border-bottom: 0; }
.speclist .k { color: var(--ink-mute); flex: none; width: 12ch; }
.speclist .v { color: var(--ink); }
.runlist { list-style: none; margin: 0; padding: 0; }
.runlist li {
  position: relative;
  padding: 0 0 var(--sp-4) var(--sp-5);
  color: var(--ink-faint);
  font-size: 16px;
}
.runlist li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-family: var(--mono);
}
.runlist b { color: var(--ink); font-weight: 600; }

/* ── Programme ───────────────────────────────────────── */
.programme { list-style: none; margin: 0; padding: 0; }
.programme li {
  display: grid;
  grid-template-columns: 10ch 1fr;
  gap: var(--sp-5);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--hair-2);
  align-items: baseline;
}
.programme li:last-child { border-bottom: 0; }
.programme .t {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--brand-2);
  font-weight: 500;
}
.programme .what { color: var(--ink); font-size: 17px; }
.programme .what span { display: block; color: var(--ink-faint); font-size: 15px; margin-top: 4px; }
/* A talk's own title, in its author's words. */
.programme .quote { color: var(--ink-soft); }
.programme .by {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brand-2);
  letter-spacing: .02em;
  margin-top: 6px;
}

/* Grid and flex children must be allowed to shrink below their content,
   otherwise a long mono string widens the document past the viewport. */
.split-prog > *, .split-form > *, .venue > *, .grid2 > *, .stack > *,
.foot-grid > *, .programme li > *, .speclist li > *,
.chrome-in > * { min-width: 0; }

/* ── Composition helpers ─────────────────────────────── */
/* The CSP is `style-src 'self'` with no unsafe-inline, so every one of these
   is a class rather than a style attribute. */
.stack { display: grid; gap: var(--sp-5); align-content: start; }
.split-prog { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
.split-form { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--sp-7); align-items: start; }
.h-form {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: var(--fw-head);
  line-height: 1.06;
}
.lede-sm { font-size: 19px; }
.runlist-gap { margin-top: var(--sp-6); }
.grid2-gap, .field-gap { margin-top: var(--sp-5); }
.banner-gap { margin-bottom: var(--sp-5); }
.map-link { margin-top: var(--sp-5); }
.banner b { color: inherit; font-weight: 600; white-space: nowrap; }

/* ── Banners ─────────────────────────────────────────── */
.banner {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: 15px;
  line-height: 1.45;
}
.banner::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 7px;
}
.banner-amber { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber-2); }
.banner-amber::before { background: var(--amber); }
.banner-green { background: var(--success-soft); border: 1px solid var(--success-line); color: var(--success-2); }
.banner-green::before { background: var(--success-dot); }
.banner-info { background: var(--info-soft); border: 1px solid var(--info-line); color: var(--info-2); }
.banner-info::before { background: var(--info); }
.tbc {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  color: var(--amber-2);
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  white-space: nowrap;
}

/* ── Venue ───────────────────────────────────────────── */
.venue { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-7); align-items: start; }
.venue-addr {
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.venue-addr .muted { color: var(--ink-mute); }
.venue-spec { margin-top: var(--sp-6); border-top: 1px solid var(--hair-2); }

/* ── Form ────────────────────────────────────────────── */
.signup {
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  box-shadow: var(--shadow-brand-lg);
}
.field { display: block; margin-bottom: var(--sp-5); }
.field > .lab {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 9px;
}
.field .req { color: var(--accent-2); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  background: var(--bg-well);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 15px;
}
textarea { resize: vertical; min-height: 84px; }
select { font-family: var(--mono); font-size: 15px; appearance: none; padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%),
                    linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat; }
select option { background: var(--bg-card); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-dim); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.grid2 .field { margin-bottom: 0; }
.grid2 + .field { margin-top: var(--sp-5); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.consent input { margin-top: 3px; accent-color: var(--brand); flex: none; width: 16px; height: 16px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); margin-top: var(--sp-6); }
.formmsg { margin-top: var(--sp-5); }
.formmsg:empty { display: none; }
.privacy {
  margin-top: var(--sp-5);
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.55;
}

/* ── Close ───────────────────────────────────────────── */
.close h2 {
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: var(--fw-head);
  line-height: 1.04;
  max-width: 20ch;
}

/* ── Footer ──────────────────────────────────────────── */
/* Back to dark under the lilac — the material change is the divider, so
   there is no rule across the seam. */
footer { background: var(--glow-bl), var(--bg-deep); padding: var(--sp-7) 0 var(--sp-8); }
.strap {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--ink-mute);
  margin-bottom: var(--sp-6);
}
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.foot-grid h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 10px;
  font-weight: 500;
}
.foot-grid p { margin: 0; font-size: 15px; color: var(--ink-faint); line-height: 1.6; }
.pagemark {
  margin-top: var(--sp-7);
  font-family: var(--mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ── Entrance: rise, staggered — the only animation ──── */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s cubic-bezier(.2, .75, .25, 1) both; }
.d1 { animation-delay: .07s; } .d2 { animation-delay: .14s; }
.d3 { animation-delay: .21s; } .d4 { animation-delay: .28s; }
.d5 { animation-delay: .35s; } .d6 { animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .split-prog, .split-form { grid-template-columns: 1fr; gap: var(--sp-6); }
  .venue { grid-template-columns: 1fr; gap: var(--sp-6); }
  .foot-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .field { margin-bottom: var(--sp-5); }
  section { padding: var(--sp-7) 0; }
  .signup { padding: var(--sp-6) var(--sp-5); }
}
@media (max-width: 620px) {
  .hide-sm { display: none; }
  .kicker { font-size: 12px; letter-spacing: .18em; gap: var(--sp-2); }
  .kicker::before { width: 24px; }
  .hero-facts { font-size: 13px; gap: 4px var(--sp-4); }
  .venue-addr { font-size: 15px; }
  .speclist li, .programme .what span { font-size: 14px; }
  select { font-size: 13px; }
  .wrap { padding: 0 var(--sp-5); }
  .programme li { grid-template-columns: 1fr; gap: 4px; }
  .speclist li { flex-direction: column; gap: 2px; }
  .speclist .k { width: auto; }
  .btn { width: 100%; justify-content: center; }
}
