/* ============================================================
   AI Supply Chains — site styles
   Clean, reserved, academic. Soft rainbow accent.
   ============================================================ */

:root {
  --accent: #2364d2;        /* clear blue */
  --accent-hover: #174ea6;
  --accent-light: #eef4ff;
  --accent-mid: #9dbdff;
  --rainbow-gradient: linear-gradient(100deg, #007aff 0%, #5e5ce6 24%, #af52de 48%, #ffb340 72%, #34c759 100%);
  --rainbow-soft: linear-gradient(100deg, rgba(0, 122, 255, 0.12), rgba(94, 92, 230, 0.12), rgba(175, 82, 222, 0.12), rgba(255, 179, 64, 0.12), rgba(52, 199, 89, 0.12));
  --ink: #1f2421;           /* near-black text */
  --ink-soft: #4c5550;
  --rule: #d8ddda;
  --paper: #f3f9ff;         /* very light blue */
  --card: #ffffff;
  --max-width: 64rem;
  --serif: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

.network-bg {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.network-art {
  fill: none;
  opacity: 0.55;
  position: absolute;
  stroke: rgba(35, 100, 210, 0.16);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform-origin: center;
  will-change: transform;
}

.network-art circle {
  fill: rgba(35, 100, 210, 0.08);
}

.network-art marker path {
  fill: rgba(35, 100, 210, 0.16);
  stroke: none;
}

.network-art-a {
  animation: sleepy-float-a 14s ease-in-out infinite alternate;
  left: -5rem;
  top: 7rem;
  width: 28rem;
}

.network-art-b {
  animation: sleepy-float-b 18s ease-in-out infinite alternate;
  right: -4rem;
  top: 22rem;
  width: 30rem;
}

.network-art-c {
  animation: sleepy-float-c 22s ease-in-out infinite alternate;
  bottom: 4rem;
  left: 18%;
  width: 34rem;
}

@keyframes sleepy-float-a {
  from { transform: translate3d(0, 0, 0) rotate(-7deg); }
  to { transform: translate3d(5rem, 2rem, 0) rotate(-1deg); }
}

@keyframes sleepy-float-b {
  from { transform: translate3d(0, 0, 0) rotate(8deg); }
  to { transform: translate3d(-4rem, 2.5rem, 0) rotate(2deg); }
}

@keyframes sleepy-float-c {
  from { transform: translate3d(0, 0, 0) rotate(2deg); }
  to { transform: translate3d(3rem, -2.4rem, 0) rotate(7deg); }
}

@media (prefers-reduced-motion: reduce) {
  .network-art {
    animation: none;
  }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-hover); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.gradient-text {
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
}

.gradient-text,
.eyebrow,
.question-callout-label,
.schedule .time,
.schedule-details h3,
.badge,
.lit-group-title {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.site-title:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Tabs ---------- */

.tab-panel[hidden] { display: none; }
.tab-panel { padding: 2.5rem 0 4rem; }

/* ---------- Home / hero ---------- */

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

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 0.75rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.construction {
  display: inline-block;
  font-size: 1.05rem;
  background: var(--rainbow-soft);
  border: 1px solid rgba(122, 44, 255, 0.22);
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1rem;
}

/* ---------- Tutorial header ---------- */

.tutorial-header {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.75rem;
  margin-bottom: 2.25rem;
}

.eyebrow {
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.tutorial-header h1 {
  font-size: 2rem;
  margin: 0 0 0.9rem;
  max-width: 46rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 2rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.organizer-meta {
  gap: 0.2rem 1.25rem;
  margin-top: 0.45rem;
  max-width: 58rem;
}

/* ---------- Question callout ---------- */

.question-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff8d9;
  border: 1px solid #e3c65d;
  border-radius: 4px;
  box-shadow: 0 0.65rem 1.5rem rgba(180, 140, 20, 0.1);
  overflow: hidden;
  padding: 0.85rem 1rem;
  margin: -0.75rem 0 1.75rem;
  position: relative;
}

.question-callout-label {
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin: 0 0 0.1rem;
  text-transform: uppercase;
}

.question-callout-text {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

.question-callout-link {
  background: #f2c300;
  border-radius: 4px;
  color: var(--ink);
  flex: 0 0 auto;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}

.question-callout-link:hover {
  background: #d9ad00;
  color: var(--ink);
}

@media (max-width: 36rem) {
  .question-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .question-callout-link {
    text-align: center;
  }
}

/* ---------- Two-column intro ---------- */

.two-col {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  padding: 1.5rem 1.75rem;
  position: relative;
}

.card h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}

.card h3 {
  font-size: 1.02rem;
  margin: 1.5rem 0 0.5rem;
}

.card p { margin: 0 0 0.9rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Schedule & organizer lists ---------- */

.schedule-panel-section {
  margin-top: 1.75rem;
}

.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.schedule-item {
  display: grid;
  gap: 0.6rem 1.5rem;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  padding: 0.75rem 0;
  border-bottom: 1px dotted var(--rule);
}
.schedule-item:last-child { border-bottom: none; }

.schedule .time {
  background: var(--rainbow-gradient);
  background-clip: text;
  font-variant-numeric: tabular-nums;
  color: transparent;
  font-weight: 600;
}

.schedule-main {
  min-width: 0;
}

.schedule-details {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(13rem, 0.85fr) minmax(0, 1.15fr);
  margin-top: 0.85rem;
}

.schedule-details h3 {
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}

.schedule-details p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.compact-panelist-list li:first-child {
  border-top: none;
}

@media (max-width: 46rem) {
  .schedule-item,
  .schedule-details {
    grid-template-columns: 1fr;
  }

  .schedule-item {
    gap: 0.25rem;
  }
}

/* ---------- Sections ---------- */

.section { margin-top: 3.25rem; }

.section-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

.section-intro {
  color: var(--ink-soft);
  max-width: 44rem;
  margin: 0 0 1.5rem;
}

.badge {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
  border: 1px solid rgba(122, 44, 255, 0.2);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin-left: 0.5rem;
}

/* ---------- Embedded resources ---------- */

.embed-gallery {
  margin: 0 -1.75rem;
  overflow: hidden;
  padding: 0 1.75rem;
  position: relative;
}

.embed-gallery:hover .embed-grid,
.embed-gallery:focus-within .embed-grid {
  animation-play-state: paused;
}

.embed-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  width: max-content;
}

.embed-grid.is-gallery-ready {
  animation: gallery-scroll 42s linear infinite;
}

.embed-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  flex: 0 0 clamp(19rem, 31vw, 24rem);
  margin: 0;
  overflow: hidden;
  position: relative;
}

.embed-frame {
  aspect-ratio: 16 / 11;
  background: #eef2f0;
  border-bottom: 1px solid var(--rule);
  display: block;
  position: relative;
}

.embed-frame img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.embed-frame-contain {
  background: #f8f8f8;
}

.embed-frame-contain img {
  object-fit: contain;
}

.embed-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.embed-link:hover img {
  filter: saturate(1.08) contrast(1.03);
}

.embed-visual-caption {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  padding: 0.8rem 0.9rem 0.2rem;
}

.embed-card figcaption {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 0.15rem 0.9rem 0.95rem;
}

@keyframes gallery-scroll {
  to {
    transform: translateX(calc(-50% - 0.625rem));
  }
}

@media (max-width: 42rem) {
  .embed-card {
    flex-basis: min(22rem, 82vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .embed-gallery {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--accent-mid) transparent;
  }

  .embed-grid {
    padding-bottom: 0.35rem;
  }

  .embed-card {
    scroll-snap-align: start;
  }

  .embed-grid.is-gallery-ready {
    animation: none;
  }
}

/* ---------- Panelist videos ---------- */

.video-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.video-thumb {
  aspect-ratio: 16 / 10;
  background: var(--accent);
  background: var(--rainbow-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-caption {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.video-caption strong { display: block; }
.video-caption span { color: var(--ink-soft); }

/* ---------- Panels & panelists ---------- */

.panelist-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panelist-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px dotted var(--rule);
}

.panelist-name { font-weight: 600; }

.panelist-blurb {
  color: var(--ink-soft);
  font-size: 0.92rem;
  flex-basis: 100%;
}

/* ---------- Literature guide ---------- */

.lit-group {
  margin-bottom: 1.75rem;
}

.lit-group-title {
  background: var(--rainbow-gradient);
  background-clip: text;
  color: transparent;
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}

.lit-list {
  margin: 0;
  padding-left: 1.4rem;
}

.lit-list li {
  margin-bottom: 1.05rem;
  font-size: 0.95rem;
}

.lit-entry-title { font-weight: 600; }

.lit-entry-meta {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.lit-entry-summary {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.1rem;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }
