:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --paper: #f7f9fb;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.12);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), transparent 38rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}
img, video { display: block; max-width: 100%; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  min-height: 46px;
  padding: 6px 8px 6px 18px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(22px) saturate(180%);
  transform: translateX(-50%);
}
.brand { font-size: 13px; font-weight: 500; letter-spacing: 0.01em; }
.nav { display: flex; justify-content: center; gap: 20px; color: var(--muted); font-size: 13px; }
.nav a { transition: color 160ms ease; }
.nav a:hover { color: var(--ink); }

.rail-control {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
}

.intro {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 112px 0 72px;
}
.intro-copy { max-width: 620px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: 0; }
h1 { font-size: clamp(48px, 7.4vw, 96px); line-height: 0.95; letter-spacing: -0.04em; }
.intro-copy p:last-child { margin: 24px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 24px); line-height: 1.35; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.intro-actions a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72);
  color: rgba(29,29,31,.84); font-size: 14px; font-weight: 450;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.intro-actions a:first-child { border-color: rgba(0,113,227,.24); background: #0071e3; color: #fff; }
.intro-actions a:hover { transform: translateY(-1px); }
.intro-showcase { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 132px; gap: 12px; }
.showcase-card {
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius);
  background: #fff; box-shadow: 0 18px 54px rgba(0,0,0,.09); isolation: isolate;
}
.showcase-card.is-large { grid-column: span 2; grid-row: span 2; }
.showcase-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 220ms ease; }
.showcase-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 46%, rgba(0,0,0,.48) 100%); }
.showcase-card span { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; color: #fff; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.showcase-card:hover img { transform: scale(1.06); }

.slide-strip { padding: 44px 0 90px; }
.section-label { width: min(1180px, calc(100% - 40px)); margin: 0 auto 24px; color: var(--muted); font-size: 14px; }
.section-label span { color: var(--ink); font-weight: 500; letter-spacing: 0.01em; }
.section-label p { max-width: 560px; margin: 8px 0 0; color: rgba(110,110,115,.72); font-size: 12px; line-height: 1.45; }
.slides { display: grid; gap: clamp(28px, 5vw, 72px); }
.slide-panel { width: min(1180px, calc(100% - 40px)); margin: 0 auto; scroll-margin-top: 96px; }
.slide-card {
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.78); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
.rebuilt-card {
  aspect-ratio: 16 / 9;
  background:
    url("site_assets/public/backgrounds/keynote-paper-bg.jpg") center / cover no-repeat,
    #f5f7fa;
}
.rebuilt-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.18), transparent 42%);
  pointer-events: none;
}
.section-title {
  position: absolute; z-index: 2; top: 7.2%; left: 4%; right: 4%; text-align: center;
  color: rgba(29,29,31,.72); font-size: clamp(22px, 4.3vw, 58px); font-weight: 370;
  letter-spacing: .02em; line-height: 1.05; text-transform: none;
}
.asset-frame {
  position: absolute; z-index: 1; overflow: hidden; background: transparent;
}
.asset-frame img, .asset-frame video { width: 100%; height: 100%; object-fit: cover; }
.asset-frame.is-contain img { object-fit: contain; }
.slide-bullets {
  position: absolute; z-index: 2; margin: 0; padding-left: 1.2em;
  color: rgba(29,29,31,.70); font-size: clamp(15px, 2.7vw, 36px); font-weight: 330; line-height: 1.52;
}
.slide-bullets li { margin: 0 0 .72em; padding-left: .25em; }
.slide-bullets.is-compact {
  font-size: clamp(13px, 2.35vw, 30px);
  line-height: 1.45;
}
.slide-bullets.is-compact li { margin: 0 0 .58em; }
.slide-caption {
  position: absolute; z-index: 2; display: grid; place-items: center; color: rgba(29,29,31,.64);
  font-size: clamp(14px, 2.2vw, 30px); font-weight: 340; text-align: center;
}
.slide-caption.is-small { font-size: clamp(8px, .8vw, 12px); color: rgba(110,110,115,.55); }
.contact-content {
  position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink); text-align: center;
}
.contact-content h2 { margin: 0 0 16px; color: rgba(29,29,31,.82); font-size: clamp(34px, 5.2vw, 68px); font-weight: 430; letter-spacing: -0.035em; }
.contact-primary { margin-top: 6px; color: rgba(29,29,31,.82); font-size: clamp(16px, 2vw, 25px); font-weight: 420; letter-spacing: -0.015em; }
.contact-primary[href^="https"] { color: #0071e3; }
.contact-label { margin-top: 34px; color: rgba(110,110,115,.68); font-size: clamp(11px, 1.1vw, 14px); }
.contact-secondary { margin-top: 8px; color: rgba(110,110,115,.82); font-size: clamp(14px, 1.6vw, 20px); letter-spacing: -0.01em; }
.slide-meta { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 12px 2px 0; color: var(--muted); font-size: 13px; }
.slide-meta strong { color: var(--ink); font-weight: 450; letter-spacing: 0.01em; }

.thumb-rail { position: fixed; z-index: 18; right: 18px; bottom: 18px; }
.thumbs {
  position: absolute; right: 0; bottom: 48px; display: none; grid-template-columns: repeat(3, 44px); gap: 8px;
  max-height: min(70vh, 620px); overflow: auto; padding: 10px; border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px; background: var(--glass); box-shadow: 0 16px 48px rgba(0,0,0,.12); backdrop-filter: blur(22px) saturate(180%);
}
.thumb-rail.is-open .thumbs { display: grid; }
.thumb {
  display: grid; place-items: center; width: 44px; height: 28px; border: 1px solid transparent; border-radius: 6px;
  background: rgba(255,255,255,.62); color: rgba(29,29,31,.68); cursor: pointer; font-size: 11px;
}
.thumb.is-active { border-color: rgba(0,113,227,.9); color: var(--ink); }
.progress { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(29,29,31,.08); }
.progress span { display: block; width: 0%; height: 100%; background: #0071e3; }

@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr; }
  .nav { display: none; }
  .intro { grid-template-columns: 1fr; min-height: auto; padding-top: 104px; }
  .intro-copy p:last-child { font-size: 18px; }
  .intro-showcase { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 118px; }
  .slide-panel, .section-label, .intro { width: min(100% - 24px, 1180px); }
  .section-title { font-size: clamp(18px, 5.5vw, 34px); }
  .thumbs { grid-template-columns: repeat(3, 40px); }
  .thumb { width: 40px; }
}

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