/* ==========================================================================
   Block Builder — public site
   The admin panel keeps using assets/css/style.css. This file is public-only.
   ========================================================================== */

/* Tokens
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f7f9fa;
  --surface: #ffffff;
  --surface-soft: #eef1f3;
  --ink: #101314;
  --muted: #5c6670;
  --line: rgba(16, 19, 20, 0.1);
  --line-strong: rgba(16, 19, 20, 0.24);
  --accent: #2f6f4e;
  --accent-ink: #185c3d;
  --accent-soft: rgba(47, 111, 78, 0.1);
  --glass: rgba(247, 249, 250, 0.72);
  --btn: #101314;
  --btn-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 19, 20, 0.04);
  --shadow-lg: 0 28px 64px -28px rgba(16, 19, 20, 0.28);
  --radius: 24px;
  --radius-sm: 16px;
  --wrap: 1080px;
  --header-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1d1d1f;
  --surface-soft: #141416;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(245, 245, 247, 0.12);
  --line-strong: rgba(245, 245, 247, 0.3);
  --accent: #7fd6a0;
  --accent-ink: #9be5b7;
  --accent-soft: rgba(127, 214, 160, 0.14);
  --glass: rgba(0, 0, 0, 0.66);
  --btn: #f5f5f7;
  --btn-ink: #0b0b0c;
  --shadow-sm: none;
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
}

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

* {
  margin: 0;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: clip;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

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

p,
h1,
h2,
h3,
h4,
blockquote {
  overflow-wrap: break-word;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--bg);
  }
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(145deg, #45b37a, #1f6f4a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 2px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.i-moon,
.menu-btn .i-close {
  display: none;
}

[data-theme="dark"] .i-sun {
  display: none;
}

[data-theme="dark"] .i-moon {
  display: block;
}

.menu-btn {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-open {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-close {
  display: block;
}

.mobile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 6px 20px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.mobile-menu nav {
  display: grid;
  width: min(100%, var(--wrap));
  margin-inline: auto;
}

.mobile-menu a {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
}

.mobile-menu a:last-child {
  border-bottom: 0;
}

.mobile-menu a:hover {
  color: var(--accent-ink);
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease,
    border-color 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--btn);
  color: var(--btn-ink);
}

.btn-primary:hover {
  opacity: 0.86;
}

.btn-secondary,
.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.btn-sm {
  height: 36px;
  padding: 0 15px;
  font-size: 13px;
}

.text-btn {
  padding: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.text-btn:hover {
  color: var(--ink);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-ink);
}

.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-muted {
  font-size: 13px;
  color: var(--muted);
}

.link-muted:hover {
  color: var(--ink);
}

/* Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 132px) 0 clamp(44px, 6vw, 72px);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(58% 52% at 50% 0%, var(--accent-soft), transparent 72%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  max-width: 15ch;
  margin: 18px auto 0;
  font-size: clamp(2.85rem, 7.4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero .lede {
  max-width: 58ch;
  margin: 22px auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  position: relative;
}

.hero-stats span + span::before {
  content: "·";
  position: absolute;
  left: -13px;
  color: var(--line-strong);
}

/* Sections
   ========================================================================== */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.section-head > p {
  max-width: 40ch;
  padding-bottom: 6px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* Video cards
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.video-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
  .video-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-lg);
  }
}

.video-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0e10;
}

.video-media.is-playable {
  cursor: pointer;
}

.video-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (hover: hover) {
  .video-card:hover .video-media > img {
    transform: scale(1.025);
  }
}

.video-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 52%);
  pointer-events: none;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1c2a24, #0b1410);
  color: rgba(255, 255, 255, 0.28);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-btn:hover {
  background: rgba(18, 18, 20, 0.74);
  transform: translate(-50%, -50%) scale(1.06);
}

.play-btn:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.play-btn svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.video-body {
  padding: 22px 22px 18px;
}

.video-body h3 {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.15;
}

.video-body h3 a:hover {
  color: var(--accent-ink);
}

.video-body > p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  list-style: none;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Inline player */
.video-player-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  animation: player-in 0.25s ease both;
}

@keyframes player-in {
  from {
    opacity: 0;
  }
}

.video-player-wrap iframe,
.video-player-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player-wrap video {
  object-fit: contain;
  background: #000;
}

.player-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.player-close:hover {
  background: rgba(0, 0, 0, 0.78);
  transform: scale(1.04);
}

.player-close svg {
  width: 16px;
  height: 16px;
}

/* About
   ========================================================================== */
.about-copy {
  max-width: 62ch;
}

