/* Landing layout, motion and film showcase share the existing brand palette. */
[hidden] { display: none !important; }
html { scroll-padding-top: 104px; }
.site-header {
  position: fixed;
  transition: background 240ms ease, border-color 240ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(247 247 242 / 92%);
  border-bottom-color: rgb(23 23 19 / 9%);
  backdrop-filter: blur(18px);
}
.header-nav { gap: 24px; }
.hero { min-height: min(780px, 100svh); padding: 132px 0 88px; }
.hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: clamp(32px, 5vw, 72px); }
.hero h1 { font-size: clamp(48px, 5.3vw, 80px); line-height: 1.18; letter-spacing: -0.055em; }
.hero-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-line > span { display: block; }
.hero-lede { max-width: 29em; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 24px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
.text-link:hover { color: var(--brown); }
.text-link > span { transition: transform 220ms var(--ease); }
.text-link:hover > span { transform: translate(2px, 2px); }
.watch-link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; font-size: 14px; text-decoration: none;
}
.watch-icon {
  display: grid; place-items: center; width: 29px; height: 29px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 19px;
  transition: transform 250ms var(--ease), background 250ms ease;
}
.watch-link:hover .watch-icon { transform: translate(2px, 2px); background: var(--sun); }
.hero-art { min-height: clamp(350px, 36vw, 480px); transform: translate3d(0, var(--hero-shift, 0px), 0); }
.hero-dog {
  width: min(32.5vw, 420px);
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) rotate(1.3deg);
  transition: transform 450ms var(--ease);
}
.art-orbit { width: min(33vw, 430px); transform: rotate(var(--orbit-turn, -12deg)); }
.orbit-dot {
  position: absolute; top: 11%; left: -9%; width: 13px; height: 13px;
  border-radius: 50%; background: var(--brown);
}
.orbit-dot.small { top: auto; bottom: 8%; left: auto; right: -10%; width: 7px; height: 7px; }
.hero-file {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border: 1px solid rgb(23 23 19 / 12%);
  border-radius: 12px; background: rgb(255 255 255 / 94%); box-shadow: var(--shadow-soft);
  font-size: 12px; white-space: nowrap;
}
.hero-file > span {
  display: grid; place-items: center; width: 29px; height: 33px;
  border-radius: 5px; background: var(--sun-soft); color: var(--brown);
  font-size: 14px; font-weight: 750;
}
.file-doc { top: 7%; left: -6%; transform: translate3d(0, var(--file-shift, 0px), 0) rotate(-6deg); }
.file-sheet { right: -3%; top: 28%; transform: translate3d(0, var(--file-shift, 0px), 0) rotate(5deg); }
.art-label { bottom: 14%; }
.motion-toggle {
  position: absolute; z-index: 3; right: 0; bottom: -14px; display: flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 8px 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer;
}
.motion-toggle:hover { background: var(--sun-soft); color: var(--ink); }
.motion-symbol { font-size: 14px; }
.cinema { overflow: clip; padding: clamp(72px, 7.5vw, 108px) 0; }
.cinema-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 50px; }
.cinema-heading .section-label { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.cinema-heading h2 { margin: 0; font-size: clamp(36px, 4.4vw, 62px); font-weight: 500; letter-spacing: -.045em; line-height: 1.22; }
.cinema-heading > p { max-width: 26em; margin: 0 0 5px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.scene-tabs {
  display: flex; gap: 27px; overflow-x: auto; overscroll-behavior-inline: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  padding: 4px 2px 0; margin-bottom: 24px;
}
.scene-tab {
  position: relative; flex: 0 0 auto; display: inline-flex; gap: 9px; align-items: center;
  min-height: 50px; padding: 8px 0 16px; color: var(--muted); background: none; border: 0;
  font: inherit; font-size: 14px; cursor: pointer; transition: color 200ms ease;
}
.scene-tab > span { font-size: 10px; font-variant-numeric: tabular-nums; opacity: .65; }
.scene-tab::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease);
}
.scene-tab:hover, .scene-tab[aria-selected='true'] { color: var(--ink); }
.scene-tab[aria-selected='true']::after { transform: scaleX(1); }
.scene-tab:focus-visible { outline-offset: -2px; }
.film-frame {
  position: relative; overflow: hidden; border-radius: 22px; background: var(--ink);
  transform: scale(var(--cinema-scale, 1)); transform-origin: center 30%;
  box-shadow: 0 22px 70px rgb(42 35 21 / 10%);
}
.film-frame:focus-visible { outline: 2px solid var(--brown); outline-offset: 5px; }
/* Native controls keep seeking, audio and fullscreen available on every size. */
.film-screen { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink); }
.film-video { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--paper); }
.film-video:focus-visible { outline: 2px solid var(--sun); outline-offset: -3px; }
.film-video:fullscreen { width: 100vw; height: 100vh; background: #000; object-fit: contain; }
.film-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: rgb(23 23 19 / 94%); color: var(--paper); text-align: center; }
.film-error p { margin: 0; font-size: clamp(13px, 1.4vw, 17px); }
.film-error button { min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px; color: var(--ink); background: var(--sun); font: inherit; font-size: 14px; cursor: pointer; }
.film-caption { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 32px 27px; color: var(--paper); }
.film-eyebrow { color: #a5a59b; font-size: 10px; letter-spacing: .05em; }
.film-caption h3 { margin: 8px 0 0; font-size: clamp(18px, 1.6vw, 23px); font-weight: 450; line-height: 1.45; }
.film-actions { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.film-duration { color: #c3c1b6; font-size: 12px; font-variant-numeric: tabular-nums; }
.film-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid #62625a; border-radius: 999px; color: var(--paper); background: transparent; font: inherit; font-size: 13px; cursor: pointer; transition: background 200ms ease, color 200ms ease, border-color 200ms ease; }
.film-toggle-icon { display: inline-grid; place-items: center; min-width: 14px; color: var(--sun); font-size: 11px; }
.film-toggle:hover:not(:disabled) { color: var(--ink); background: var(--sun); border-color: var(--sun); }
.film-toggle:hover:not(:disabled) .film-toggle-icon { color: var(--ink); }
.film-toggle:disabled { opacity: .5; cursor: default; }
.film-toggle:focus-visible, .film-error button:focus-visible { outline-color: var(--sun); }
.film-alternative { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.film-alternative a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; }
.film-alternative a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.cinema-meta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 24px; }
.cinema-meta > p { max-width: 700px; margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.scene-navigation { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.scene-count { margin-right: 13px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.scene-count b { color: var(--ink); font-weight: 500; }
.scene-navigation button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink); font-size: 21px; cursor: pointer; transition: background 180ms ease, transform 220ms var(--ease); }
.scene-navigation button:hover:not(:disabled) { background: var(--sun); transform: translateY(-2px); }
.scene-navigation button:disabled { opacity: .3; cursor: default; }
.cinema-noscript { color: var(--muted); font-size: 13px; }
.story-intro h2 { max-width: 1050px; }
[data-story-word] { opacity: var(--word-opacity, 1); }
.github-section { padding: clamp(72px, 8.5vw, 122px) 0; }
.github-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(44px, 7vw, 104px); }
.github-copy .section-label { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.github-copy h2 { margin: 0; font-size: clamp(36px, 4.3vw, 60px); font-weight: 500; line-height: 1.22; letter-spacing: -.04em; }
.github-lede { max-width: 30em; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.85; text-wrap: pretty; }
.github-topics { display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; }
.github-topics li { display: flex; align-items: start; gap: 18px; }
.github-topics li > span { display: grid; place-items: center; flex: 0 0 32px; height: 32px; margin-top: 3px; border: 1px solid var(--line); border-radius: 50%; color: var(--brown); font-size: 10px; }
.github-topics h3 { margin: 0; font-size: 16px; font-weight: 600; }
.github-topics p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.repo-card { min-width: 0; overflow: hidden; border: 1px solid #cfcec4; border-radius: 22px; background: var(--surface); box-shadow: 0 18px 50px rgb(42 35 21 / 6%); }
.repo-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 30px; border-bottom: 1px solid var(--line); }
.repo-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.github-mark { flex: 0 0 auto; }
.repo-identity span { display: block; color: var(--muted); font-size: 11px; }
.repo-identity strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.repo-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #eadba9; border-radius: 999px; color: var(--brown); background: var(--sun-soft); font-size: 11px; }
.repo-status > span { width: 5px; height: 5px; border-radius: 50%; background: var(--brown); }
.repo-readme-label { display: flex; align-items: center; justify-content: space-between; padding: 13px 30px; border-bottom: 1px solid var(--line); background: #faf9f5; color: var(--muted); font-size: 11px; }
.repo-readme-label > span:first-child { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.repo-readme { padding: 30px; }
.repo-readme h3 { margin: 0; padding-bottom: 17px; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 600; letter-spacing: -.035em; }
.repo-readme > p { margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.repo-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0 0; padding: 0; list-style: none; }
.repo-tags li { padding: 4px 9px; border-radius: 6px; color: var(--brown); background: var(--sun-soft); font-size: 11px; }
.repo-details { display: grid; gap: 17px; margin: 28px 0 0; }
.repo-details > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 18px; font-size: 12px; line-height: 1.7; }
.repo-details dt { color: var(--muted); }
.repo-details dd { margin: 0; overflow-wrap: anywhere; }
.repo-footer { padding: 22px 30px; border-top: 1px solid var(--line); background: #faf9f5; }
.repo-coming { display: block; width: 100%; min-height: 46px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; background: #eeede6; color: #65645d; font: inherit; font-size: 13px; font-weight: 550; cursor: default; }
.repo-footer p { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
html[data-motion='active'] [data-reveal] { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity 850ms var(--ease), transform 850ms var(--ease); }
html[data-motion='active'] [data-reveal].is-visible { opacity: 1; transform: none; }
html[data-motion='active'] .chapter:nth-child(2) { transition-delay: 100ms; }
html[data-motion='active'] .chapter:nth-child(3) { transition-delay: 200ms; }
html[data-motion='paused'] { scroll-behavior: auto; }
html[data-motion='paused'] *, html[data-motion='paused'] *::before, html[data-motion='paused'] *::after { animation: none !important; transition: none !important; }
html[data-motion='paused'] .hero-art, html[data-motion='paused'] .hero-dog, html[data-motion='paused'] .art-orbit, html[data-motion='paused'] .film-frame { transform: none; }
html[data-motion='paused'] [data-story-word] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > h1 { animation: none; }
  .hero-line > span { animation: title-enter 1100ms var(--ease) both; }
  .hero-line:nth-child(2) > span { animation-delay: 110ms; }
  .hero-art { animation: art-enter 1400ms var(--ease) 100ms both; }
  .hero-file { animation: badge-enter 1000ms var(--ease) 400ms both; }
  .file-sheet { animation-delay: 550ms; }
  @keyframes title-enter { from { opacity: 0; transform: translate3d(0, 105%, 0) rotate(2deg); } to { opacity: 1; transform: none; } }
  @keyframes art-enter { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
  @keyframes badge-enter { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .brand small { display: none; }
  .header-nav { gap: 19px; }
  .hero-file { font-size: 10px; padding: 8px; }
  .file-doc { left: -5%; top: 13%; }
  .file-sheet { right: -5%; top: 30%; }
}
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 125px; padding-bottom: 65px; }
  .hero h1 { font-size: clamp(48px, 7.7vw, 67px); }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-links { justify-content: center; }
  .hero-art { width: min(100%, 570px); min-height: min(78vw, 520px); margin-inline: auto; }
  .art-orbit { width: min(70vw, 470px); }
  .hero-dog { width: min(68vw, 440px); }
  .hero-file.file-doc { top: 8%; left: 3%; }
  .hero-file.file-sheet { right: 0; top: 32%; }
  .cinema-heading { margin-bottom: 30px; }
  .cinema-heading > p { font-size: 14px; }
  .github-grid { grid-template-columns: 1fr; gap: 40px; }
  .github-lede { max-width: 38em; }
  .github-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .github-topics li { flex-direction: column; gap: 12px; }
  .github-topics li > span { flex-basis: 32px; width: 32px; }
  .repo-card { width: 100%; max-width: 640px; justify-self: center; }
  html[data-motion='active'] .chapter { transition-delay: 0ms; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 85px; }
  .hero { padding-top: 106px; padding-bottom: 42px; }
  .hero h1 { font-size: clamp(35px, 9.5vw, 51px); line-height: 1.2; }
  .hero-links { gap: 8px 22px; margin-top: 18px; }
  .text-link { font-size: 13px; }
  .hero-grid { gap: 20px; }
  .hero-art { min-height: 87vw; }
  .art-orbit { width: 75vw; }
  .hero-dog { width: 72vw; }
  .hero-file { gap: 6px; padding: 7px 9px 7px 7px; font-size: 9px; border-radius: 9px; }
  .hero-file > span { width: 21px; height: 25px; font-size: 11px; }
  .hero-file.file-doc { top: 8%; left: 0; }
  .hero-file.file-sheet { right: 0; top: 32%; }
  .art-label { bottom: 8%; padding: 9px 12px; font-size: 11px; }
  .motion-toggle { bottom: -26px; font-size: 10px; }
  .cinema { padding-top: 75px; padding-bottom: 78px; }
  .cinema-heading { display: block; }
  .cinema-heading h2 { font-size: clamp(31px, 8.4vw, 43px); }
  .cinema-heading > p { margin-top: 22px; }
  .scene-tabs { gap: 22px; margin-bottom: 17px; }
  .scene-tab { font-size: 13px; gap: 6px; }
  .scene-tab > span { font-size: 9px; }
  .film-frame { border-radius: 14px; transform: none; }
  .film-caption { align-items: start; flex-direction: column; gap: 17px; padding: 19px 20px 21px; }
  .film-eyebrow { font-size: 9px; }
  .film-caption h3 { font-size: 17px; }
  .film-actions { width: 100%; justify-content: space-between; gap: 12px; }
  .film-alternative { font-size: 11px; gap: 12px; }
  .cinema-meta { align-items: start; flex-direction: column; gap: 17px; margin-top: 20px; }
  .cinema-meta > p { font-size: 12px; min-height: 41px; }
  .scene-navigation { align-self: end; }
  .scene-navigation button { width: 44px; height: 44px; }
  .github-topics { grid-template-columns: 1fr; gap: 22px; }
  .github-topics li { flex-direction: row; gap: 16px; }
  .github-lede { font-size: 15px; }
  .repo-header { padding: 22px 20px; }
  .repo-readme-label { padding-inline: 20px; }
  .repo-readme { padding: 25px 20px; }
  .repo-readme h3 { font-size: 26px; }
  .repo-details > div { gap: 10px; }
  .repo-footer { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .hero-dog, .art-orbit, .film-frame { transform: none; }
  [data-reveal], [data-story-word] { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
