/* TEDxHawkesbury 2026 — Program
   Mobile-first, designed at 430px width (matches Figma).
   Scales up to a centred column on larger viewports.
*/

/* ---------- Design tokens ---------- */
:root {
  --bright-red:    #EB0028;
  --mid-red:       #BA0020;
  --dark-red:      #760014;   /* dark-dark red */
  --deep-red:      #3E000B;   /* dark-dark-dark red */
  --deeper-red:    #1E0005;   /* lightbox/program background */
  --bg-cream:      #F4F1DE;
  --pink:          #F7ACCF;
  --purple:        #34113F;
  --black:         #000000;
  --neutral:       #151216;
  --white:         #FFFFFF;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Responsive column — matches Figma's 430px */
  --col-w: 430px;
  --pad-x: 32px;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.3;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Page column ---------- */
.page {
  width: 100%;
  max-width: var(--col-w);
  margin: 0 auto;
  background: var(--black);
  position: relative;
  overflow: hidden;                 /* contain bleed elements like rings */
  box-shadow: 0 0 48px rgba(0,0,0,.35);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bright-red);
  color: var(--bg-cream);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  transition: transform .15s var(--ease-out), background-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.btn:hover { background: #ff1538; }
.btn:active { transform: scale(.97); }
.btn:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.btn--wide { width: 264px; max-width: 100%; }
.btn__icon { width: 32px; height: 32px; flex-shrink: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 503px;
  background: var(--black);
  overflow: hidden;
  isolation: isolate;
}

.hero__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
/* From outer (largest/darkest) to inner (smallest/cream) */
.ring--1 { width: 914px;   height: 914px;   background: #160004; }
.ring--2 { width: 840.88px; height: 840.88px; background: #1E0005; }
.ring--3 { width: 767.76px; height: 767.76px; background: #2B0007; }
.ring--4 { width: 694.64px; height: 694.64px; background: #3E000B; }
.ring--5 { width: 621.52px; height: 621.52px; background: #760014; }
.ring--6 { width: 548.40px; height: 548.40px; background: #BA0020; }
.ring--7 { width: 475.28px; height: 475.28px; background: #EB0028; }
.ring--8 { width: 402.16px; height: 402.16px; background: #F4F1DE; }

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 var(--pad-x);
}

/* Self-contained "Unbreak the Future — TEDxHawkesbury" lockup SVG */
.hero__lockup {
  display: block;
  width: 300px;
  height: auto;
  max-width: 100%;
}

/* ---------- WELCOME ---------- */
/* Welcome + survey/social cards sit inside a black container with a
   curved top edge that overlaps the hero's bottom rings. */
.welcome {
  position: relative;
  background: var(--black);
  color: var(--bg-cream);
  padding: 70px var(--pad-x) 60px;
  margin-top: -40px;             /* overlap the hero */
  border-radius: 40px 40px 0 0;  /* curved top */
  z-index: 2;
  overflow: hidden;
}
/* Subtle red glow bleeding in from the top, echoing the hero rings */
.welcome__glow {
  position: absolute;
  width: 928px;
  height: 928px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #3E000B 0%, #1E0005 40%, transparent 70%);
  left: 50%;
  top: 0;
  transform: translate(-50%, -60%);
  pointer-events: none;
  opacity: .75;
  z-index: 0;
}
.welcome__inner { position: relative; z-index: 1; }

.welcome__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 24px;
  color: var(--bg-cream);
  letter-spacing: -0.5px;
}
.welcome__body {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 32px;
  color: var(--bg-cream);
}

/* ---------- PANEL (survey + social) ---------- */
.panel {
  background: var(--black);
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 64px;
  position: relative;
  z-index: 1;
}

/* ---------- CARD (generic dark card) ---------- */
.card {
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}
.card--dark {
  background: var(--deep-red);
  color: var(--bg-cream);
}
.card__head { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.card__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--bg-cream);
}
.card__subtitle {
  font-size: 17px;
  font-weight: 400;
  margin: 0;
  color: var(--bg-cream);
  opacity: .9;
}

.social {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

/* ---------- ABOUT (light cream section) ---------- */
.about {
  background: var(--bg-cream);
  color: var(--neutral);
  padding: 64px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}
.about__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.5px;
}
.about__body {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  color: var(--neutral);
}

/* ---------- PROGRAM ---------- */
.program {
  background: var(--deep-red);
  color: var(--bg-cream);
  padding: 64px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.program__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.program__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  color: var(--bg-cream);
  letter-spacing: -0.5px;
}
.program__subtitle {
  font-size: 17px;
  font-weight: 400;
  margin: 0;
  color: var(--bg-cream);
  opacity: .6;
}

/* host row sits outside the schedule (no divider to its bottom) */
.row--host { margin-top: -8px; }

/* Speaker row — behaves like a list item button */
.row {
  display: grid;
  grid-template-columns: 50px 1fr 24px;
  gap: 20px;
  align-items: center;
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--bg-cream);
  min-height: 50px;
  transition: transform .15s var(--ease-out), opacity .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.row:hover { opacity: .92; }
.row:active { transform: scale(.99); }
.row:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
  border-radius: 8px;
}

.row__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--dark-red);
}
.row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.row__eyebrow {
  font-size: 17px;
  opacity: .6;
  line-height: 1.3;
}
.row__name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.row__talk {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  opacity: .85;
  margin-top: 2px;
}
.row__chev {
  color: var(--bg-cream);
  opacity: .6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.row__chev svg { width: 18px; height: 18px; }

/* Time block */
.block--time {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 31px;
}
.pill {
  background: var(--dark-red);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 17px;
  font-weight: 400;
  color: var(--bg-cream);
  opacity: .9;
  min-width: 82px;
  text-align: center;
  white-space: nowrap;
}
.block__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bg-cream);
}

/* Schedule container */
.schedule {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.divider {
  height: 1px;
  background: rgba(244, 241, 222, .15);
  width: 100%;
}

/* ---------- THANKS ---------- */
.thanks {
  background: var(--black);
  color: var(--bg-cream);
  padding: 48px var(--pad-x) 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.thanks__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--white);
}
.thanks__brand { width: 265px; height: auto; }

/* =====================================================
   LIGHTBOX (modal)
   ===================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;            /* sheet slides up from bottom on mobile */
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.modal[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: var(--col-w);
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--deeper-red);
  color: var(--bg-cream);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(20px);
  transition: transform .35s var(--ease-out);
  box-shadow: 0 -20px 48px rgba(0,0,0,.5);
}
.modal[aria-hidden="false"] .modal__dialog { transform: translateY(0); }

/* Grab handle hint at top of sheet */
.modal__dialog::before {
  content: "";
  position: sticky;
  top: 8px;
  left: 50%;
  display: block;
  width: 44px;
  height: 4px;
  margin: 8px auto 0;
  background: rgba(244, 241, 222, .25);
  border-radius: 99px;
  pointer-events: none;
}

.modal__close {
  position: sticky;
  top: 24px;
  float: right;              /* actually pin to right inside the scroll column */
  margin-right: 32px;        /* 32pt padding from right per design */
  margin-top: 16px;
  margin-bottom: -64px;      /* allow subsequent content to flow under */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark-red);
  color: var(--bg-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
  transition: background-color .15s var(--ease-out), transform .15s var(--ease-out);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.modal__close svg { width: 22px; height: 22px; }
.modal__close:hover { background: var(--mid-red); }
.modal__close:active { transform: scale(.95); }
.modal__close:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.modal__body {
  padding: 72px var(--pad-x) 64px;   /* 72px top leaves room for close button */
}

/* ---------- Sheet (inside modal) ---------- */
.sheet {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sheet__portrait {
  width: 131px;
  height: 131px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--mid-red);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.sheet__eyebrow {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--pink);
  letter-spacing: .2px;
}
.sheet__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  color: var(--bg-cream);
  letter-spacing: -0.5px;
}
.sheet__title--inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 36px;
}
.sheet__title--second { margin-top: 16px; }
.sheet__logo {
  height: 0.75em;
  width: auto;
  display: inline-block;
  vertical-align: baseline;
  transform: translateY(2px);
}
.sheet__talktitle {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--pink);
  line-height: 1.3;
}
.sheet__lead {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--pink);
}
.sheet__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--bg-cream);
}
.sheet__body p { margin: 0; }
.sheet__signoff {
  font-size: 20px;
  font-weight: 400;
  margin: 16px 0 0;
  color: var(--bg-cream);
  line-height: 1.3;
}
.sheet__signoff strong { font-weight: 800; }

.sheet--speaker .sheet__talktitle { margin-top: -12px; }
.sheet--about  { gap: 20px; }

/* ---------- Responsive up-scale ---------- */
@media (min-width: 480px) {
  .page {
    max-width: 430px;                 /* keep mobile scale even on desktop */
    margin: 24px auto;
    border-radius: 24px;
  }
  body { background: #0a0a0a; }
}

/* On very wide displays, centre neatly and show a subtle background */
@media (min-width: 900px) {
  body {
    background:
      radial-gradient(ellipse at 50% 0%, rgba(235, 0, 40, 0.12), transparent 60%),
      #050505;
  }
}

/* ---------- Motion reduction ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
