/* FFILM.org patch — base layout (referenced by index & inner pages) */
:root {
  --bg: #0c0e12;
  --surface: #141820;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --accent: #c9a227;
  --accent-dim: #8a7020;
  --border: #2a3140;
  --focus: #6eb4ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 1.02rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #111;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 18, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
}

.nav-link.active {
  color: var(--accent);
}

.lang-toggle {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.lang-btn.active {
  border-color: var(--accent-dim);
  color: var(--accent);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .lang-toggle {
    margin-left: 0;
  }
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero-content h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
}

.hero-content p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.content-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.content-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.35rem;
}

.content-item h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.content-item p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #161308;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  filter: brightness(1.08);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.cta-section {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface), rgba(20, 24, 32, 0.6));
  text-align: center;
}

.cta-section h2 {
  margin-top: 0;
}

footer {
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Article / development page */
.article-prose h2 {
  margin-top: 2.25rem;
  font-size: 1.25rem;
}

.article-prose h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.article-prose p,
.article-prose li {
  color: var(--muted);
}

.article-prose ul {
  padding-left: 1.25rem;
}

.note-box {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: rgba(201, 162, 39, 0.08);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.queue-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.queue-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  margin-bottom: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.queue-list .q-order {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.queue-list .q-name {
  font-weight: 600;
}

/* Developer workspace */
.dev-workspace {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 960px) {
  .dev-workspace {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.context-frame-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 420px;
}

.context-frame {
  width: 100%;
  height: 72vh;
  min-height: 380px;
  border: 0;
  display: block;
  background: var(--bg);
}

.assistant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.assistant-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.assistant-card .lede {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.form-field textarea,
.form-field input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.queue-viz .lane {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.35rem 0 0.15rem;
}

.queue-viz .stages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.stage-pill {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.status-msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 1.25em;
}
