/* Geist, SIL Open Font License 1.1. Self-hosted. No CDN. */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #07080c;
  --ink: #f4efe6;
  --muted: #b9b2a6;
  --line: rgba(244, 239, 230, 0.16);
  --glass: rgba(10, 12, 18, 0.46);
  --accent: #e4c396;
  --danger: #ffc1b5;
  --ok: #c7ead4;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --sans: "Geist", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 430;
  font-size: 1.05rem;
  letter-spacing: -0.014em;
  line-height: 1.5;
  font-synthesis: none;
}
body.app {
  background:
    radial-gradient(1100px 640px at 8% -10%, rgba(228, 195, 150, 0.16), transparent 55%),
    radial-gradient(860px 560px at 110% 0%, rgba(120, 158, 180, 0.16), transparent 50%),
    radial-gradient(700px 420px at 50% 120%, rgba(90, 48, 58, 0.2), transparent 55%),
    var(--bg);
}
body.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

.still, .shader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.still {
  z-index: 0;
  background:
    radial-gradient(900px 520px at 72% 78%, rgba(228, 195, 150, 0.55), transparent 60%),
    radial-gradient(760px 520px at 16% 12%, rgba(130, 170, 196, 0.38), transparent 58%),
    radial-gradient(540px 420px at 86% 8%, rgba(120, 58, 70, 0.32), transparent 62%),
    linear-gradient(#07080c 0%, #10131b 62%, #1a140f 100%);
}
.still::before {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 62%;
  background-image:
    linear-gradient(rgba(228, 195, 150, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228, 195, 150, 0.45) 1px, transparent 1px);
  background-size: 92px 92px;
  transform: perspective(480px) rotateX(64deg);
  transform-origin: center top;
  mask-image: linear-gradient(transparent, #000 22%, #000 70%, transparent);
  opacity: 0.45;
}
.still::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 228, 196, 0.85), transparent);
  box-shadow: 0 0 40px 8px rgba(228, 195, 150, 0.35);
}
.shader { z-index: 1; display: block; }
html.still-field .shader { display: none; }

