/* files.<domain> — black, photographic, one red. */
:root {
  --bg: #000;
  --ink: #ece9e2;
  --muted: #9a968d;
  --dim: #6a675f;
  --red: #D14836;
  --red-2: #e65a47;
  --line: rgba(255,255,255,.14);
  --panel: rgba(12,12,12,.55);
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #000; } }
:root[data-theme="dark"] { --bg: #000; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.dim { color: var(--dim); }

/* ---------- hero backdrop ---------- */
.hero { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.hero-fallback { position: absolute; inset: -4%; background: #000 center / cover no-repeat; opacity: 0;
  transition: opacity 1.2s ease; transform: scale(1.02); }
.hero-fallback.on { opacity: 1; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
#heroCanvas.on { opacity: 1; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 30%, rgba(0,0,0,.25) 60%, rgba(0,0,0,.92) 100%),
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 60%); }
.page-transfer .hero-shade, .page-state .hero-shade, .page-gate .hero-shade {
  background:
    linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 35%, rgba(0,0,0,.5) 70%, #000 100%),
    linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 65%); }
.grain { position: absolute; inset: -50%; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-6%,4%)} 40%{transform:translate(4%,-7%)} 60%{transform:translate(-3%,6%)} 80%{transform:translate(7%,-2%)} 100%{transform:translate(-5%,-5%)} }

/* ---------- chrome ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter); mix-blend-mode: difference; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 14px rgba(209,72,54,.9); }
.brand .sep { margin: 0 6px; color: var(--muted); }
.top-right { display: flex; gap: 2px; align-items: baseline; }
.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom)); color: var(--dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  border-top: 1px solid var(--line); background: #000; }

main { position: relative; z-index: 2; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- hero screen ---------- */
.screen { min-height: 100dvh; display: flex; align-items: flex-end; padding: 120px 0 clamp(64px, 12vh, 140px); position: relative; }
.eyebrow { margin: 0 0 18px; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 16px; }
.eyebrow::before { content: ""; width: 44px; height: 2px; background: var(--red); transform-origin: left; }
.display { font-family: var(--display); font-weight: 400; line-height: .9; letter-spacing: .01em; margin: 0;
  font-size: clamp(64px, 13vw, 190px); text-transform: uppercase; }
.display-s { font-size: clamp(56px, 9vw, 130px); }
.split { visibility: hidden; }
.split.ready, .no-motion .split { visibility: visible; }
.split .line { display: block; overflow: hidden; }
.split .line > span { display: block; will-change: transform; transform: translateY(110%); }
.title { margin: 22px 0 0; font-weight: 500; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -.01em; color: var(--ink); max-width: 22ch; }
.lede { max-width: 56ch; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); margin: 20px 0 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--ink); }
.meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; align-items: center; }
.hint { margin: 14px 0 0; color: var(--dim); font-size: 13px; }
.hint.err { color: var(--red-2); }
.scrollcue { position: absolute; left: 50%; bottom: 26px; width: 1px; height: 54px; background: var(--line); overflow: hidden; }
.scrollcue span { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--red); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0%{top:-100%} 60%{top:100%} 100%{top:100%} }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 24px; background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .5s var(--ease), background .35s, border-color .35s, color .35s; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--red-2); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--ease); z-index: -1; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover::before { transform: translateY(0); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-big { padding: 18px 30px; font-size: 15px; }
.btn-big em { font-style: normal; color: rgba(255,255,255,.75); }
.btn-sm { padding: 10px 16px; font-size: 12px; }
.btn.busy { pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: #fff; animation: busy 1.1s linear infinite; }
@keyframes busy { from{left:-40%} to{left:100%} }

/* ---------- code / password form ---------- */
.codeform { display: flex; align-items: stretch; margin-top: 30px; max-width: 560px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); backdrop-filter: blur(10px); padding: 6px 6px 6px 22px; }
.codeprefix { align-self: center; color: var(--dim); white-space: nowrap; }
.codeinput { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font-size: 18px; letter-spacing: .14em; padding: 10px 12px; }
.codeinput::placeholder { color: var(--dim); }
.codeinput[aria-invalid="true"] { color: var(--red-2); }
.codeform:focus-within { border-color: var(--red); }
@media (max-width: 560px) { .codeprefix { display: none; } .codeform { padding-left: 14px; } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(80px, 12vh, 150px) 0; background: #000; }
.section::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--line); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 64px; align-items: start; margin-bottom: 48px; }
.sec-title { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 84px); line-height: .9; margin: 0; text-transform: uppercase; }
.message { margin: 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 20px); white-space: pre-line; border-left: 2px solid var(--red); padding-left: 20px; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }
.section-dl { text-align: left; }
.section-dl .cta { margin-top: 30px; }

/* ---------- image grid ---------- */
.grid { columns: 3; column-gap: 18px; }
@media (max-width: 1000px) { .grid { columns: 2; } }
@media (max-width: 560px) { .grid { columns: 1; } }
.card { break-inside: avoid; margin: 0 0 18px; position: relative; border-radius: 6px; overflow: hidden; background: #0c0c0c; }
.card-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.card-open img { width: 100%; height: auto; transition: transform 1.2s var(--ease), filter .8s; filter: saturate(.92); }
.card:hover .card-open img { transform: scale(1.04); filter: saturate(1.05); }
.card::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--red); border-radius: 6px; opacity: 0; transition: opacity .35s; pointer-events: none; }
.card:hover::after { opacity: 1; }
.card figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; font-size: 13px; }
.card .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dl { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: background .3s, border-color .3s, transform .4s var(--ease); }
.dl:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.dl.busy { border-color: var(--red); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(209,72,54,.25); } }

/* ---------- file list ---------- */
.list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); transition: background .3s; }
.row:hover { background: linear-gradient(90deg, rgba(209,72,54,.08), transparent 60%); }
.row .ext { text-transform: uppercase; color: var(--red); font-weight: 500; }
.row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .row { grid-template-columns: 44px minmax(0, 1fr) auto; } .row .dim { display: none; } }

/* ---------- dot nav ---------- */
.dots { position: fixed; right: max(18px, calc(var(--gutter) / 2)); top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 18px; }
.dots a { position: relative; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: transparent; transition: background .3s, border-color .3s, transform .4s var(--ease); }
.dots a::after { content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px); font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; }
.dots a:hover::after, .dots a.on::after { opacity: 1; transform: translateY(-50%); }
.dots a.on { background: var(--red); border-color: var(--red); transform: scale(1.3); }
@media (max-width: 760px) { .dots { display: none; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.96); display: grid; place-items: center; padding: 64px var(--gutter); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100dvh - 180px); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { display: flex; gap: 18px; align-items: center; font-size: 14px; flex-wrap: wrap; justify-content: center; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: none; border: 0; color: var(--ink); font-size: 34px; line-height: 1; cursor: pointer; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; transition: background .3s; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.1); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: #111; border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 999px; }
.toast[hidden] { display: none; }

/* ---------- reveals ---------- */
.reveal, .reveal-line span { opacity: 0; }
.reveal { transform: translateY(26px); }
.reveal-line span { display: inline-block; transform: translateY(100%); }
.reveal-line { overflow: hidden; }
.no-motion .reveal, .no-motion .reveal-line span, .no-motion .split .line > span { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .grain, .scrollcue span { animation: none; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-line span { opacity: 1; transform: none; }
}
