/* ==========================================================================
   Studio Legends — shared design system
   Cinematic "golden age" theme: deep charcoal + brass/gold, art-deco accents.
   ========================================================================== */

:root {
  --bg: #0a0b10;
  --bg-2: #0e1018;
  --panel: #14171f;
  --panel-2: #181c26;
  --line: #262b38;
  --line-soft: #1d212c;

  --gold: #e6b34a;
  --gold-bright: #f4cf78;
  --gold-deep: #b8862f;
  --ink: #ecedf2;
  --muted: #9aa1b0;
  --muted-2: #6f7686;

  --ok: #5fcf8e;
  --warn: #e6a14a;
  --bad: #e2664f;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);

  --display: "Oswald", "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(230, 179, 74, 0.08), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(80, 120, 220, 0.06), transparent 55%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: 0.04em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); text-transform: uppercase; letter-spacing: 0.05em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

section { padding: 84px 0; position: relative; }
.section-tight { padding: 56px 0; }

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 14px;
  display: inline-block;
}

.lede { font-size: 1.18rem; color: #cdd2dd; max-width: 70ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.gold { color: var(--gold); }

/* --- nav ------------------------------------------------------------------ */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 11, 16, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .mark {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep));
  color: #1a1206; font-weight: 700; font-family: var(--display); font-size: 1.1rem;
  box-shadow: 0 6px 18px -6px rgba(230, 179, 74, 0.6);
}
.brand .mark::after { content: "SL"; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; letter-spacing: 0.02em; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 760px) {
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 14px 24px; border-top: 1px solid var(--line-soft); }
  .nav-links .btn { margin: 14px 24px; text-align: center; }
  .nav-toggle { display: block; }
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.92rem; padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(150deg, var(--gold-bright), var(--gold-deep)); color: #1a1206; box-shadow: 0 10px 26px -12px rgba(230, 179, 74, 0.7); }
.btn-primary:hover { color: #1a1206; box-shadow: 0 14px 30px -10px rgba(230, 179, 74, 0.85); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- generic cards / grid ------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { color: var(--ink); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(230, 179, 74, 0.12); color: var(--gold-bright);
  font-size: 1.3rem; margin-bottom: 16px; border: 1px solid rgba(230, 179, 74, 0.25);
}
.card.feature p { color: var(--muted); margin: 0; }

.section-head { margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; max-width: 760px; }

/* --- placeholder media (fill-in-later) ------------------------------------ */

.ph {
  position: relative; display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #161a24, #0f121a);
  border: 1px dashed #343b4c; border-radius: var(--radius);
  color: var(--muted-2); overflow: hidden; min-height: 180px;
}
.ph::before, .ph::after {
  /* film-strip perforations top & bottom */
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(circle, #0a0b10 3px, transparent 3.5px);
  background-size: 22px 14px; background-position: center; opacity: 0.5;
}
.ph::before { top: 0; } .ph::after { bottom: 0; }
.ph .ph-label {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.82rem; padding: 8px 14px; border: 1px solid #343b4c; border-radius: 50px;
  background: rgba(10, 11, 16, 0.6); z-index: 1;
}
.ph .ph-sub { display: block; font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 0.72rem; margin-top: 6px; color: var(--muted-2); }
.ph-16x9 { aspect-ratio: 16 / 9; min-height: 0; }
.ph-4x3 { aspect-ratio: 4 / 3; min-height: 0; }
.ph-1x1 { aspect-ratio: 1 / 1; min-height: 0; }
.ph-wide { aspect-ratio: 21 / 9; min-height: 0; }

/* Drop a real image into any placeholder: just add <img> inside the .ph box.
   The image fills the box and the dashed-strip placeholder chrome hides itself. */
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; z-index: 2; }
.ph:has(img) { border-style: solid; border-color: var(--line); }
.ph:has(img)::before, .ph:has(img)::after { display: none; }
.ph:has(img) .ph-label { display: none; }

/* --- tables --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data thead th { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--gold); background: var(--bg-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
table.data td strong { color: var(--ink); }

/* --- pills / tags --------------------------------------------------------- */

.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 50px; background: rgba(230, 179, 74, 0.1); color: var(--gold-bright); border: 1px solid rgba(230, 179, 74, 0.22); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- divider -------------------------------------------------------------- */

.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; margin: 0; }
.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* --- footer --------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); padding: 52px 0 36px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer .brand { margin-bottom: 14px; }
.footer p { color: var(--muted); max-width: 38ch; font-size: 0.92rem; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--muted-2); text-transform: uppercase; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: 0.84rem; }

/* --- subscribe form ------------------------------------------------------- */

