/* ---------- floating toolbar ---------- */
.toolbar { position: fixed; top: 14px; right: var(--gutter); z-index: 60; transition: opacity 0.2s; display: flex; gap: 8px; align-items: center; }
.lang-btn { background: var(--surface); color: var(--ink); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; }

/* ---------- PIN screen ---------- */
.pin { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.pin-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(38px) saturate(1.1); transform: scale(1.1); opacity: 0.55; transition: opacity 1s; }
.pin-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 75%); }
.pin-card { position: relative; text-align: center; max-width: 520px; width: 100%; }
.pin-names { font-size: clamp(44px, 9vw, 84px); margin: 18px 0 12px; }
.pin-names em { color: var(--accent); }
#pinForm { margin-top: 40px; position: relative; }
.pin-label { display: block; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.pin-boxes { display: flex; justify-content: center; gap: 10px; }
.pin-boxes i { width: 46px; height: 58px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent);
  display: grid; place-items: center; font: 400 26px var(--f-display); font-style: normal; transition: border-color 0.2s, transform 0.2s; backdrop-filter: blur(8px); }
.pin-boxes i.filled { border-color: var(--ink); }
.pin-boxes i.caret { border-color: var(--accent); }
.pin-input { position: absolute; inset: auto 0 0 0; top: 34px; height: 58px; width: 100%; opacity: 0; font-size: 16px; border: 0; cursor: text; }
.pin-msg { min-height: 22px; margin-top: 16px; font-size: 14px; color: var(--accent); }
.shake { animation: shake 0.45s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
@media (max-width: 380px) { .pin-boxes i { width: 40px; height: 52px; } }

/* ---------- hero & aperture reveal ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: grid; align-items: end; }
.aperture { position: absolute; inset: 0; clip-path: circle(0% at 50% 50%); }
.aperture img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.revealed .aperture { animation: iris 1.6s var(--ease) forwards; }
.revealed .aperture img { animation: settle 2.4s var(--ease) forwards; }
@keyframes iris { 0% { clip-path: circle(0% at 50% 50%); } 100% { clip-path: circle(75% at 50% 50%); } }
@keyframes settle { to { transform: scale(1); } }
.aperture::before { /* iris blades ring */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 60%, color-mix(in srgb, var(--bg) 40%, transparent) 100%);
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 30%, transparent 65%), linear-gradient(to bottom, color-mix(in srgb, var(--bg) 45%, transparent), transparent 30%); pointer-events: none; }
.hero-copy { position: relative; padding: 0 var(--gutter) clamp(72px, 12vh, 120px); max-width: 1400px; }
.hero-names { font-size: clamp(56px, 13vw, 200px); margin: 14px 0 18px; }
.hero-names em { color: var(--accent); font-weight: 300; }
.hero-names .w { white-space: nowrap; display: inline-block; }
.hero-names .ch { display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(8px); }
.revealed .hero-names .w { white-space: nowrap; display: inline-block; }
.hero-names .ch { animation: rise 1s var(--ease) forwards; animation-delay: calc(0.9s + var(--i) * 0.035s); }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
.hero-eyebrow, .hero-sub { opacity: 0; }
.revealed .hero-eyebrow, .revealed .hero-sub { animation: fade-in 1s var(--ease) 1.5s forwards; }
@keyframes fade-in { to { opacity: 1; } }
.hero-eyebrow { color: var(--ink); text-shadow: 0 1px 12px var(--bg); }
.hero-sub { color: var(--ink); text-shadow: 0 1px 12px var(--bg); max-width: 46ch; font-size: 16px; margin: 0; }
.hero-cue { position: absolute; right: var(--gutter); bottom: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; writing-mode: vertical-rl; opacity: 0; }
.revealed .hero-cue { animation: fade-in 1s 2s forwards; }
.cue-line { width: 1px; height: 56px; background: linear-gradient(var(--ink), transparent); animation: cue 2s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero.no-cover { background: radial-gradient(ellipse at 30% 20%, var(--surface-2), var(--bg) 70%); }

/* ---------- section bar ---------- */
.sectionbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter); padding-right: calc(var(--gutter) + 220px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.sb-title { font-size: 20px; white-space: nowrap; }
.sb-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.sb-chips::-webkit-scrollbar { display: none; }
@media (max-width: 800px) {
  .sectionbar { padding-right: var(--gutter); top: 0; flex-wrap: wrap; gap: 8px; }
  .sb-title { display: none; }
  .toolbar { top: auto; bottom: 16px; right: 16px; }
  .hero-cue { display: none; }
  .hero-names { font-size: clamp(48px, 15vw, 96px); }
}

/* ---------- sections ---------- */
.sections { padding: 0 var(--gutter); max-width: 1680px; margin: 0 auto; }
.sec { padding: clamp(56px, 9vw, 120px) 0 0; scroll-margin-top: 70px; }
.sec-head { display: grid; grid-template-columns: minmax(160px, 220px) 1fr auto; gap: 24px; align-items: end; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.sec-meta { display: grid; gap: 4px; }
.sec-title { font-size: clamp(34px, 5.5vw, 72px); margin: 0; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .sec-head { grid-template-columns: 1fr; gap: 12px; } .sec-actions { justify-content: flex-start; } }
.sec-note { margin: -8px 0 22px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.sec-note.warn { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--ink); }
.sec-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* photo grid */
.grid { position: relative; }
.tile { position: absolute; overflow: hidden; border-radius: 6px; background: var(--surface-2); border: 0; padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.7s var(--ease), transform 1.2s var(--ease); }
.tile img.in { opacity: 1; transform: scale(1); }
.tile:hover img.in { transform: scale(1.035); }
.tile .heart { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.25s; }
.tile:hover .heart, .tile .heart.on { opacity: 1; }
.tile .heart svg { width: 15px; height: 15px; }
.tile .heart.on svg { fill: var(--accent); stroke: var(--accent); }
.tile.hidden { display: none; }

/* film */
.film { display: grid; gap: 28px; }
.film-item { display: grid; gap: 12px; }
.film-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.film-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.film-cap { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

/* file list (raw / files) */
.flist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.flist li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.flist .ficon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font: 500 9px var(--f-mono); letter-spacing: 0.04em; color: var(--muted); }
.flist .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.flist li.done .fname::after { content: " ✓"; color: var(--accent); }
@media (max-width: 560px) { .flist li { grid-template-columns: 34px 1fr auto; } .flist .fsize { display: none; } }

.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 0 0 18px; display: none; }
.progress.on { display: block; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }

.empty { padding: 120px 0; text-align: center; color: var(--muted); }
.empty .display { font-size: clamp(32px, 5vw, 56px); color: var(--ink); margin-bottom: 10px; }
.foot { padding: 120px var(--gutter) 48px; text-align: center; }
.foot a { color: var(--ink); }

body:has(.lb.open) .toolbar { opacity: 0; pointer-events: none; }
