:root {
  color-scheme: light;
  --ink: #11100e;
  --muted: #706b64;
  --faint: #9a948c;
  --paper: #f8f5ef;
  --ivory: #fffdf8;
  --porcelain: #eee8de;
  --line: rgba(17, 16, 14, 0.13);
  --line-strong: rgba(17, 16, 14, 0.28);
  --graphite: #171714;
  --bronze: #9a6d3a;
  --sage: #536d62;
  --shadow: 0 30px 90px rgba(22, 20, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    "PingFang TC",
    sans-serif;
  line-height: 1.65;
  text-rendering: geometricPrecision;
}

body.cover-page {
  overflow: hidden;
}

body.is-leaving {
  animation: pageLeaveCalm 720ms cubic-bezier(0.64, 0, 0.78, 0) both;
}

body.is-leaving[data-transition="cinematic"] {
  animation: pageLeaveToBlack 900ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

body.is-leaving[data-transition="curtain"] {
  animation: none;
}

.page-transition {
  position: fixed;
  z-index: 999;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  will-change: transform, opacity;
}

.page-transition::before,
.page-transition::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 32%),
    radial-gradient(circle at 70% 30%, rgba(83, 109, 98, 0.12), transparent 34%),
    #090907;
  transform: scaleX(0);
  will-change: transform;
}

.page-transition::before {
  left: 0;
  transform-origin: left;
  clip-path: polygon(
    0 0,
    100% 0,
    97.5% 7%,
    100% 15%,
    96.5% 24%,
    99.5% 34%,
    96% 47%,
    100% 60%,
    97% 73%,
    99.5% 86%,
    96.5% 100%,
    0 100%
  );
  box-shadow: inset -26px 0 38px rgba(0, 0, 0, 0.34);
}

.page-transition::after {
  right: 0;
  transform-origin: right;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    3.5% 100%,
    0.5% 86%,
    3% 73%,
    0 60%,
    4% 47%,
    0.5% 34%,
    3.5% 24%,
    0 15%,
    2.5% 7%
  );
  box-shadow: inset 26px 0 38px rgba(0, 0, 0, 0.34);
}

body.is-leaving .page-transition {
  animation: veilInCalm 720ms cubic-bezier(0.64, 0, 0.78, 0) both;
}

body.is-leaving[data-transition="cinematic"] .page-transition {
  background: #050504;
  opacity: 1;
  transform: none;
  animation: fadeToBlack 900ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

body.is-leaving[data-transition="cinematic"] .page-transition::before,
body.is-leaving[data-transition="cinematic"] .page-transition::after {
  display: none;
}

body.is-leaving[data-transition="curtain"] .page-transition {
  background:
    linear-gradient(90deg, rgba(248, 245, 239, 0.96), rgba(255, 253, 248, 1)),
    var(--ivory);
  transform-origin: left;
  animation: veilInCurtain 760ms cubic-bezier(0.83, 0, 0.17, 1) both;
}

html.is-arriving {
  background: #090907;
}

html.is-arriving body {
  animation: none;
}

html.is-arriving[data-arrival="cinematic"] .page-transition {
  opacity: 1;
  transform: none;
  background: transparent;
}

html.is-arriving[data-arrival="cinematic"] .page-transition::before,
html.is-arriving[data-arrival="cinematic"] .page-transition::after {
  transform: scaleX(1);
  animation: curtainOpenFromCenter 1600ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

html.is-arriving[data-arrival="cinematic"] .site-header,
html.is-arriving[data-arrival="cinematic"] main,
html.is-arriving[data-arrival="cinematic"] .footer {
  animation: revealBehindCurtain 1600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.is-arriving[data-arrival="curtain"] .page-transition {
  opacity: 1;
  transform: scaleX(1);
  transform-origin: right;
  background:
    linear-gradient(90deg, rgba(248, 245, 239, 0.96), rgba(255, 253, 248, 1)),
    var(--ivory);
  animation: veilOutCurtain 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 22px clamp(22px, 5vw, 72px);
  background: rgba(248, 245, 239, 0.76);
  border-bottom: 1px solid rgba(17, 16, 14, 0.08);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 32px;
  border: 1px solid var(--line-strong);
  color: var(--graphite);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-name,
.nav {
  color: rgba(17, 16, 14, 0.58);
  font-size: 13px;
}

.brand-name {
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 28px;
}

.hero {
  position: relative;
  min-height: 96vh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 150px clamp(22px, 6vw, 84px) 58px;
  background: #11110f;
  color: #fffdf8;
}

.cover-hero {
  cursor: pointer;
}

.hero-image,
.hero-scrim,
.hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  filter: saturate(0.8) contrast(1.02);
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.9) 0%, rgba(7, 7, 6, 0.68) 42%, rgba(7, 7, 6, 0.2) 100%),
    linear-gradient(0deg, rgba(7, 7, 6, 0.78) 0%, rgba(7, 7, 6, 0.02) 46%),
    rgba(34, 28, 20, 0.08);
}

.hero-frame {
  inset: 92px clamp(18px, 4vw, 52px) 32px;
  width: auto;
  height: auto;
  border: 1px solid rgba(255, 253, 248, 0.22);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 26px;
  max-width: 790px;
  animation: contentRise 780ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--bronze);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif TC", serif;
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 253, 248, 0.76);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 8px;
  color: rgba(255, 253, 248, 0.64);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-cue {
  position: absolute;
  z-index: 2;
  right: clamp(22px, 6vw, 84px);
  bottom: 48px;
  display: grid;
  gap: 4px;
  min-width: min(270px, calc(100% - 44px));
  padding: 18px 20px;
  border: 1px solid rgba(255, 253, 248, 0.24);
  background: rgba(17, 17, 15, 0.36);
  color: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(18px);
  animation: contentRise 800ms 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cover-cue span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-cue strong {
  color: var(--ivory);
  font-size: 18px;
  font-weight: 540;
}

.journey-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(248, 245, 239, 0.96), rgba(248, 245, 239, 0.7)),
    url("./assets/hero-chip-journey.png") center / cover;
}

