@font-face {
  font-family: "KellyRegular";
  src: url("/fonts/kelly-regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GorditaMedium";
  src: url("/fonts/gordita-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --terracotta: #db805b;
  --terracotta-deep: #b8603d; /* darker shade of the brand terracotta, for text contrast on cream */
  --amber: #f0b55f;
  --blue: #84a9c4;
  --taupe: #ddc8b8;
  --blush: #fad9c9;
  --cream: #f5f2ee;
  --black: #000000;

  --display: "KellyRegular", "GorditaMedium", Georgia, serif;
  --body: "GorditaMedium", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --radius: 6px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--black);
  color: var(--cream);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

main:focus, [tabindex="-1"]:focus { outline: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--terracotta);
  border-radius: var(--radius);
  background: var(--terracotta);
  color: #fff;
  font-family: var(--body);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn--ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--taupe);
}
.btn--ghost:hover { background: var(--taupe); border-color: var(--taupe); }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--terracotta-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
}

/* Signature terracotta semicircle, bleeding off the bottom edge */
.hero::after {
  content: "";
  position: absolute;
  right: -6vw;
  bottom: -1px;
  width: clamp(220px, 34vw, 460px);
  aspect-ratio: 2 / 1;
  background: var(--terracotta);
  border-radius: 999px 999px 0 0;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__title {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(2.8rem, 6.4vw, 4.9rem);
  line-height: 0.95;
  margin: 0 0 1.25rem;
}
.hero__title span { display: block; color: var(--terracotta); }

.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34ch;
  margin: 0 0 2rem;
}

/* The fanned hand of cards */
.fan {
  position: relative;
  height: clamp(300px, 42vw, 470px);
  margin-inline: auto;
  width: 100%;
  max-width: 520px;
}
.fan__card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(140px, 19vw, 215px);
  transform-origin: 50% 110%;
  transform: translateX(-50%) rotate(var(--r, 0deg));
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.fan__card img { border-radius: 14px; }
.fan:not(.is-dealt) .fan__card { transform: translateX(-50%) rotate(0deg); }

@media (prefers-reduced-motion: reduce) {
  .fan__card { transition: none; }
}

/* ---------- Access box ---------- */

.access {
  background: var(--blush);
  border: 2px solid var(--taupe);
  border-radius: 10px;
  padding: 1.25rem;
  max-width: 460px;
}
.access--inline {
  max-width: 520px;
  margin-inline: auto;
  background: var(--cream);
}
.access__label {
  display: block;
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}
.access__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.access__input {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--taupe);
  border-radius: var(--radius);
  background: #fff;
  color: var(--black);
  min-width: 0;
}
.access__row .btn { flex: 0 0 auto; }
.access__input:focus-visible { outline: none; border-color: var(--terracotta); }
.access__help {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  opacity: 0.75;
}
.access__msg {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--blush);
  font-size: 0.92rem;
}
.access__msg:empty { display: none; }
.access__msg a { color: var(--terracotta-deep); }
.access__links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

.access--in {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.access__tick {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: grid;
  place-items: center;
}
.access--in p { margin: 0; }
.access--in .access__who { font-size: 0.85rem; opacity: 0.75; }

/* ---------- Host ---------- */

.host {
  background: var(--amber);
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.host__inner {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.host__card img { border-radius: 12px; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.6); }
.section-title {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1;
  margin: 0 0 1rem;
}
.host p { max-width: 60ch; margin: 0 0 1rem; }
.host .btn { margin-top: 0.5rem; background: var(--black); border-color: var(--black); }
.host .btn:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }

/* ---------- Contestant grid ---------- */

.lineup { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.lineup__intro { max-width: 56ch; margin: 0 0 2.5rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 1.75rem);
}
.tile {
  display: block;
  text-decoration: none;
  border-radius: 12px;
}
.tile__img {
  border-radius: 12px;
  aspect-ratio: 2 / 3;
  background: var(--taupe);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover .tile__img,
.tile:focus-visible .tile__img {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.6);
}
.tile__name { display: block; margin-top: 0.75rem; font-size: 1rem; line-height: 1.3; }
.tile__talk { display: block; margin-top: 0.2rem; font-size: 0.85rem; line-height: 1.4; opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .tile__img { transition: none; }
  .tile:hover .tile__img, .tile:focus-visible .tile__img { transform: none; }
}

/* ---------- Speaker page ---------- */

.speaker { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 6vw, 4.5rem); }

.crumbs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.92rem;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.speaker__top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, 290px) minmax(200px, 260px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.speaker__name {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1;
  margin: 0 0 0.5rem;
}
.speaker__hero {
  color: var(--terracotta-deep);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.speaker__bio p { margin: 0 0 1rem; max-width: 60ch; }
.speaker__card img { border-radius: 14px; box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.6); }
.speaker__links { display: grid; gap: 0.6rem; }
.speaker__links .btn { width: 100%; }

.talk {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 2px solid var(--taupe);
}
.talk__title {
  font-family: var(--body);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  margin: 0 0 0.3rem;
  max-width: 44ch;
}
.talk__sub { margin: 0 0 1.5rem; opacity: 0.75; max-width: 60ch; }
.talk__title + .player, .talk__title + .locked { margin-top: 1.5rem; }

.player {
  width: 100%;
  aspect-ratio: 1832 / 982;
  background: var(--black);
  border-radius: 10px;
  overflow: hidden;
}
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

.locked {
  background: var(--taupe);
  border-radius: 10px;
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}
.locked__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
}
.locked__title {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
}
.locked > p { max-width: 48ch; margin: 0 auto 1.5rem; }
.locked .access { text-align: left; }

.soon { background: var(--taupe); border-radius: 10px; padding: 2rem; text-align: center; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}
.pager a {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  text-decoration: none;
  font-size: 0.85rem;
}
.pager a strong { font-weight: 500; font-size: 1.05rem; }
.pager a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.pager__next { margin-left: auto; text-align: right; }

.notfound { padding: 5rem 0; text-align: center; }

/* ---------- Footer ---------- */

.footer {
  background: var(--black);
  color: var(--cream);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.88rem;
}
.footer__inner p { margin: 0.25rem 0; }
.footer a { color: var(--amber); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero::after { display: none; }
  .hero__copy { order: 2; }
  .fan { order: 1; height: clamp(250px, 62vw, 380px); }
  .speaker__top { grid-template-columns: minmax(0, 1fr) minmax(170px, 240px); }
  .speaker__info { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .host__inner { grid-template-columns: 1fr; }
  .host__card { max-width: 190px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .speaker__top { grid-template-columns: 1fr; }
  .speaker__card { max-width: 240px; }
  .access__row .btn { flex: 1 1 100%; }
}
