/* Reel Kitchen — "after-service kitchen": warm dark, food-lit.
   Direction: a kitchen at 11pm — dark umber walls, saffron lamplight,
   cream handwriting on the specials board. Fraunces (soft, foody serif)
   for display, Karla for UI. Deliberately NOT cool-tech dark. */

:root {
  --bg: #16110c;
  --surface: #211a12;
  --surface-2: #2b2218;
  --line: #3a2f21;
  --ink: #f6eedd;
  --muted: #b5a58c;
  --accent: #f2a63c;
  --accent-hot: #ffbe57;
  --accent-ink: #221503;
  --herb: #a8bd7d;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Karla", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .01em;
}
.brand:hover .brand-name { color: var(--accent-hot); }
.topnav { display: flex; align-items: center; gap: 20px; }
.topnav a[data-nav="home"] {
  color: var(--muted); font-weight: 500; font-size: 15px;
  border-bottom: 2px solid transparent; padding: 2px 0;
  transition: color .18s;
}
.topnav a[data-nav="home"]:hover,
.topnav a[data-nav="home"].active { color: var(--ink); border-bottom-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 15px;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-hot); }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: var(--accent-ink); }
.btn-quiet { background: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

.me-chip { display: inline-flex; align-items: center; gap: 8px; }
.me-chip .avatar { transition: box-shadow .18s; }
.me-chip:hover .avatar { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- avatars ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--accent-ink);
  flex: none; user-select: none;
}
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 28px 88px; }
.loading-state, .empty-state {
  color: var(--muted); text-align: center; padding: 90px 20px;
  font-family: var(--font-display); font-style: italic; font-size: 20px;
}

.page-head { margin: 10px 0 26px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: 12px;
  font-weight: 700; color: var(--accent);
}
.page-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08;
  margin-top: 6px;
}
.page-sub { color: var(--muted); margin-top: 10px; max-width: 58ch; }

/* ---------- house special (featured) ---------- */
.special {
  display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr;
  gap: 28px; align-items: center;
  background: linear-gradient(120deg, var(--surface) 0%, #2b1f11 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
  margin-bottom: 44px;
}
.special .poster-wrap { margin: 0; }
.special-info .eyebrow { color: var(--herb); }
.special-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 3vw, 34px); line-height: 1.12; margin: 8px 0 10px;
}
.special-info .byline { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.special-info .btn { margin-top: 18px; }

/* ---------- grid ---------- */
.section-label {
  display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 24px;
}
.section-label small { font-family: var(--font-ui); color: var(--muted); font-size: 14px; font-weight: 400; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px 26px;
}
.card { display: block; }
.poster-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--surface-2);
  border: 1px solid var(--line);
}
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .poster-wrap img { transform: scale(1.04); }
.card:hover .card-title { color: var(--accent-hot); }
.duration-chip {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(10, 7, 3, .78); color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px;
}
.card-meta { display: flex; gap: 12px; margin-top: 12px; }
.card-title {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  line-height: 1.25; transition: color .18s;
}
.card-byline { color: var(--muted); font-size: 14px; margin-top: 3px; }
.card-byline .dot::before { content: "·"; margin: 0 5px; }

/* ---------- watch ---------- */
.watch { max-width: 920px; margin: 0 auto; }
.player-wrap {
  border-radius: calc(var(--radius) + 4px); overflow: hidden;
  border: 1px solid var(--line); background: #000;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.8);
}
.player-wrap video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.watch-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 3.4vw, 36px); line-height: 1.12; margin: 22px 0 14px;
}
.watch-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.watch-author { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.watch-author .who a { font-weight: 700; }
.watch-author .who a:hover { color: var(--accent-hot); }
.watch-author .when { color: var(--muted); font-size: 13px; }
.like-btn .heart { transition: transform .15s; }
.like-btn.liked { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.like-btn:not(.liked):hover .heart { transform: scale(1.2); }
.delete-btn { color: var(--muted); }
.delete-btn:hover { border-color: #c96f4a; color: #e89a78; }
.delete-btn.armed { background: #4a2013; border-color: #c96f4a; color: #ffb597; }
.watch-desc { color: var(--ink); opacity: .92; margin: 18px 0 8px; max-width: 68ch; white-space: pre-wrap; }

/* ---------- comments ---------- */
.comments { margin-top: 34px; }
.comments h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin-bottom: 16px; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.comment-form .row { display: flex; gap: 10px; align-items: flex-start; }
textarea, input[type="text"] {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: 11px 14px;
  font: inherit; resize: vertical;
  transition: border-color .18s;
}
textarea:hover, input[type="text"]:hover { border-color: #52432c; }
textarea::placeholder, input::placeholder { color: #8a7c66; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment .c-head { font-size: 14px; }
.comment .c-head b { font-weight: 700; }
.comment .c-head span { color: var(--muted); margin-left: 8px; font-size: 12.5px; }
.comment .c-text { margin-top: 2px; white-space: pre-wrap; }
.field-note { color: var(--muted); font-size: 13px; }
.field-error { color: #e89a78; font-size: 14px; }

.more-rail { margin-top: 46px; }

/* ---------- upload ---------- */
.upload { max-width: 680px; margin: 0 auto; }
.dropzone {
  border: 2px dashed #55452c; border-radius: var(--radius);
  background: var(--surface);
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--surface-2); }
.dropzone .dz-big { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.dropzone .dz-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.dropzone.has-file { border-style: solid; border-color: var(--herb); }
.caps-line {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13.5px; margin-top: 12px;
}
.caps-line .spark { color: var(--accent); }
.upload form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.upload label { font-weight: 700; font-size: 14px; display: block; margin-bottom: 6px; }
.progress-stage { margin-top: 4px; }
.progress-bar {
  height: 8px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--line); overflow: hidden;
}
.progress-bar i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  width: 0%; transition: width .5s ease; border-radius: 99px;
}
.progress-note { color: var(--muted); font-size: 14px; margin-top: 8px; font-style: italic; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; margin: 8px 0 34px; }
.profile-head .p-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 4vw, 40px); line-height: 1.1; }
.profile-head .p-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.you-tag {
  background: var(--herb); color: #1c2410; font-size: 12px; font-weight: 700;
  border-radius: 6px; padding: 2px 8px; margin-left: 10px; vertical-align: middle;
}
.name-claim { display: flex; gap: 10px; margin-top: 14px; max-width: 420px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--ink); border-radius: 12px; padding: 12px 20px;
  font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 60; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #120e09; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 40px 28px 48px;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 21px; }
.footer-line { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 40ch; }
.footer-cols { display: flex; gap: 56px; }
.footer-cols a { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-cols a:hover { color: var(--accent-hot); }
.footer-fine { display: flex; flex-direction: column; gap: 6px; color: #7c6f5a; font-size: 13px; }

/* ---------- errors ---------- */
.banner-error {
  background: #3d1a10; border: 1px solid #7a3a22; color: #f0c0aa;
  border-radius: 10px; padding: 14px 18px; margin-bottom: 24px;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card, .special { animation: rise .5s ease backwards; }
  .card:nth-child(2) { animation-delay: .05s; }
  .card:nth-child(3) { animation-delay: .1s; }
  .card:nth-child(4) { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .topbar { padding: 10px 16px; }
  .brand-name { font-size: 20px; }
  .topnav { gap: 12px; }
  .topnav a[data-nav="home"] { display: none; }
  .nav-upload { padding: 8px 14px; font-size: 14px; }
  main { padding: 22px 16px 64px; }
  .special { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .card-title { font-size: 20px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 36px; }
  .watch-row { gap: 10px; }
}