.calm-header {
  background: rgba(248, 245, 239, 0.72);
}

.journey-main {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 120px clamp(22px, 6vw, 84px) 72px;
}

.journey-panel {
  max-width: 980px;
  padding: clamp(28px, 6vw, 70px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(238, 232, 222, 0.76)),
    var(--ivory);
  box-shadow: var(--shadow);
  animation: contentRise 720ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.journey-panel h1 {
  max-width: 850px;
  margin: 12px 0 0;
  font-family: Georgia, "Times New Roman", "Noto Serif TC", serif;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.journey-copy {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-top: 34px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.journey-copy p {
  margin: 0;
}

.journey-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 42px;
  padding: 0 24px;
  background: var(--graphite);
  color: var(--ivory);
  font-size: 15px;
}

.speakers,
.selection {
  padding: clamp(72px, 10vw, 132px) clamp(22px, 6vw, 84px);
}

.section-heading h1,
.section-heading h2,
.selection h2 {
  margin: 12px 0 0;
  font-family: Georgia, "Times New Roman", "Noto Serif TC", serif;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0;
}

.speakers-page {
  padding-top: 132px;
}

.selection-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.controls {
  position: sticky;
  z-index: 10;
  top: 77px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 clamp(22px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(20px);
}

.filter {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 0 22px;
  border: 0;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  background: transparent;
  color: rgba(17, 16, 14, 0.58);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.filter.is-active {
  border-left-color: var(--line);
  border-right-color: var(--line);
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink);
}

.speakers {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.62), rgba(238, 232, 222, 0.5)),
    var(--porcelain);
}

.section-heading {
  max-width: 1120px;
  margin-bottom: clamp(34px, 5vw, 58px);
}

.speaker-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: clamp(26px, 6vw, 86px);
  align-items: end;
}

.speaker-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.speaker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.speaker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 430px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.42);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  animation: contentRise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.is-arriving[data-arrival="curtain"] .speaker-card {
  animation: none;
}

.speaker-card:nth-child(2) {
  animation-delay: 70ms;
}

.speaker-card:nth-child(3) {
  animation-delay: 120ms;
}

.speaker-card:nth-child(4) {
  animation-delay: 170ms;
}

.speaker-card:nth-child(5) {
  animation-delay: 220ms;
}

.speaker-card:nth-child(6) {
  animation-delay: 270ms;
}

.speaker-card:hover {
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.speaker-body {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 42px);
}

.speaker-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tag {
  padding: 6px 10px;
  border: 1px solid rgba(17, 16, 14, 0.14);
  color: rgba(17, 16, 14, 0.56);
  font-size: 12px;
}

.speaker-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif TC", serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.12;
}