.subscribe { margin-top: 20px; max-width: 380px; }
.sub-label { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.78rem; color: var(--muted); margin-bottom: 9px; }
.sub-row { display: flex; gap: 8px; }
.subscribe input[type="email"] { flex: 1; min-width: 0; background: #0c0e15; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); padding: 10px 13px; font-family: var(--body); font-size: 0.95rem; }
.subscribe input[type="email"]:focus { outline: none; border-color: var(--gold); }
.subscribe .btn { white-space: nowrap; }
.subscribe-msg { min-height: 1.1em; margin: 9px 0 0; font-size: 0.85rem; color: var(--muted); }
.subscribe-msg.ok { color: var(--ok); }
.subscribe-msg.err { color: var(--bad); }
.center .subscribe { margin-left: auto; margin-right: auto; }

/* --- hero (shared) -------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding: 104px 0 92px; border-bottom: 1px solid var(--line-soft); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 420px at 70% 20%, rgba(230, 179, 74, 0.12), transparent 60%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }

/* spotlight sweep behind hero text */
.spotlight { position: absolute; top: -30%; left: 50%; width: 120%; height: 160%; transform: translateX(-50%); background: conic-gradient(from 200deg at 50% 0%, transparent 0deg, rgba(230, 179, 74, 0.05) 40deg, transparent 80deg); pointer-events: none; }

/* --- utility -------------------------------------------------------------- */

.stack > * + * { margin-top: 1rem; }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 16px; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   Vlog list + article
   ========================================================================== */

.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 760px) { .post-list { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform 0.15s ease, border-color 0.2s ease; }
.post-card:hover { transform: translateY(-4px); border-color: rgba(230, 179, 74, 0.4); }
.post-card a.cover { display: block; }
.post-card .cover .ph, .post-card .cover img { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card .meta { font-size: 0.78rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--display); margin-bottom: 10px; }
.post-card h3 { font-size: 1.45rem; margin-bottom: 10px; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--gold-bright); }
.post-card p { color: var(--muted); flex: 1; }
.post-card .tag-row { margin-top: 16px; }
.draft-flag { color: var(--warn); border-color: rgba(230, 161, 74, 0.4); background: rgba(230, 161, 74, 0.1); }

.article { max-width: 760px; margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 36px; }
.article-head .meta { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-size: 0.82rem; margin-bottom: 16px; }
.article-cover { margin: 0 0 40px; }
.article-cover .ph { aspect-ratio: 21 / 9; }
.article-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }

.prose { font-size: 1.08rem; color: #d4d8e2; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); margin-top: 1.8em; }
.prose h2 { font-size: 1.7rem; padding-bottom: 0.3em; border-bottom: 1px solid var(--line-soft); }
.prose h3 { font-size: 1.3rem; }
.prose p { margin: 0 0 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose code { background: #0c0e15; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 0.88em; color: var(--gold-bright); }
.prose pre { background: #0c0e15; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; margin: 0 0 1.4rem; }
.prose pre code { background: none; border: 0; padding: 0; color: #cdd2dd; }
.prose blockquote { margin: 0 0 1.4rem; padding: 4px 20px; border-left: 3px solid var(--gold); color: #c7ccd8; font-style: italic; background: rgba(230, 179, 74, 0.04); }
.prose .md-img { display: block; width: 100%; margin: 1.8rem 0; border-radius: var(--radius); }
.prose img.md-img { border: 1px solid var(--line); }
.prose .md-ph { margin: 1.8rem 0; }
.prose p > .md-ph { margin: 0; } /* when wrapped in a paragraph */
.prose hr.rule { margin: 2.2rem 0; }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.84rem; }
.back-link:hover { color: var(--gold-bright); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ==========================================================================
   Team
   ========================================================================== */

.team-list { display: grid; gap: 24px; }
.member { display: grid; grid-template-columns: 210px 1fr; gap: 30px; align-items: start; }
.member .photo { width: 100%; }
.member .photo .ph, .member .photo img { aspect-ratio: 4 / 5; width: 100%; min-height: 0; border-radius: var(--radius); object-fit: cover; display: block; }
.member .photo img { border: 1px solid var(--line); }
.member h3 { margin-bottom: 2px; font-size: 1.6rem; }
.member .role { color: var(--gold); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.86rem; }
.member .tagline { color: var(--muted); font-size: 0.96rem; margin: 8px 0 0; }
.member .bio { margin-top: 16px; color: #cdd2dd; }
.member .bio p { margin: 0 0 0.8rem; }
.member .bio p:last-child { margin-bottom: 0; }
.member .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.member .draft-flag { margin-bottom: 8px; }
@media (max-width: 640px) {
  .member { grid-template-columns: 1fr; gap: 18px; }
  .member .photo { max-width: 240px; }
}

/* ==========================================================================
   Admin
   ========================================================================== */

.tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.92rem; padding: 10px 16px; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

.admin-wrap { max-width: 920px; margin: 0 auto; }
.login-box { max-width: 420px; margin: 40px auto; }
label.field { display: block; margin-bottom: 18px; }
label.field span { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--muted); margin-bottom: 7px; }
input[type="text"], input[type="password"], input[type="date"], textarea, select {
  width: 100%; background: #0c0e15; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); padding: 11px 13px; font-family: var(--body); font-size: 0.98rem; transition: border-color 0.15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; min-height: 320px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92rem; line-height: 1.6; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.editor-toolbar .btn { font-size: 0.74rem; padding: 6px 11px; }
.editor-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 820px) { .editor-grid { grid-template-columns: 1fr; } }
.admin-post-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.admin-post-row:last-child { border-bottom: 0; }
.admin-post-row .t { font-weight: 600; }
.admin-post-row .s { font-size: 0.8rem; color: var(--muted-2); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 13px 20px; box-shadow: var(--shadow); z-index: 100; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
.uploading { font-size: 0.82rem; color: var(--gold); }
.help { font-size: 0.82rem; color: var(--muted-2); margin-top: 6px; line-height: 1.5; }
.preview-pane { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; max-height: 480px; overflow-y: auto; }
