/* Pastport shared styles. Every value follows .claude/skills/landing-page-design:
   Tailwind type scale, B2 spacing tokens, B3 radii, B4 dark surfaces, B7 base curve.
   Page specific styles live in landing.css and app.css. */
:root {
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1F1F1F;
  --surface-3: #272727;
  --line: #313131;
  --text: #FFFFFF;
  --muted: #A3A3A3;
  --accent: #E0BE76;
  --accent-hover: #EACB8F;
  --on-accent: #131209;
  --danger: #F2A097;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Geist", sans-serif; font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p, li, blockquote { text-wrap: pretty; }
em, i, cite, address { font-style: normal; }
a { color: inherit; }
svg, video { display: block; max-width: 100%; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.small { font-size: .875rem; line-height: 1.25rem; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 80px; }
@media (min-width: 768px) {
  .wrap { padding-inline: 32px; }
  .section { padding-block: 96px; }
}

.skip { position: absolute; top: -64px; left: 16px; z-index: 100; padding: 8px 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; transition: transform .3s var(--ease); }
.skip:focus { transform: translateY(80px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 1rem; line-height: 1.5rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .3s var(--ease), transform .5s var(--ease), opacity .3s var(--ease); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { font-size: .875rem; line-height: 1.25rem; border-radius: 9999px; }
.btn .ph { font-size: 1.25rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

/* Floating nav */
.nav { position: fixed; top: 16px; left: 50%; z-index: 50; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); padding: 8px; border: 1px solid var(--line); border-radius: 9999px; background: rgba(24, 24, 24, .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transform: translateX(-50%); }
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; font-weight: 600; text-decoration: none; }
.brand svg { width: 24px; height: 24px; color: var(--accent); }
.nav-links { display: none; gap: 4px; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 9999px; color: var(--muted); font-size: .875rem; line-height: 1.25rem; text-decoration: none; transition: color .3s var(--ease), background-color .3s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current] { background: var(--surface-3); color: var(--text); }
.nav-links.always { display: flex; }
.menu-btn { position: relative; width: 36px; height: 36px; border: 0; border-radius: 9999px; background: var(--surface-3); color: var(--text); cursor: pointer; }
.menu-btn span { position: absolute; top: 17px; left: 10px; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .5s var(--ease); }
.menu-btn span:first-child { transform: translateY(-4px); }
.menu-btn span:last-child { transform: translateY(4px); }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 96px 24px 48px; background: rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s var(--ease) .5s; }
.menu.open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu a { padding: 8px 0; font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; text-decoration: none; opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.menu.open a { opacity: 1; transform: none; transition-delay: min(calc(var(--i) * 60ms), 340ms); }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-btn, .menu { display: none; }
}

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 9999px; background: var(--surface); color: var(--muted); font-size: .875rem; line-height: 1.25rem; }
.pill .ph { color: var(--accent); }

/* Cards and section heads */
.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card h3 { font-size: 1.25rem; line-height: 1.75rem; }
.card > p { margin-top: 8px; color: var(--muted); }
.card-accent { border-color: rgba(224, 190, 118, .4); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: 1.875rem; line-height: 2.25rem; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.125rem; line-height: 1.75rem; }
@media (min-width: 768px) {
  .section-head h2 { font-size: 2.25rem; line-height: 2.5rem; }
}
.grid-2, .grid-3 { display: grid; gap: 16px; padding: 0; list-style: none; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.list { display: grid; gap: 12px; margin-top: 16px; padding: 0; list-style: none; }
.list li { display: flex; gap: 12px; color: var(--muted); }
.list .ph { flex: none; margin-top: 2px; font-size: 1.25rem; }
.list .ph-check { color: var(--accent); }
.icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 8px; background: var(--surface-3); color: var(--accent); font-size: 1.25rem; }
.meta { color: var(--muted); font-size: .875rem; line-height: 1.25rem; }

/* Tiles (16:9 stills) and ranked posters (2:3) */
.tile, .rank { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile:focus-visible, .rank:focus-visible { outline: none; }
.tile-media { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--surface-2); transition: transform .5s var(--ease); }
.tile-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tile .tile-media { margin-bottom: 8px; }
.tile:hover .tile-media, .tile:focus-visible .tile-media, .rank:hover .tile-media, .rank:focus-visible .tile-media { transform: translateY(-4px) scale(1.02); }
.tile:focus-visible .tile-media, .rank:focus-visible .tile-media { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile:active .tile-media, .rank:active .tile-media { transform: scale(.98); }
.tile-title { font-weight: 600; text-wrap: balance; }
.locked .tile-media img { filter: saturate(.6) brightness(.8); }
.badge { position: absolute; top: 8px; left: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.badge-lock { background: rgba(0, 0, 0, .6); color: var(--text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tile-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s var(--ease); }
.tile-hover .ph { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 9999px; background: var(--accent); color: var(--on-accent); font-size: 1.5rem; }
.locked .tile-hover .ph { background: rgba(0, 0, 0, .6); color: var(--text); }
.tile:hover .tile-hover, .tile:focus-visible .tile-hover, .rank:hover .tile-hover, .rank:focus-visible .tile-hover { opacity: 1; }

.rank { display: flex; align-items: flex-end; }
.rank-num { flex: none; width: 36%; margin-right: -4%; color: var(--bg); font-size: 8rem; line-height: 1; font-weight: 600; letter-spacing: -0.04em; text-align: right; -webkit-text-stroke: 2px #6B6B6B; }
.rank-poster { position: relative; width: 68%; }
.rank-poster img { aspect-ratio: 2 / 3; }
.rank-cap { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; padding: 8px 12px 12px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.rank-cap .small { color: #D4D4D4; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.row-head h2 { font-size: 1.5rem; line-height: 2rem; }
.row-head p { margin-top: 8px; color: var(--muted); }
.rail-nav { display: none; flex: none; gap: 8px; }
.rail-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9999px; background: var(--surface-2); color: var(--text); font-size: 1.25rem; cursor: pointer; transition: background-color .3s var(--ease), transform .5s var(--ease); }
.rail-btn:hover { background: var(--surface-3); }
.rail-btn:active { transform: scale(.98); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; padding-block: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-rank { grid-auto-columns: 56%; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 768px) {
  .rail-nav { display: flex; }
  .rail { grid-auto-columns: calc((100% - 48px) / 4); }
  .rail-rank { grid-auto-columns: calc((100% - 64px) / 5); }
}

/* Dialogs and forms */
.dialog { width: min(100% - 32px, 480px); max-height: calc(100% - 32px); scrollbar-width: thin; scrollbar-color: #3A3A3A transparent; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); }
.dialog[open] { animation: rise .5s var(--ease); }
.dialog::backdrop { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-body { position: relative; display: grid; gap: 16px; padding: 32px 24px 24px; }
.dialog-body h2 { padding-right: 40px; font-size: 1.5rem; line-height: 2rem; }
.dialog-close { position: absolute; top: 16px; right: 16px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 1.25rem; cursor: pointer; transition: background-color .3s var(--ease); }
.dialog-close:hover { background: var(--line); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade { from { opacity: 0; } }

.err { color: var(--danger); font-size: .875rem; line-height: 1.25rem; }
.err:empty { display: none; }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 40px; }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--muted); font-size: .875rem; line-height: 1.25rem; text-decoration: none; transition: color .3s var(--ease); }
.footer nav a:hover { color: var(--text); }

/* Legal pages and 404 */
.doc { max-width: 680px; padding-block: 96px; }
.doc h1 { margin-top: 8px; font-size: 2.25rem; line-height: 2.5rem; }
.doc h2 { margin-top: 40px; font-size: 1.25rem; line-height: 1.75rem; }
.doc p, .doc li { margin-top: 12px; color: var(--muted); }
.doc ul { padding-left: 24px; }
.notfound { display: grid; min-height: 100vh; place-content: center; justify-items: center; gap: 16px; padding: 24px 16px; text-align: center; }
.notfound h1 { font-size: 2.25rem; line-height: 2.5rem; }
.notfound .btn { margin-top: 16px; }

/* Video player (common.js): flat translucent bar, no gradient */
.vp { position: relative; overflow: hidden; border-radius: 16px; background: #000000; }
.vp video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.vp-big { position: absolute; inset: 0; display: grid; place-items: center; width: 80px; height: 80px; margin: auto; border: 0; border-radius: 9999px; background: var(--accent); color: var(--on-accent); font-size: 2.25rem; cursor: pointer; transition: transform .5s var(--ease), opacity .3s var(--ease), background-color .3s var(--ease); }
.vp-big:hover { background: var(--accent-hover); transform: scale(1.06); }
.vp-big:active { transform: scale(.98); }
.vp.playing .vp-big { opacity: 0; transform: scale(.9); pointer-events: none; }
.vp-bar { position: absolute; inset: auto 0 0; display: grid; gap: 4px; padding: 8px 12px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .3s var(--ease), transform .5s var(--ease); }
.vp.idle { cursor: none; }
.vp.idle .vp-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.vp.failed .vp-big, .vp.failed .vp-bar { display: none; }
.vp-seek { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.vp-row { display: flex; align-items: center; gap: 4px; }
.vp-time { margin-right: auto; padding-left: 8px; color: #D4D4D4; font-size: .875rem; line-height: 1.25rem; font-variant-numeric: tabular-nums; }
.vp-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 1.5rem; cursor: pointer; transition: background-color .3s var(--ease), transform .5s var(--ease); }
.vp-btn:hover { background: rgba(255, 255, 255, .12); }
.vp-btn:active { transform: scale(.98); }
.vp:fullscreen { display: grid; place-items: center; border-radius: 0; }
.vp:fullscreen video { height: 100%; aspect-ratio: auto; }

/* Scroll reveals (B7) */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .menu a, .btn:hover, .tile:hover .tile-media, .tile:focus-visible .tile-media, .rank:hover .tile-media, .rank:focus-visible .tile-media, .vp-big, .vp-bar { transform: none !important; }
  .dialog[open] { animation: fade .5s var(--ease); }
}
