/* AIS Live brand site. Tokens follow the AIS Live October White Design System v1.0. */

@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #F5F5F5;
  --surface: #FFFFFF;
  --ink: #101724;
  --ink-hover: #29364A;
  --muted: #526071;
  --blue: #37BDF8;
  --link: #076B96;
  --blue-soft: #E8F6FD;
  --line: #DCE2E8;
  --control-line: #C9D1DA;
  --film: #06090F;

  --font: "DM Sans", Arial, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-shutter: cubic-bezier(.16, 1, .3, 1);
  --ease-brand: cubic-bezier(.23, 1, .32, 1);

  --content: 1200px;
  --gutter: 48px;
  --radius-control: 8px;
  --radius-card: 16px;
  --radius-film: 16px;
  --section-gap: clamp(64px, 7vw, 96px);
  --header-h: 80px;
}

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

html {
  background: var(--canvas);
  color: var(--ink);
  scrollbar-color: #BCC6D0 var(--canvas);
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  font: 400 1rem/1.6 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The faint dot field from the October banner, fading out under the hero. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background-image: radial-gradient(rgba(16, 23, 36, .085) 1px, transparent 1.3px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

::selection { background: var(--blue-soft); color: var(--ink); }

img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 4px;
  border-radius: var(--radius-control);
}

.wrap {
  width: min(calc(100% - var(--gutter) * 2), var(--content));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 30;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-control);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #fff;
  font: 500 .9375rem/1 var(--font);
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease;
}
.button:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.button:active { background: #0A0F18; }
.button--sm { min-height: 44px; padding: 0 18px; font-size: .875rem; }

.i-arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s var(--ease-out);
}
.button:hover .i-arrow,
.text-link:hover .i-arrow { transform: translateX(3px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  font-size: .9375rem;
  text-decoration: underline;
  text-decoration-color: var(--control-line);
  transition: text-decoration-color .18s ease;
}
.text-link:hover { text-decoration-color: var(--ink); }

/* Header: sticky, solid canvas, hairline once the page moves */
.site-header-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 245, 245, .96);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.is-scrolled .site-header-bar { border-bottom-color: var(--line); }
.site-header {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}
.wordmark { display: block; border-radius: 4px; }
.wordmark img { width: 156px; height: auto; }
.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-top: clamp(28px, 4vw, 64px); }

.hero__title {
  font-weight: 500;
  font-size: clamp(2.5rem, 1rem + 5.2vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.line { display: block; text-wrap: balance; }
.line--ink { color: var(--ink); }
.line--muted { color: var(--muted); }

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px 48px;
  align-items: start;
  margin-top: clamp(20px, 2.4vw, 32px);
}
.hero__lead {
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}

/* The next event: one small, standing invitation */
.next {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.next__title { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }
.next__label { color: var(--muted); font-weight: 400; }
.next__meta {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
.next__cta { margin-top: 14px; }

/* Film */
/* The film runs wider than the text column: MAX-scale media, still inset from the viewport edge. */
.film {
  width: min(calc(100% - 32px), 1440px);
  margin: clamp(28px, 3.4vw, 48px) auto 0;
}

.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-film);
  background: var(--film);
  isolation: isolate;
}
.film__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--film);
}

.film__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.film__caption {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}
.film__controls {
  flex: none;
  display: flex;
  gap: 8px;
}
.film__ctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 13px;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 .875rem/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.film__ctl:hover { background: var(--surface); border-color: #9FAAB6; }
.film__ctl:focus-visible { border-radius: 999px; }

.i-ctl,
.i-sound {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-play { fill: currentColor; stroke: none; }
.film__ctl .i-play { display: none; }
.film__ctl[data-playing="false"] .i-play { display: block; }
.film__ctl[data-playing="false"] .i-pause { display: none; }
.i-sound--on { display: none; }
.film__sound[data-on="true"] .i-sound--on { display: block; }
.film__sound[data-on="true"] .i-sound--off { display: none; }

/* The film waits for the visitor: one centered play button over the after-party poster. */
.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 500 1.0625rem/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 28px rgba(6, 9, 15, .28);
  transition: background-color .18s ease;
}
.film__play svg { width: 20px; height: 20px; fill: currentColor; }
.film__play:hover { background: var(--ink-hover); }
.film__play:focus-visible { outline-color: var(--ink); border-radius: 999px; }
.film__len {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .72);
  font-variant-numeric: tabular-nums;
}
.film.is-paused .film__play { display: inline-flex; }