.about-copy p {
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.55;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat strong {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.quote {
  max-width: 34ch;
  margin-top: clamp(36px, 6vw, 60px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.quote span {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

/* Contact
   ========================================================================== */
.cta {
  padding: clamp(36px, 6.5vw, 68px);
  border-radius: 30px;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}

.cta h2 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.cta > p {
  max-width: 48ch;
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.cta .btn-primary {
  background: var(--bg);
  color: var(--ink);
}

.cta .btn-secondary {
  border-color: color-mix(in srgb, var(--bg) 30%, transparent);
  color: var(--bg);
}

.cta .btn-secondary:hover {
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  border-color: color-mix(in srgb, var(--bg) 55%, transparent);
}

/* Footer
   ========================================================================== */
.site-footer {
  margin-top: clamp(48px, 7vw, 88px);
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-brand span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 30px;
  font-size: 12px;
  color: var(--muted);
}

/* Project detail
   ========================================================================== */
.detail {
  width: min(100% - 48px, 880px);
  margin-inline: auto;
  padding: 36px 0 72px;
}

.loading {
  padding: 88px 0;
  color: var(--muted);
  font-size: 14px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}

.back:hover {
  color: var(--ink);
}

.detail-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 32px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0c0e10;
}

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #0c0e10;
}

.video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 52%);
  pointer-events: none;
}

.video-facade:hover img {
  transform: scale(1.02);
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-facade:hover .play {
  background: rgba(18, 18, 20, 0.74);
  transform: translate(-50%, -50%) scale(1.06);
}

.play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.facade-label {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.detail-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player,
.video-still {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-head h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.detail-tagline {
  max-width: 62ch;
  margin-top: 12px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.meta-row .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-row > span {
  white-space: nowrap;
}

.views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.views svg {
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Project prose
   ========================================================================== */
.prose {
  max-width: 720px;
  margin-top: 44px;
  font-size: 16.5px;
  line-height: 1.72;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 40px 0 12px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.prose h3 {
  margin: 28px 0 9px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li {
  margin: 6px 0;
}

.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 600;
}

.prose code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  font-family: var(--mono);
  font-size: 0.85em;
}

.prose pre {
  margin: 0 0 18px;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.prose table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
}

.prose blockquote {
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.prose hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  height: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
}

.comments {
  max-width: 720px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.comments h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.comments-hint {
  margin: 6px 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.comments-hint a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.giscus-host {
  min-height: 120px;
}

/* Empty + hints
   ========================================================================== */
.empty {
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

.hint {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.hint code {
  font-family: var(--mono);
  font-size: 0.95em;
}

/* Legal
   ========================================================================== */
.legal {
  width: min(100% - 48px, 760px);
  margin-inline: auto;
  padding: 56px 0 84px;
}

.legal h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.legal .updated {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.legal .prose {
  margin-top: 28px;
}

.legal .prose h2 {
  margin-top: 34px;
}

/* 404
   ========================================================================== */
.notfound {
  width: min(100% - 48px, 620px);
  margin-inline: auto;
  padding: 96px 0 112px;
  text-align: center;
}

.notfound h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.notfound p {
  max-width: 46ch;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.notfound .btn {
  margin-top: 24px;
}

/* Entrance + reveal
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero h1,
  .hero .lede,
  .hero .hero-actions,
  .hero .hero-stats {
    animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  .hero h1 {
    animation-delay: 0.06s;
  }

  .hero .lede {
    animation-delay: 0.12s;
  }

  .hero .hero-actions {
    animation-delay: 0.18s;
  }

  .hero .hero-stats {
    animation-delay: 0.24s;
  }

  .video-card {
    animation: card-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  }

  .video-card:nth-child(2) {
    animation-delay: 0.08s;
  }

  .detail-media,
  .detail-head {
    animation: rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  .detail-head {
    animation-delay: 0.08s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .video-grid {
    gap: 18px;
  }

  .stats {
    gap: 10px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-head > p {
    max-width: 52ch;
    padding-bottom: 0;
  }
}

@media (max-width: 760px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: clamp(56px, 10vw, 88px);
  }

  .hero h1 {
    max-width: 13ch;
  }

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

  .stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .stat strong {
    min-width: 2ch;
  }

  .stat span {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .wrap,
  .detail,
  .legal,
  .notfound {
    width: calc(100% - 40px);
  }

  body {
    font-size: 16px;
  }

  .brand {
    max-width: 48vw;
    font-size: 14px;
  }

  .brand > span:last-child {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 11vw, 3.6rem);
    letter-spacing: -0.045em;
  }

  .hero .lede {
    margin-top: 18px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-stats {
    gap: 8px 18px;
    font-size: 12.5px;
  }

  .section {
    padding: 48px 0;
  }

  .video-body {
    padding: 20px 18px 16px;
  }

  .video-body h3 {
    font-size: 1.35rem;
  }

  .play-btn,
  .play {
    width: 56px;
    height: 56px;
  }

  .play-btn svg,
  .play svg {
    width: 20px;
    height: 20px;
  }

  .video-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cta {
    padding: 36px 22px;
    border-radius: 24px;
  }

  .cta .hero-actions {
    margin-top: 24px;
  }

  .footer-main {
    flex-direction: column;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail {
    padding-top: 26px;
  }

  .detail-media {
    margin-bottom: 24px;
  }

  .prose {
    font-size: 16px;
  }

  .prose table,
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
    width: auto;
  }

  .prose thead {
    display: none;
  }

  .prose tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .prose td {
    padding: 2px 0;
    border: 0;
    white-space: normal;
  }

  .prose td:nth-child(3) {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
  }

  .legal {
    padding-top: 40px;
  }

  .player-close {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    gap: 6px;
  }

  .header-actions {
    gap: 0;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .brand {
    max-width: 42vw;
    font-size: 13px;
  }

  .brand-mark {
    width: 20px;
    height: 20px;
  }

  .brand-mark::after {
    inset: 6px;
  }
}

/* Accessibility preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .play-btn,
  .play,
  .facade-label,
  .player-close {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header {
    background: var(--bg);
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #3f474e;
    --line: rgba(16, 19, 20, 0.28);
    --line-strong: rgba(16, 19, 20, 0.55);
  }

  [data-theme="dark"] {
    --muted: #d0d0d5;
    --line: rgba(245, 245, 247, 0.3);
    --line-strong: rgba(245, 245, 247, 0.6);
  }
}
