:root {
  --bg: #050403;
  --panel: rgba(10, 9, 8, 0.78);
  --panel-2: rgba(20, 16, 14, 0.82);
  --ash: #d8d0c4;
  --ash-soft: #b9afa3;
  --muted: #83776d;
  --line: rgba(216, 208, 196, 0.22);
  --ember: #9b1d13;
  --ember-bright: #d23825;
  --rust: #bb4a22;
  --green: #1db954;
  --youtube: #ff0033;
  --cyan: #25f4ee;
  --pink: #fe2c55;
  --shadow: rgba(0, 0, 0, 0.72);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #24110d 0%, #080605 38%, #030303 100%);
  color: var(--ash);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .25;
  z-index: 0;
}

.ember-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(210, 56, 37, 0.15), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(155, 29, 19, 0.18), transparent 30%),
    radial-gradient(circle at 50% 95%, rgba(187, 74, 34, 0.11), transparent 34%);
  mix-blend-mode: screen;
}

.topbar, .launch-strip, #app, .admin-panel { position: relative; z-index: 2; }

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, .76);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ash);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-right: auto;
}
.brand-mark img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(210,56,37,.25)); }

.main-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.main-nav a {
  color: var(--ash-soft);
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .9rem;
}
.main-nav a.active, .main-nav a:hover {
  color: white;
  border-color: rgba(210,56,37,.45);
  background: rgba(155,29,19,.14);
}

.admin-trigger, #closeAdmin {
  border: 1px solid var(--line);
  color: var(--ash);
  background: rgba(216,208,196,.06);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}

.admin-trigger {
  display: none;
}

body.admin-entry-unlocked .admin-trigger {
  display: inline-flex;
}

.launch-strip {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(210,56,37,.32);
  background: linear-gradient(90deg, rgba(50,8,5,.88), rgba(155,29,19,.28), rgba(50,8,5,.88));
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .76rem;
  box-shadow: 0 0 28px rgba(155,29,19,.25);
}
.launch-strip strong { color: #fff; font-size: .9rem; }
.strip-kicker { color: var(--ash-soft); }

.page { display: none; min-height: calc(100vh - 94px); }
.page.active { display: block; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/same-circus.png');
  background-size: cover;
  background-position: center;
  filter: saturate(.88) contrast(1.08);
  opacity: .78;
  transition: background-image .35s ease;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,0,0,.08), rgba(0,0,0,.85) 70%),
    linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.38), rgba(0,0,0,.82));
}
#page-home { position: relative; display: none; align-items: center; justify-content: center; overflow: hidden; }
#page-home.active { display: flex; }
.hero-content {
  position: relative;
  width: min(980px, calc(100% - 32px));
  text-align: center;
  padding: clamp(42px, 8vw, 92px) 20px;
}
.hero-logo { width: min(190px, 42vw); filter: drop-shadow(0 0 26px rgba(216,208,196,.18)); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--ember-bright);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
}
h1, h2, h3 { margin: 0; color: #fff; text-transform: uppercase; letter-spacing: .035em; }
h1 { font-size: clamp(3rem, 10vw, 8rem); line-height: .86; text-shadow: 0 0 35px var(--shadow); }
h2 { font-size: clamp(2.2rem, 7vw, 5rem); line-height: .95; }
h3 { font-size: 1.15rem; }
.hero-line {
  max-width: 780px;
  margin: 22px auto 0;
  color: var(--ash);
  font-size: clamp(1.08rem, 2.4vw, 1.55rem);
  line-height: 1.45;
  text-shadow: 0 0 20px #000;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.spotify { background: var(--green); border-color: rgba(29,185,84,.7); box-shadow: 0 0 22px rgba(29,185,84,.26); }
.youtube { background: var(--youtube); border-color: rgba(255,0,51,.7); box-shadow: 0 0 22px rgba(255,0,51,.22); }
.tiktok { background: linear-gradient(135deg, var(--cyan), #111 42%, var(--pink)); border-color: rgba(255,255,255,.25); }
.ashen { background: linear-gradient(135deg, var(--ember), #3d0704); border-color: rgba(210,56,37,.7); box-shadow: 0 0 24px rgba(155,29,19,.34); }
.google { background: #fff; color: #111; }
.ghost { background: rgba(216,208,196,.08); }

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 8vw, 88px) 0;
}
.page-shell.narrow { width: min(860px, calc(100% - 32px)); }
.page-heading { margin-bottom: 26px; }
.page-heading p:not(.eyebrow) { color: var(--ash-soft); font-size: 1.12rem; line-height: 1.55; max-width: 760px; }

.ashen-form, .locked-card, .support-box, .story-list article, .admin-card, .login-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18,14,12,.85), rgba(5,4,3,.82));
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.38), inset 0 0 0 1px rgba(155,29,19,.08);
}
.ashen-form { padding: clamp(18px, 3vw, 30px); }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 8px; color: var(--ash-soft); font-size: .9rem; font-weight: 800; letter-spacing: .03em; }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(210,56,37,.45);
  background: rgba(10,0,0,.85);
  color: #d23825;
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
  font: inherit;
}
select option {
  background: #080605;
  color: #d23825;
}
input:focus, textarea:focus, select:focus { border-color: rgba(210,56,37,.74); box-shadow: 0 0 0 3px rgba(155,29,19,.16); }
textarea { resize: vertical; }
.ashen-form > * + * { margin-top: 16px; }
.submit { width: 100%; }
.fine-print { color: var(--muted); font-size: .82rem; line-height: 1.4; }