/* Section frame: generous space above the hairline, less below */
.about,
.formats,
.speakers__head,
.events,
.voices,
.close {
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.about, .formats, .speakers, .events, .voices, .close { margin-top: var(--section-gap); }

.section-title {
  font-weight: 500;
  font-size: clamp(1.875rem, 1.05rem + 2.3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.032em;
}

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px 24px;
  align-items: start;
}
.about .section-title { grid-column: 1 / span 5; }
.about__body { grid-column: 7 / -1; }
.lead {
  font-size: clamp(1.125rem, 1rem + .45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34em;
  text-wrap: pretty;
}
.pillars { margin-top: clamp(28px, 3vw, 40px); }
.pillar {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar dt { font-weight: 500; }
.pillar dd { color: var(--muted); }

/* Formats */
.formats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(32px, 3.4vw, 48px);
}
.format {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.format h3 {
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.format p { margin-top: 12px; color: var(--muted); max-width: 34em; text-wrap: pretty; }


/* Speakers: a rail that starts on the content edge and bleeds to the viewport */
.speakers__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.rail-nav { display: flex; gap: 8px; flex: none; }
.rail-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--control-line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, opacity .18s ease;
}
.rail-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn:hover { background: var(--surface); border-color: #9FAAB6; }
.rail-btn:disabled { opacity: .35; cursor: default; background: transparent; border-color: var(--control-line); }
.rail-btn:focus-visible { border-radius: 50%; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 21vw, 272px);
  gap: 20px;
  margin-top: clamp(32px, 3.4vw, 48px);
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  padding-bottom: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; border-radius: var(--radius-card); }
.person { scroll-snap-align: start; }
.person img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--canvas);
}
.person__name { margin-top: 14px; font-weight: 500; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.015em; }
.person__role { margin-top: 2px; color: var(--muted); font-size: .875rem; line-height: 1.45; }

/* Events */
.editions { margin-top: clamp(32px, 3.4vw, 48px); }
.edition {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 8px 32px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.edition:last-child { border-bottom: 1px solid var(--line); }
.edition__when { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.edition h3 { font-weight: 500; font-size: 1.375rem; line-height: 1.3; letter-spacing: -.02em; }
.edition__what p { margin-top: 6px; color: var(--muted); max-width: 44em; }
.edition__act {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-top: 3px;
}
.edition__status { color: var(--muted); font-size: .875rem; }
.edition[data-edition="october"] .edition__status { color: var(--ink); font-weight: 500; }
.edition .text-link { min-height: 36px; }

/* Voices */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: clamp(32px, 3.4vw, 48px);
}
.quote { padding-top: 22px; border-top: 1px solid var(--line); }
.quote blockquote p {
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
.quote blockquote p::before { content: "\201C"; }
.quote blockquote p::after { content: "\201D"; }
.quote figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.quote__name { font-weight: 500; font-size: .9375rem; }
.quote__role { color: var(--muted); font-size: .875rem; }

/* Close: one quiet line */
.close { padding-bottom: clamp(56px, 6vw, 88px); }
.close__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 1.0625rem;
}
.close__note { color: var(--muted); font-size: .875rem; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-block: 28px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--link); }

/* After the October event: no signup buttons until the next edition has a URL. */
.is-past a[data-cta],
.is-past [data-close] { display: none; }

/* Entrance motion. Content stays visible without JS (no .js class) and after the fallback timer. */
.js [data-rise] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-brand), transform .7s var(--ease-brand);
  transition-delay: var(--delay, 0ms);
}
.js [data-rise].is-in { opacity: 1; transform: none; }

.js [data-type] .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(.3em);
  transition: opacity .7s var(--ease-brand), filter .7s var(--ease-brand), transform .7s var(--ease-brand);
  transition-delay: var(--d, 0ms);
}
.js [data-type].is-in .ch { opacity: 1; filter: blur(0); transform: none; }
.word { display: inline-block; white-space: nowrap; }

.js .film__frame {
  clip-path: inset(5% 4% round var(--radius-film));
  opacity: 0;
  transition: clip-path 1.1s var(--ease-shutter), opacity .7s ease;
}
.js .film.is-in .film__frame { clip-path: inset(0 round var(--radius-film)); opacity: 1; }
.js .film__bar { opacity: 0; transition: opacity .8s ease .5s; }
.js .film.is-in .film__bar { opacity: 1; }

.reveal-all [data-rise],
.reveal-all [data-type] .ch,
.reveal-all .film__frame,
.reveal-all .film__bar {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  clip-path: none !important;
}

/* Short windows (a docked browser pane, a small laptop): tighten the hero so the film reaches the first screen. */
@media (max-height: 700px) and (min-width: 761px) {
  :root { --header-h: 64px; }
  .hero { padding-top: 16px; }
  .hero__title { font-size: clamp(2.25rem, 1rem + 3.4vw, 3.5rem); }
  .hero__row { margin-top: 14px; }
  .hero__lead { font-size: 1.0625rem; }
  .next { padding: 12px 16px 14px; }
  .next__cta { margin-top: 10px; min-height: 40px; }
  .film { margin-top: 20px; }
}

/* Tablet */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .about .section-title, .about__body { grid-column: 1 / -1; }
  .quotes { grid-template-columns: 1fr; }
  .edition { grid-template-columns: 140px minmax(0, 1fr); }
  .edition__act { grid-column: 2; flex-direction: row; align-items: center; gap: 16px; }
  .hero__row { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px 28px; }
}

/* Phone */
@media (max-width: 760px) {
  :root { --gutter: 20px; --radius-film: 12px; --header-h: 64px; }
  .wordmark img { width: 124px; }
  .site-nav { display: none; }
  .site-header .button { margin-left: auto; }
  .hero__row { grid-template-columns: 1fr; gap: 20px; }
  .film__bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .film__play { min-height: 48px; padding: 0 18px 0 16px; font-size: .9375rem; gap: 10px; }
  .film__len { padding-left: 10px; }
  .film { width: calc(100% - var(--gutter) * 2); }
  .pillar { grid-template-columns: 1fr; gap: 4px; }
  .formats__grid { grid-template-columns: 1fr; }
  .format { padding: 24px; }
  .speakers__head .rail-nav { display: none; }
  .rail { grid-auto-columns: 64%; gap: 14px; }
  .edition { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .edition__act { grid-column: 1; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-rise],
  .js [data-type] .ch,
  .js .film__frame,
  .js .film__bar { opacity: 1; filter: none; transform: none; clip-path: none; }
}
