:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #7c5cff;
  --accent: #22d3ee;
  --danger: #ff5c5c;
  --border: rgba(232, 236, 245, 0.12);
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 { font-size: 44px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }

p { margin: 0 0 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 26, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand:hover { text-decoration: none; color: var(--accent); }

.nav { display: flex; gap: 20px; }

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  background-color: var(--bg);
  background-size: cover;
  background-position: center 30%;
}

.hero-home { padding: 96px 0 72px; }
.hero-article { padding: 72px 0 56px; }
.hero-plain {
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(232, 236, 245, 0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, rgba(232, 236, 245, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 18%, rgba(232, 236, 245, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 38%, rgba(232, 236, 245, 0.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 12%, rgba(232, 236, 245, 0.65) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 52%, rgba(232, 236, 245, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 78%, rgba(232, 236, 245, 0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 82%, rgba(232, 236, 245, 0.4) 50%, transparent 51%),
    linear-gradient(180deg, #10152a 0%, var(--bg) 100%);
}

.hero-plain::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: repeating-linear-gradient(-16deg, #262040 0 30px, #3b2f66 30px 40px, #201a36 40px 72px);
  box-shadow: inset -70px -50px 130px rgba(0, 0, 0, 0.75), 0 0 140px rgba(124, 92, 255, 0.18);
  opacity: 0.6;
  pointer-events: none;
}

.hero-plain .hero-inner { position: relative; z-index: 1; }

.hero-inner { max-width: 820px; }

.crumb {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 { font-size: 48px; margin-bottom: 20px; }

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 24px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.hero-date { font-style: normal; }

/* Stamp: the one recurring motif — a red FICTIONAL marker */
.stamp {
  display: inline-block;
  padding: 3px 10px;
  border: 1.5px solid var(--danger);
  border-radius: 4px;
  color: var(--danger);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(-1.5deg);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: #6a4be0;
  color: #ffffff;
}

.btn-primary:hover { background: #5b3fd0; color: #ffffff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer plaque */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 40px 0 32px;
}

.footer-plaque {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.footer-plaque p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-plaque a { color: var(--accent); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }


/* Article layout */
.layout-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-top: 48px;
}

.article-body { max-width: 70ch; }

.article-body h2 { margin-top: 40px; }
.article-body h3 { margin-top: 28px; }

.article-body ul,
.article-body ol { padding-left: 22px; }

.article-body blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--primary);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* Side plaque */
.article-side { display: flex; flex-direction: column; gap: 24px; }

.side-plaque {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-1);
}

.side-plaque p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 16px;
}

.side-related h2 { font-size: 16px; }

.side-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-related a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.side-related a:hover { color: var(--accent); }

/* FAQ */
.faq-section { margin-top: 48px; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.faq-item h3 { margin-bottom: 8px; font-size: 16px; }

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Cast grid */
.cast-section { margin-top: 64px; }

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cast-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-1);
}

.cast-card h3 { margin-bottom: 8px; }

.cast-role {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.cast-link {
  font-size: 14px;
  font-weight: 600;
}

/* Timeline */
.timeline-section { margin-top: 64px; }

.timeline {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-left: 2px solid var(--border);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline li { position: relative; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.t-date {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Engage + comments */
.engage {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.comments-wrap { margin-top: 64px; }

.comments-section { max-width: 70ch; }

.comments-section h2 { font-size: 22px; }

.comment {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.comment-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.c-name { font-weight: 600; font-size: 14px; }
.c-time { color: var(--muted); font-size: 12px; }

.c-text {
  margin: 0 0 8px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.c-reply {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.c-to { color: var(--muted); font-size: 13px; margin-left: 12px; }

.c-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); }

.comments-empty { color: var(--muted); font-size: 14px; }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.comment-form input,
.comment-form textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
}

.comment-form textarea { min-height: 96px; resize: vertical; }

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form button { align-self: flex-start; }

.comment-msg { color: var(--muted); font-size: 13px; margin: 0; }

.home-intro { margin-top: 0; }


/* Responsive */
@media (max-width: 900px) {
  .layout-article {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-side { order: -1; }

  .side-plaque { display: none; }

  .cast-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }

  .hero h1 { font-size: 30px; }

  .hero-home { padding: 64px 0 48px; }
  .hero-article { padding: 48px 0 40px; }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 8px;
  }

  .nav { gap: 14px; flex-wrap: wrap; justify-content: center; }

  .layout-article { padding-top: 32px; }

  .cast-grid { grid-template-columns: 1fr; }

  .hero-cta .btn { width: 100%; text-align: center; }

  .engage { flex-direction: column; }

  .engage .btn { width: 100%; }

  .footer-plaque { flex-direction: column; }

  .footer-links { flex-wrap: wrap; gap: 12px; }

  .comment-form button { align-self: stretch; }
}


/* Ad slots */
.ad-slot {
  margin: 40px 0;
}

.ad-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}


/* Tool pages */
.tool-wrap {
  max-width: 680px;
  margin: 48px auto 56px;
}

.tool-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-2);
}

.tool-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.tool-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.tool-input:focus {
  outline: none;
  border-color: var(--accent);
}

.tool-file { padding: 10px; }

.tool-go { width: 100%; }

.tool-block .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.tool-msg {
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 0;
}

.tool-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 16px;
}

.manifest-card {
  margin-top: 24px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(124, 92, 255, 0.06);
}

.manifest-head {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.manifest-name { font-size: 24px; margin-bottom: 16px; }

.manifest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

.manifest-grid dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.manifest-grid dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.manifest-quote {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin: 0 0 12px;
}

.manifest-foot {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.photo-result img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.photo-result .tool-hint { margin-top: 12px; }

@media (max-width: 640px) {
  .tool-wrap { margin: 32px auto 40px; }
  .manifest-grid { grid-template-columns: 1fr; }
  .tool-block { padding: 18px; }
}


/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-1);
}

.price-card h3 { margin-bottom: 8px; }

.price-line {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.price-line s {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  margin-left: 8px;
}

.price-line em {
  color: var(--accent);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  margin-left: 8px;
}

.price-credits {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.price-card ul {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.price-card .btn { width: 100%; }

@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
}


/* Account strip */
.account-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.account-strip .btn { padding: 8px 14px; min-height: 36px; }

@media (max-width: 640px) {
  .account-strip { flex-direction: column; align-items: flex-start; }
}