.locked-card { padding: 34px; text-align: center; position: relative; overflow: hidden; }
.locked-card::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(7px);
  background: rgba(0,0,0,.24);
}
.locked-card > * { position: relative; }
.locked-card h3 { color: var(--ember-bright); }
.admin-visible { display: none; }
body.admin-authenticated .admin-visible { display: block; }
body.admin-authenticated .locked-card { display: none; }
body.section-stories-public [data-lock-card="stories"],
body.section-licensing-public [data-lock-card="licensing"],
body.section-support-public [data-lock-card="support"] { display: none; }
body.section-stories-public #page-stories .admin-visible,
body.section-licensing-public #page-licensing .admin-visible,
body.section-support-public #page-support .admin-visible { display: block; }
.story-list { display: grid; gap: 12px; }
.story-list article { padding: 18px; display: grid; gap: 6px; }
.story-list span { color: var(--ash-soft); }
.support-box { padding: 24px; }
.compact { max-width: 720px; }

.admin-panel {
  position: fixed;
  right: 18px;
  top: 76px;
  width: min(440px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(216,208,196,.28);
  border-radius: 24px;
  background: rgba(6,5,4,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.72), 0 0 28px rgba(155,29,19,.20);
  transform: translateX(calc(100% + 40px));
  transition: transform .22s ease;
  z-index: 50;
}
.admin-panel.open { transform: translateX(0); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.admin-head h2 { font-size: 1.6rem; }
#closeAdmin { font-size: 1.4rem; width: 38px; height: 38px; padding: 0; }
.login-card, .admin-card { padding: 16px; margin-top: 14px; }
.hidden { display: none !important; }
.control-grid { display: grid; gap: 10px; }
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(216,208,196,.05);
}
.switch-row input { width: auto; transform: scale(1.15); accent-color: var(--ember-bright); }
.admin-card > * + * { margin-top: 10px; }

@media (max-width: 780px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .main-nav a { white-space: nowrap; }
  .launch-strip { flex-wrap: wrap; gap: 6px 12px; padding: 8px 10px; text-align: center; }
  .form-grid.two { grid-template-columns: 1fr; }
  .hero-actions .btn { width: min(100%, 280px); }
}

/* V7 fix: public coming-soon haze for disabled sections. Do not change layout/theme. */
body:not(.admin-authenticated):not(.section-stories-public) #page-stories,
body:not(.admin-authenticated):not(.section-licensing-public) #page-licensing,
body:not(.admin-authenticated):not(.section-support-public) #page-support {
  position: relative;
  overflow: hidden;
}

body:not(.admin-authenticated):not(.section-stories-public) #page-stories .page-shell,
body:not(.admin-authenticated):not(.section-licensing-public) #page-licensing .page-shell,
body:not(.admin-authenticated):not(.section-support-public) #page-support .page-shell {
  filter: blur(6px) grayscale(.35);
  opacity: .42;
  pointer-events: none;
  user-select: none;
}

body:not(.admin-authenticated):not(.section-stories-public) #page-stories::before,
body:not(.admin-authenticated):not(.section-licensing-public) #page-licensing::before,
body:not(.admin-authenticated):not(.section-support-public) #page-support::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background:
    radial-gradient(circle at 50% 34%, rgba(210,56,37,.14), transparent 28%),
    linear-gradient(180deg, rgba(3,3,3,.54), rgba(3,3,3,.88));
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

body:not(.admin-authenticated):not(.section-stories-public) #page-stories::after,
body:not(.admin-authenticated):not(.section-licensing-public) #page-licensing::after,
body:not(.admin-authenticated):not(.section-support-public) #page-support::after {
  content: "COMING SOON";
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 24px;
  border: 1px solid rgba(216,208,196,.28);
  border-radius: 999px;
  background: rgba(6,5,4,.78);
  color: var(--ash);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 0 34px rgba(155,29,19,.35), inset 0 0 0 1px rgba(155,29,19,.22);
  pointer-events: auto;
}