.stage { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.36;
  animation: drift 28s ease-in-out infinite alternate;
}
.orb.a { width: 36vw; height: 36vw; left: -18vw; top: -22vw; background: #e4c396; }
.orb.b { width: 32vw; height: 32vw; right: -18vw; top: -10vh; background: #7f9eae; animation-delay: -9s; }
.orb.c { width: 34vw; height: 34vw; left: 46vw; bottom: -24vw; background: #6e4454; animation-delay: -16s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5vw, 3vh, 0) scale(1.1); }
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--ink);
  color: #1b1712;
  padding: 0.5rem 0.8rem;
}
.skip:focus { top: 1rem; }

.top, main, footer { position: relative; z-index: 1; }
.top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.95rem 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(7, 8, 12, 0.5);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.35);
}
.top.bare {
  position: relative;
  background: linear-gradient(rgba(7, 8, 12, 0.55), transparent);
  border-bottom: 0;
  backdrop-filter: none;
}
.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 520;
  letter-spacing: -0.03em;
}
.brand em {
  font-style: normal;
  font-weight: 430;
  color: var(--accent);
}
.top nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.top nav a, .text {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.top nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.who { margin-left: auto; display: flex; align-items: center; gap: 0.45rem; }
.who form { margin: 0; }

main { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 4rem; }
main.wide { width: min(1080px, calc(100% - 2rem)); }
footer {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

h1, h2 {
  font-weight: 520;
  letter-spacing: -0.048em;
  line-height: 0.98;
}
h1 { font-size: clamp(2.5rem, 5vw, 3.7rem); margin: 0 0 0.7rem; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 0.45rem; }
p { margin: 0 0 0.8rem; }
.eyebrow, .kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 560;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow a { color: inherit; text-decoration: none; }
.lede { font-size: 1.16rem; max-width: 38rem; color: var(--ink); font-weight: 420; }
.hint { color: var(--muted); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px) saturate(1.5);
  border-radius: 22px;
}
.panel { padding: 1.35rem 1.4rem; margin: 1rem 0 1.4rem; }
.narrow { max-width: 40rem; }
.panel.narrow, .login-card, .hero-copy, .facets li { animation: rise 0.9s cubic-bezier(.16, 1, .3, 1) both; }
.facets li:nth-child(2) { animation-delay: 0.08s; }
.facets li:nth-child(3) { animation-delay: 0.16s; }

body.gate {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
body.gate::after {
  content: "";
  position: fixed;
  z-index: 2;
  left: max(1.1rem, calc((100% - 1180px) / 2 - 1.6rem));
  top: 18vh;
  bottom: 16vh;
  width: 1px;
  background: linear-gradient(transparent, rgba(228, 195, 150, 0.75), transparent);
  pointer-events: none;
}
.hero {
  width: min(1180px, calc(100% - 3rem));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.35rem;
  padding: 2vh 0 2.6rem;
  position: relative;
}
.mark {
  position: absolute;
  top: 0;
  right: -0.04em;
  margin: 0;
  font-size: clamp(7rem, 24vw, 18rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.78;
  color: transparent;
  -webkit-text-stroke: 1px rgba(228, 195, 150, 0.38);
  pointer-events: none;
  user-select: none;
}
.hero-copy {
  position: relative;
  max-width: 760px;
  padding: clamp(1.3rem, 2.5vw, 2rem) clamp(1.2rem, 2.4vw, 2.1rem) 1.45rem;
  background: rgba(7, 8, 12, 0.42);
}
.hero h1 {
  max-width: 8.2em;
  margin: 0 0 0.85rem;
  font-size: clamp(3.6rem, 7.4vw, 6.6rem);
  font-weight: 500;
  letter-spacing: -0.062em;
  line-height: 0.88;
}
.hero .lede { color: var(--muted); max-width: 34rem; }
.facets {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
}
.facets li { padding: 1rem 1.1rem 0.85rem; }
.facets p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 5.5rem 1rem 4.5rem;
}
.login-card { width: min(440px, 100%); padding: 1.55rem 1.45rem 1.35rem; position: relative; }
.login-card h1 { font-size: clamp(2.7rem, 8vw, 3.8rem); margin-bottom: 0.45rem; }
.login-card .lede { font-size: 1.02rem; margin-bottom: 1rem; }
body.auth .legal {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.9rem 1rem 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin: 0.2rem 0 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
}
.switch .thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
}
.auth:has(#mode-code:checked) .switch .thumb, .cine:has(#mode-code:checked) .switch .thumb { transform: translateX(calc(100% + 0px)); }
.switch label {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.switch label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cine:has(#mode-code:checked) form.password,
.cine:not(:has(#mode-code:checked)) form.code,
.auth:has(#mode-code:checked) form.password,
.auth:not(:has(#mode-code:checked)) form.code { display: none; }

.stack { display: grid; gap: 0.8rem; }
.stack .solid { width: 100%; }
.field { display: grid; gap: 0.35rem; }
.field span { color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  font: inherit;
}
textarea { min-height: 7rem; resize: vertical; }
::placeholder { color: #8d877c; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button, .solid { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 560; }
.solid, a.solid {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  color: #24190f;
  background: linear-gradient(180deg, #f6ddb8, #d7ae7a);
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 30px rgba(215, 174, 122, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
}
.solid:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
}

.banner { padding: 0.9rem 1rem; border-radius: 16px; margin: 0 0 1rem; }
.banner.bad { color: var(--danger); background: rgba(120, 32, 24, 0.35); border: 1px solid rgba(255, 193, 181, 0.25); }
.banner.good { color: var(--ok); background: rgba(28, 70, 48, 0.4); border: 1px solid rgba(199, 234, 212, 0.2); }
.secret {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 520;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.cards, .stats, .people, .files { display: grid; gap: 0.9rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 340px)); justify-content: start; }
.card, .person, .file {
  color: inherit;
  text-decoration: none;
  padding: 1.15rem 1.15rem 1.05rem;
  animation: rise 0.7s cubic-bezier(.16, 1, .3, 1) both;
}
.card:nth-child(2), .person:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3), .person:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.18s; }
.card:nth-child(5) { animation-delay: 0.24s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card strong, .stats strong {
  display: block;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}
.card p { color: var(--muted); }
.card:hover, .file:hover { transform: translateY(-4px); transition: transform 0.25s ease; }
.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.pill.active { color: var(--ok); }
.pill.archived { color: var(--danger); }

.meta { display: grid; gap: 0.8rem; margin: 1rem 0; }
.meta div { padding-top: 0.7rem; border-top: 1px solid var(--line); }
.meta dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.files {
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: start;
}
.file { display: grid; gap: 0.7rem; }
.file img, .file-mark {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}
.file-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 520;
  letter-spacing: 0.08em;
}
.file strong, .file small { display: block; }
.file strong { overflow-wrap: anywhere; }
.file small, .person .hint { color: var(--muted); }
.person header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.inline { display: flex; gap: 0.7rem; align-items: end; flex-wrap: wrap; }
.inline .field { flex: 1 1 14rem; }
.manage { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 560;
}
.sheet td { padding: 0.75rem 0.4rem; border-top: 1px solid var(--line); vertical-align: top; }
.sheet form { margin: 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .who { width: 100%; margin-left: 0; justify-content: space-between; }
  main { padding-top: 1.6rem; }
  .hero { width: min(1180px, calc(100% - 1.4rem)); justify-content: center; }
  .facets { grid-template-columns: 1fr; }
  .mark { display: none; }
  body.gate::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .shader { display: none; }
}

/* Cinematic title card (landing) */
html:has(body.cine) { margin: 0; padding: 0; height: 100%; background: #050403; }
body.cine { margin: 0; padding: 0; min-height: 100vh; height: 100%; overflow: hidden; background: #050403; color: #f4ead6; font-family: 'Geist', system-ui, sans-serif; }
body.cine::before, body.cine::after { content: none; display: none; }
.cine-field { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; margin: 0; padding: 0; border: 0; z-index: 0; }
html.still-field .cine-field { display: none; }
html.still-field body.cine { background: radial-gradient(ellipse at 50% 45%, #3a2a10 0%, #120c05 55%, #050403 100%); }
.cine-card { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.5rem; margin: 0; padding: 0 6vw; max-width: none; text-align: center; animation: cine-in 2.4s cubic-bezier(.2,.7,.2,1) backwards; }
.cine-title { margin: 0; font-family: 'Geist', system-ui, sans-serif; font-weight: 700; font-size: clamp(2.4rem, 6.4vw, 7rem); line-height: 1.02; letter-spacing: 0.04em; text-transform: uppercase; color: #fbf3e2; text-shadow: 0 0 60px rgba(0,0,0,.55); max-width: 16ch; }
.cine-login { display: inline-block; padding: .95rem 2.4rem; border: 1px solid rgba(244,234,214,.55); border-radius: 999px; color: #f4ead6; text-decoration: none; font-size: .8rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; background: rgba(5,4,3,.25); backdrop-filter: blur(6px); transition: background .3s, color .3s; }
.cine-login:hover, .cine-login:focus-visible { background: #f4ead6; color: #0b0805; }
.cine-foot { position: fixed; left: 0; right: 0; bottom: 1.6rem; z-index: 1; text-align: center; font-size: .7rem; letter-spacing: .4em; text-transform: uppercase; color: rgba(244,234,214,.45); margin: 0; padding: 0; border: 0; background: none; }
@keyframes cine-in { from { opacity: 0; transform: scale(1.03); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .cine-card { animation: none; } }
main.cine-card { width: 100%; max-width: none; margin: 0; padding: 0 6vw; box-sizing: border-box; }
/* Lighter, see-through glass */
.glass { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); backdrop-filter: blur(26px) saturate(1.4); box-shadow: 0 18px 50px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,0.14); }
.cine-login { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(10px) saturate(1.3); }
/* Login overlay on landing */
.cine-card { transition: transform 1.2s cubic-bezier(.16,1,.3,1), opacity 1.2s cubic-bezier(.16,1,.3,1), filter 1.2s cubic-bezier(.16,1,.3,1); }
body.login-open .cine-card { transform: scale(.94); opacity: 0; filter: blur(4px); pointer-events: none; }
.cine-layer { position: fixed; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 1.5rem; box-sizing: border-box; opacity: 0; transform: scale(.92); pointer-events: none; transition: transform 1.2s cubic-bezier(.16,1,.3,1), opacity 1.2s cubic-bezier(.16,1,.3,1); }
/* Stay just under opacity 1 with a live transform. Hitting opacity 1 / transform none
   makes Chromium resample the card backdrop-filter and the glass turns solid. */
body.login-open .cine-layer { opacity: 0.999; transform: translate3d(0, 0, 0.01px); pointer-events: auto; }
.cine-layer .login-card { width: min(420px, 100%); }
.cine-back { position: fixed; top: 1.6rem; left: 1.6rem; background: rgba(255,255,255,.1); color: #f4ead6; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .5rem 1rem; font: inherit; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(10px); }
.cine-back:hover, .cine-back:focus-visible { background: rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) {
  .cine-card, .cine-layer { transition: opacity .2s linear; transform: none !important; filter: none !important; }
  body.login-open .cine-layer { opacity: 0.999 !important; transform: translate3d(0, 0, 0.01px) !important; }
}
.cine-layer .field span { color: rgba(250,244,232,.82); } .cine-layer .login-card { text-shadow: 0 1px 12px rgba(0,0,0,.35); }

/* Sign-in panel modes (sign in / access code / create) */
.mode-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.login-card h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 1.1rem; }
.login-card .t-create, .login-card .to-signin, .login-card form.create { display: none; }
.login-card:has(#mode-create:checked) .t-create,
.login-card:has(#mode-create:checked) .to-signin { display: inline; }
.login-card:has(#mode-create:checked) form.create { display: grid; }
.login-card:has(#mode-create:checked) .t-in,
.login-card:has(#mode-create:checked) .to-create,
.login-card:has(#mode-create:checked) .switch,
.login-card:has(#mode-create:checked) form.password,
.login-card:has(#mode-create:checked) form.code { display: none; }
.cine:has(#mode-code:checked) .switch .thumb { transform: translateX(100%); }
.mode-links { margin: 1rem 0 0; text-align: center; font-size: .85rem; }
.mode-links label { cursor: pointer; color: rgba(250,244,232,.78); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(250,244,232,.3); }
.mode-links label:hover { color: #fff; }
.login-card:has(.mode-radio:focus-visible) .mode-links label { outline: 2px solid rgba(255,255,255,.6); outline-offset: 3px; }
.linked-codes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.codes-panel { margin-top: 2rem; }

/* Neutral minimal buttons */
.plain, a.plain, .cine-login {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.26); border-radius: 999px;
  padding: .85rem 1.6rem; font: inherit; font-size: .82rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; box-shadow: none; filter: none; backdrop-filter: none;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.stack .plain { width: 100%; }
.plain:hover, .cine-login:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); color: #fff; }
.plain:focus-visible, .cine-login:focus-visible { outline: 2px solid rgba(255,255,255,.85); outline-offset: 3px; background: rgba(255,255,255,.08); color: #fff; }
.cine-login { padding: .95rem 2.6rem; letter-spacing: .32em; }

/* Frosted-glass headline glyphs with shimmer band */
.cine-title {
  color: transparent;
  background-image:
    linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%, transparent 100%),
    linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(255,250,240,.62) 55%, rgba(255,255,255,.30) 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: 120% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1px rgba(255,255,255,.28);
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(0,0,0,.35)) drop-shadow(0 0 30px rgba(255,240,215,.12));
  animation: cine-shimmer 7s ease-in-out 2.4s infinite;
}
@keyframes cine-shimmer { 0% { background-position: 120% 0, 0 0; } 55%, 100% { background-position: -120% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .cine-title { animation: none; } }
/* More see-through glass letters */
.cine-title {
  background-image:
    linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%, transparent 100%),
    linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(255,250,240,.32) 55%, rgba(255,255,255,.14) 100%);
  -webkit-text-stroke: 1px rgba(255,255,255,.5);
  filter: drop-shadow(0 0 14px rgba(0,0,0,.45)) drop-shadow(0 0 32px rgba(255,240,215,.18));
}
/* Sign in: still at rest; one gentle pulse on press only */
.cine-login { animation: none; }
.cine-login.pressed { animation: cine-press .22s cubic-bezier(.3,.7,.4,1) 1; }
@keyframes cine-press { 0% { transform: scale(1); } 45% { transform: scale(.95); } 100% { transform: scale(1.02); } }
.cine-layer .login-card { animation: none; }
@media (prefers-reduced-motion: reduce) { .cine-login.pressed { animation: none; } }
/* Cursor-following shine replaces the automatic sweep */
@property --shine { syntax: '<number>'; inherits: false; initial-value: 0; }
.cine-title {
  --mx: -999px; --my: -999px; --shine: 0;
  animation: none;
  background-image:
    radial-gradient(140px circle at var(--mx) var(--my), rgba(255,255,255,calc(.75 * var(--shine))) 0%, rgba(255,255,255,calc(.3 * var(--shine))) 45%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(255,250,240,.32) 55%, rgba(255,255,255,.14) 100%);
  background-size: 100% 100%, 100% 100%;
  background-position: 0 0, 0 0;
  transition: --shine .45s ease;
}
.cine-title.shine-on { --shine: 1; }
@media (prefers-reduced-motion: reduce), (hover: none) { .cine-title, .cine-title.shine-on { --shine: 0; transition: none; } }
/* Sign in button: cursor-following shine, nothing at rest */
.cine-login {
  --mx: -999px; --my: -999px; --shine: 0;
  background-image: radial-gradient(90px circle at var(--mx) var(--my), rgba(255,255,255,calc(.22 * var(--shine))) 0%, rgba(255,255,255,0) 100%);
  background-color: transparent;
  transition: --shine .4s ease, border-color .25s ease, color .25s ease;
}
.cine-login.shine-on { --shine: 1; }
.cine-login:hover { background-color: rgba(255,255,255,.04); }
@media (prefers-reduced-motion: reduce), (hover: none) { .cine-login, .cine-login.shine-on { --shine: 0; } }
.cine-login:hover, .cine-login:focus-visible {
  background: radial-gradient(90px circle at var(--mx) var(--my), rgba(255,255,255,calc(.22 * var(--shine))) 0%, rgba(255,255,255,0) 100%), rgba(255,255,255,.04);
}
/* No text selection or dragging on the landing scene; form fields stay editable */
body.cine, body.cine .cine-card, body.cine .cine-title, body.cine .cine-login, body.cine .cine-field, body.cine .cine-layer {
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none;
}
body.cine input, body.cine textarea { -webkit-user-select: text; user-select: text; -webkit-user-drag: auto; }
/* Michroma for the headline only (self-hosted) */
@font-face {
  font-family: 'Michroma';
  src: url('/assets/fonts/michroma-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
.cine-title {
  font-family: 'Michroma', 'Geist', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(1.45rem, 4.6vw, 4.9rem);
  letter-spacing: 0.06em;
  line-height: 1.18;
  max-width: 18ch;
}
@media (max-width: 600px) { .cine-title { font-size: clamp(1.25rem, 7vw, 2rem); letter-spacing: 0.03em; max-width: 12ch; } }

/* Code-only panel */
.login-card.code-only { width: min(380px, 100%); padding: 1.4rem; }
.code-only .stack { gap: .8rem; }
.code-only input[name="code"] { text-align: center; letter-spacing: .22em; text-transform: uppercase; font-size: 1rem; }
.code-only input[name="code"]::placeholder { letter-spacing: .3em; color: rgba(250,244,232,.5); }

/* Delayed emergence of the Login button: hidden 10s, then grows in over 3s */
body.cine .cine-login {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: scale(.3); filter: blur(14px);
  animation: cine-emerge 3s cubic-bezier(.16,1,.3,1) 10s 1 forwards;
}
@keyframes cine-emerge {
  0%   { opacity: 0; visibility: visible; pointer-events: auto; transform: scale(.3); filter: blur(14px); }
  100% { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); filter: blur(0); }
}
body.cine .cine-login.ready {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none; filter: none; animation: none;
}
body.cine .cine-login.ready.pressed { animation: cine-press .22s cubic-bezier(.3,.7,.4,1) 1; }
@media (prefers-reduced-motion: reduce) {
  body.cine .cine-login { transform: none; filter: none; animation: cine-emerge-still .6s linear 10s 1 forwards; }
  body.cine .cine-login.ready.pressed { animation: none; }
}
@keyframes cine-emerge-still {
  0%   { opacity: 0; visibility: visible; pointer-events: auto; }
  100% { opacity: 1; visibility: visible; pointer-events: auto; }
}
.login-card.code-only form.code { display: grid !important; }

/* Project site view: full-screen walkthrough, minimal glass chrome */
body.site-view { margin: 0; padding: 0; min-height: 100vh; background: #050403; color: #f4ead6; font-family: 'Geist', system-ui, sans-serif; overflow: hidden; }
body.site-view::before, body.site-view::after { content: none; display: none; }
.site-frame { position: fixed; inset: 0; width: 100vw; height: 100vh; border: 0; display: block; background: #0b0805; }
.site-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 6px; align-items: center; }
.site-bar form { margin: 0; }
.site-chip { appearance: none; display: inline-flex; align-items: center; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(12,10,8,.38); color: rgba(255,255,255,.88); font: inherit; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); }
.site-chip:hover { background: rgba(255,255,255,.12); }
.site-chip.on { border-color: rgba(255,255,255,.5); }
.site-chip:focus-visible { outline: 2px solid rgba(255,255,255,.85); outline-offset: 2px; }
body.plans-view { overflow: auto; background: radial-gradient(ellipse at 50% 0%, #2a2116 0%, #0b0906 60%, #050403 100%) fixed; }
.plans-main { max-width: 1180px; margin: 0 auto; padding: 5rem 1.5rem 3rem; }
.plans-title { font-family: 'Michroma', 'Geist', sans-serif; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(1.4rem, 3.4vw, 2.6rem); margin: 0 0 1.5rem; }
.plans-main h2 { font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(244,234,214,.6); margin: 2rem 0 .8rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.plan-tile { display: grid; gap: .6rem; padding: .7rem; color: inherit; text-decoration: none; border-radius: 16px; }
.plan-tile img { width: 100%; aspect-ratio: 1.41; object-fit: contain; background: #fff; border-radius: 8px; }
.plan-tile span { font-size: .85rem; line-height: 1.3; }
.plan-tile:hover { background: rgba(255,255,255,.16); }

/* Admin pages: same scene as the landing, glass panel always open */
body.cine.admin-scene .cine-layer { opacity: 1; transform: none; pointer-events: auto; }
body.cine.admin-scene .login-card { width: min(400px, 100%); font-family: 'Michroma', 'Geist', system-ui, sans-serif; }
body.cine.admin-scene .field span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
body.cine.admin-scene select, body.cine.admin-scene input { font-family: 'Geist', system-ui, sans-serif; }
body.cine.admin-scene .secret, body.cine.admin-scene #new-code { font-family: ui-monospace, monospace; letter-spacing: .08em; -webkit-user-select: all; user-select: all; word-break: break-all; }
body.cine.admin-scene .text { background: none; border: 0; color: rgba(250,244,232,.6); cursor: pointer; font: inherit; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .6rem; }
.cine-shine {
  --mx: -999px; --my: -999px; --shine: 0;
  background-image: radial-gradient(90px circle at var(--mx) var(--my), rgba(255,255,255,calc(.22 * var(--shine))) 0%, rgba(255,255,255,0) 100%);
  background-color: transparent;
  transition: --shine .4s ease, border-color .25s ease, color .25s ease;
}
.cine-shine.shine-on { --shine: 1; }
@media (prefers-reduced-motion: reduce), (hover: none) { .cine-shine, .cine-shine.shine-on { --shine: 0; } }

/* Admin dashboard */
.bare-note { max-width: 28rem; margin: 20vh auto; text-align: center; }
body.cine.dash-scene { overflow-y: auto; }
body.cine.dash-scene .cine-layer { position: relative; inset: auto; min-height: 100vh; align-items: flex-start; padding: 3rem 1.25rem 4rem; overflow: visible; }
body.cine.dash-scene .cine-field { position: fixed; }
.dash { width: min(1080px, 100%); display: grid; gap: 1rem; color: rgba(250,244,232,.92); }
.dash-top { display: flex; align-items: center; justify-content: space-between; }
.dash-title { font-family: 'Michroma', 'Geist', system-ui, sans-serif; font-weight: 400; letter-spacing: .28em; text-transform: uppercase; font-size: 1.15rem; margin: 0; }
.dash-panel { padding: 1.1rem 1.25rem; border-radius: 18px; }
.dash-label { font-family: 'Michroma', system-ui, sans-serif; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(250,244,232,.7); margin: 0 0 .5rem; }
.dash .secret { font-family: ui-monospace, monospace; font-size: 1.2rem; letter-spacing: .08em; user-select: all; -webkit-user-select: all; word-break: break-all; margin: 0 0 .7rem; }
.share-text { width: 100%; box-sizing: border-box; background: rgba(0,0,0,.25); color: inherit; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: .6rem .7rem; font: .85rem/1.4 ui-monospace, monospace; resize: none; }
.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0; }
.dash-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.dash-inline .field { flex: 1 1 10rem; }
.dash-inline input, .dash-inline select { min-height: 2.4rem; }
.dash .plain { width: auto; padding: .55rem 1.1rem; font-family: 'Michroma', system-ui, sans-serif; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.dash .plain.small { padding: .35rem .8rem; font-size: .62rem; }
.dash .plain[disabled] { opacity: .4; cursor: not-allowed; }
.tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.tabs { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); justify-self: start; }
.tabs label { cursor: pointer; padding: .5rem 1rem; border-radius: 999px; font-family: 'Michroma', system-ui, sans-serif; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,244,232,.7); transition: background .2s, color .2s; }
.tabs label:hover { color: #fff; }
.tabs .count { display: inline-block; min-width: 1.3em; margin-left: .3rem; padding: 0 .3rem; border-radius: 999px; background: rgba(255,255,255,.12); text-align: center; }
#tab-projects:checked ~ .tabs label[for="tab-projects"],
#tab-clients:checked ~ .tabs label[for="tab-clients"],
#tab-live:checked ~ .tabs label[for="tab-live"] { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
#tab-projects:focus-visible ~ .tabs label[for="tab-projects"], #tab-clients:focus-visible ~ .tabs label[for="tab-clients"], #tab-live:focus-visible ~ .tabs label[for="tab-live"] { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.tab-pane { display: none; gap: 1rem; }
#tab-projects:checked ~ .pane-projects, #tab-clients:checked ~ .pane-clients, #tab-live:checked ~ .pane-live { display: grid; }
.dash .sheet { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dash .sheet th { text-align: left; font-family: 'Michroma', system-ui, sans-serif; font-weight: 400; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,244,232,.6); padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.dash .sheet td { padding: .5rem; border-bottom: 1px solid rgba(255,255,255,.07); vertical-align: middle; }
.client-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .6rem; }
.client-head h3 { margin: 0; font-family: 'Michroma', system-ui, sans-serif; font-weight: 400; font-size: .9rem; letter-spacing: .1em; }
.client-side { display: flex; gap: .6rem; align-items: center; }
.live-dot { font-size: .72rem; color: rgba(250,244,232,.6); white-space: nowrap; }
.live-dot::before { content: ''; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .4rem; background: rgba(255,255,255,.25); vertical-align: middle; }
.live-dot.on { color: #f3d27a; }
.live-dot.on::before { background: #f3c14b; box-shadow: 0 0 10px #f3c14b; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot.on::before { animation: none; } }
.state { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.state.unused { color: #f3d27a; } .state.used { color: rgba(250,244,232,.55); } .state.revoked, .state.expired { color: #e59a8a; }
.live-list, .recent { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
body.cine.dash-scene .dash input, body.cine.dash-scene .dash textarea, body.cine.dash-scene .dash .secret { -webkit-user-select: text; user-select: text; }
.dash-top .dash-actions { margin: 0; align-items: center; }
.dash-top .text { margin-top: 0; }
.sky { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.15rem; align-items: start; min-height: 52vh; }
.win-toggle { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.float-window {
  position: relative;
  --i: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  padding: 1rem 1.05rem 0.95rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  animation: floaty 8.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.15s);
}
.float-title { display: grid; gap: 0.2rem; cursor: pointer; margin: 0; }
.float-title strong { font-family: 'Michroma', 'Geist', system-ui, sans-serif; font-weight: 400; font-size: 0.95rem; letter-spacing: 0.06em; }
.float-body { display: none; gap: 0.7rem; margin-top: 0.85rem; }
.win-toggle:checked + .float-window { animation: none; background: rgba(8, 8, 10, 0.42); }
.win-toggle:checked + .float-window .float-body { display: grid; }
.win-toggle:focus-visible + .float-window { outline: 2px solid rgba(243, 210, 122, 0.85); outline-offset: 3px; }
a.win-open { display: block; color: inherit; text-decoration: none; }
a.win-open .float-title { padding-right: 5.2rem; }
a.win-open:focus-visible { outline: 2px solid rgba(243, 210, 122, 0.85); outline-offset: 3px; }
.float-window.is-current { outline: 1px solid rgba(243, 210, 122, 0.55); }
.win-menu { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; }
.win-menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 10, 0.4);
  color: rgba(250, 244, 232, 0.86);
}
.win-menu summary::-webkit-details-marker { display: none; }
.win-menu[open] summary { color: #f3d27a; }
.win-menu[open] .float-body {
  display: grid;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(280px, 72vw);
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(8, 8, 10, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.float-window:has(.win-menu[open]) { animation: none; z-index: 4; }
.add-window .float-body, .add-window form { display: grid; gap: 0.65rem; }
form.app-window { margin: 0; }
form.app-window button.float-title {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  width: 100%;
  cursor: pointer;
}
form.app-window:hover { background: rgba(255, 255, 255, 0.12); }
form.app-window button.float-title:focus-visible { outline: 2px solid rgba(243, 210, 122, 0.85); outline-offset: 3px; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