.speaker-role {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.speaker-focus {
  margin: 30px 0 0;
  color: #292722;
  font-size: 16px;
}

.speaker-question {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.speaker-question span {
  color: var(--sage);
  font-size: 13px;
}

.speaker-question p {
  margin: 7px 0 0;
  color: rgba(17, 16, 14, 0.62);
  font-size: 15px;
}

.primary-action,
.secondary-action,
.speaker-button,
.text-button,
.submit-button,
.rank-controls button,
.student-field input {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.speaker-button {
  align-self: flex-start;
  min-height: 43px;
  margin-top: auto;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.speaker-button.is-selected {
  border-color: var(--graphite);
  background: var(--graphite);
  color: var(--ivory);
}

.selection {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 520px);
  gap: clamp(34px, 7vw, 96px);
  background: var(--paper);
}

.selection-box {
  align-self: start;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(238, 232, 222, 0.62)),
    var(--ivory);
  box-shadow: var(--shadow);
}

.selection-box:has(.student-field input:focus) {
  border-color: rgba(17, 16, 14, 0.42);
}

.selection-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-button {
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.selected-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: selected;
}

.selected-list li {
  counter-increment: selected;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: #302d28;
}

.selected-list li::before {
  content: counter(selected, decimal-leading-zero);
  color: rgba(17, 16, 14, 0.32);
  font-family: Georgia, "Times New Roman", serif;
}

.selected-list strong {
  display: block;
  font-weight: 540;
}

.selected-list span {
  display: block;
  color: var(--faint);
  font-size: 13px;
}

.selected-item {
  align-items: center;
}

.selected-info {
  min-width: 0;
}

.rank-controls {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rank-controls button {
  min-width: 38px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
  color: rgba(17, 16, 14, 0.72);
  font-size: 13px;
}

.rank-controls button:disabled {
  cursor: default;
  opacity: 0.34;
}

.student-field {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.student-field span {
  color: rgba(17, 16, 14, 0.62);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.74);
  color: var(--ink);
  cursor: text;
  outline: 0;
}

.student-field input:focus {
  border-color: var(--line-strong);
  background: var(--ivory);
}

.student-field input::placeholder {
  color: rgba(17, 16, 14, 0.32);
}

.submit-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  background: var(--graphite);
  color: var(--ivory);
  font-size: 15px;
}

.form-message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--sage);
  font-size: 14px;
}

.empty-state {
  color: var(--muted);
}

.footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 30px clamp(22px, 6vw, 84px);
  border-top: 1px solid var(--line);
  color: rgba(17, 16, 14, 0.5);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer span:nth-child(2) {
  text-align: center;
}

.footer span:last-child {
  text-align: right;
}

@media (max-width: 980px) {
  .speaker-heading,
  .selection {
    grid-template-columns: 1fr;
  }

  .speaker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    top: 0;
    padding: 15px 18px;
  }

  .brand-name,
  .nav {
    display: none;
  }

  .hero {
    min-height: 90vh;
    padding: 118px 20px 34px;
  }

  .cover-hero {
    min-height: 100vh;
  }

  .hero-frame {
    inset: 74px 12px 14px;
  }

  .hero-content {
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .cover-cue {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 24px;
    min-width: 0;
  }

  .journey-main {
    padding: 96px 20px 48px;
  }

  .journey-panel {
    padding: 28px 22px;
  }

  .journey-panel h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .speakers,
  .selection {
    padding: 64px 20px;
  }

  .speakers-page {
    padding-top: 96px;
  }

  .controls {
    top: 63px;
    padding: 0 20px;
  }

  .filter {
    min-height: 52px;
    padding: 0 17px;
  }

  .speaker-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .speaker-body {
    padding: 22px;
  }

  .speaker-card h3 {
    font-size: 32px;
  }

  .speaker-button {
    width: 100%;
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .footer span,
  .footer span:nth-child(2),
  .footer span:last-child {
    text-align: left;
  }
}

@keyframes pageLeaveCalm {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0.72;
    transform: translateY(-8px);
  }
}

@keyframes pageLeaveToBlack {
  from {
    filter: saturate(1) brightness(1);
    transform: scale(1);
  }

  to {
    filter: saturate(0.84) brightness(0.72);
    transform: scale(0.985);
  }
}

@keyframes pageLeaveCurtain {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0.82;
    transform: translateX(-10px);
  }
}

@keyframes veilInCalm {
  from {
    opacity: 0;
    transform: scaleY(0);
  }

  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes fadeToBlack {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes curtainOpenFromCenter {
  0% {
    transform: scaleX(1);
  }

  30% {
    transform: scaleX(1);
  }

  100% {
    transform: scaleX(0);
  }
}

@keyframes revealBehindCurtain {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(10px) scale(0.998);
  }

  30% {
    opacity: 0.14;
    filter: blur(6px);
    transform: translateY(10px) scale(0.998);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes veilOutCurtain {
  0% {
    opacity: 1;
    transform: scaleX(1);
  }

  100% {
    opacity: 1;
    transform: scaleX(0);
  }
}

@keyframes veilInCurtain {
  0% {
    opacity: 1;
    transform: scaleX(0);
  }

  62% {
    transform: scaleX(1);
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes contentRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
