/* ============================================================
   CIPHER AI — black & gold circuit theme
   ============================================================ */
:root {
  --bg: #0b0b0d;
  --bg-2: #121014;
  --panel: rgba(24, 21, 14, 0.55);
  --gold: #d4af37;
  --gold-bright: #f9e29c;
  --gold-deep: #8a6914;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --text: #ece7db;
  --muted: #9a937f;
  --serif: "Cinzel", serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---------- background layers ---------- */
#circuit-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(212, 175, 55, 0.10), transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

/* ---------- shared ---------- */
.section { padding: 110px 24px; position: relative; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.gold-text {
  background: linear-gradient(100deg, var(--gold-bright), var(--gold) 55%, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gold-metal {
  background: linear-gradient(180deg, #fdf3cf 0%, #f3d778 28%, #d4af37 50%, #93701c 68%, #e9cd6f 88%, #fdf3cf 100%);
  background-size: 100% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.35));
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

.link-gold {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
  display: inline-block;
  margin-top: 10px;
}
.link-gold:hover { color: #fff; border-color: var(--gold-bright); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.22s, box-shadow 0.22s, background 0.22s, color 0.22s;
  white-space: nowrap;
}
.btn-sm { padding: 9px 20px; font-size: 0.82rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 45%, #a07d1c);
  color: #16130a;
  box-shadow: 0 0 22px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 34px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-ghost {
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.06);
}
.btn-ghost:hover {
  background: rgba(212, 175, 55, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 24px;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(212, 175, 55, 0.22), 0 8px 30px rgba(0, 0, 0, 0.5);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.brand-emblem { display: grid; place-items: center; filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4)); }
.brand-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--gold); }
.brand-name.small { font-size: 1rem; }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
}
.nav-links a:hover { color: var(--gold-bright); opacity: 1; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 24px 80px;
  position: relative;
}

.hero-kicker {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  color: var(--gold);
  margin-bottom: 6px;
  text-shadow: 0 0 18px var(--gold-glow);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 7.5rem);
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 30px;
  width: min(480px, 70vw);
}
.rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule-line:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.rule-diamond { color: var(--gold); font-size: 0.8rem; text-shadow: 0 0 12px var(--gold-glow); }

.hero-subhead {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  letter-spacing: 0.03em;
  color: var(--gold-bright);
  margin-bottom: 12px;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

.hero-lede {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  max-width: 620px;
  color: var(--text);
  font-weight: 500;
}

.hero-sub {
  margin-top: 16px;
  max-width: 600px;
  color: var(--muted);
  font-size: 0.98rem;
}
.hero-sub .gold-text { font-weight: 600; }

/* stats strip (social proof — shown only when real numbers exist) */
.stats-strip {
  display: flex;
  gap: clamp(28px, 6vw, 64px);
  margin-top: 40px;
  padding: 18px 34px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.05);
  backdrop-filter: blur(4px);
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
}
.stat-num {
  background: linear-gradient(180deg, #fdf3cf, #d4af37 55%, #a07d1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ticker */
.ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.05);
  padding: 10px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker-track span {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  white-space: nowrap;
  padding-right: 8px;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- about ---------- */
.split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
}

.about-emblem { display: grid; place-items: center; }
.emblem-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #1d1a12, #0b0b0d 70%);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.18), inset 0 0 40px rgba(0, 0, 0, 0.6);
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.15), inset 0 0 40px rgba(0,0,0,0.6); }
  50% { box-shadow: 0 0 80px rgba(212, 175, 55, 0.32), inset 0 0 40px rgba(0,0,0,0.6); }
}

.about-copy p { margin-bottom: 14px; color: #c9c2b1; }
.about-copy strong { color: var(--gold-bright); }

/* ---------- pillars ---------- */
.card-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 16px;
  padding: 30px 26px;
  backdrop-filter: blur(6px);
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(212, 175, 55, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.18);
}
.card:hover::before { opacity: 1; }

.card-num {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(212, 175, 55, 0.5);
  letter-spacing: 0.15em;
}
.card-icon { font-size: 1.9rem; margin-bottom: 14px; filter: drop-shadow(0 0 10px var(--gold-glow)); }
.card h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--gold-bright);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.card p { font-size: 0.92rem; color: #b7b09d; }
.card p em { color: var(--gold-bright); font-style: normal; }

.card-link {
  position: relative;
  display: inline-block;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  padding-bottom: 3px;
  transition: color 0.22s, border-color 0.22s;
}
.card-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  text-shadow: 0 0 12px var(--gold-glow);
}

/* ---------- vault (free guides) ---------- */
.book-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.book {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.book-cover {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 24px 26px;
  border-radius: 14px 18px 18px 14px;
  background:
    linear-gradient(90deg, rgba(212, 175, 55, 0.35) 0, rgba(212, 175, 55, 0.08) 10px, transparent 11px),
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(212, 175, 55, 0.12), transparent 60%),
    linear-gradient(160deg, #17140d, #0d0c0e 65%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 1px 0 rgba(249, 226, 156, 0.12), 0 14px 34px rgba(0, 0, 0, 0.5);
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}
.book:hover .book-cover {
  transform: translateY(-6px) rotate(-0.5deg);
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: inset 0 1px 0 rgba(249, 226, 156, 0.12), 0 20px 46px rgba(0, 0, 0, 0.6), 0 0 34px rgba(212, 175, 55, 0.2);
}

.book-series {
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  font-weight: 600;
}

.book-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.book-sub {
  font-size: 0.86rem;
  color: #b7b09d;
  flex: 1;
}

.book-badge {
  align-self: flex-start;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(212, 175, 55, 0.08);
}

.book-btn { text-align: center; }

/* ---------- videos / start here ---------- */
.play-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 50%, #a07d1c);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
  animation: pulse 3.5s ease-in-out infinite;
}
.play-badge svg { margin-left: 4px; }

.episode-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.episode {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.episode { transition: transform 0.28s; }
a.episode:hover { transform: translateY(-6px); }

.episode-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 100% 80% at 50% 30%, rgba(212, 175, 55, 0.10), transparent 60%),
    repeating-linear-gradient(135deg, #131118 0 14px, #0e0d12 14px 28px);
  background-size: cover;
  background-position: center;
  transition: border-color 0.28s, box-shadow 0.28s;
}
.episode:hover .episode-thumb {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.16);
}
.episode-thumb.has-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.55));
}

.episode-num {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: rgba(249, 226, 156, 0.85);
  z-index: 2;
}
.play-badge.small {
  width: 54px; height: 54px;
  z-index: 2;
  animation: none;
}
.episode:hover .play-badge.small { animation: pulse 2.5s ease-in-out infinite; }
.episode-soon {
  position: absolute;
  bottom: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(11, 11, 13, 0.6);
  z-index: 2;
}
/* real episodes (thumb present) hide the "coming soon" pill */
.episode-thumb.has-thumb .episode-soon { display: none; }

.episode-dur {
  position: absolute;
  bottom: 10px; right: 10px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fdf3cf;
  background: rgba(11, 11, 13, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 6px;
  padding: 2px 7px;
}

.episode-title {
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--gold-bright);
  margin: 18px 0 8px;
  letter-spacing: 0.02em;
}
.episode-desc { font-size: 0.9rem; color: #b7b09d; }

.videos-cta { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- mailing list / dispatch ---------- */
.dispatch-box {
  max-width: 660px;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 24px;
  padding: 60px 32px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(212, 175, 55, 0.12), transparent 60%),
    rgba(15, 14, 10, 0.6);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.dispatch-sub { max-width: 480px; margin: 0 auto 8px; }

.dispatch-form { margin-top: 30px; }
.field-row {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}
.field-row input {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-row input::placeholder { color: #6f6a5a; }
.field-row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.field-row input[aria-invalid="true"] {
  border-color: #e0574a;
  box-shadow: 0 0 0 3px rgba(224, 87, 74, 0.18);
}
.field-row .btn { flex-shrink: 0; }

#subscribe-btn[disabled] { opacity: 0.65; cursor: progress; }

.dispatch-status {
  min-height: 1.3em;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.dispatch-status.ok { color: var(--gold-bright); }
.dispatch-status.err { color: #f0897d; }

.dispatch-fineprint {
  margin-top: 22px;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 520px) {
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
}

/* ---------- join ---------- */
.join-box {
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 24px;
  padding: 70px 32px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(212, 175, 55, 0.12), transparent 60%),
    rgba(15, 14, 10, 0.6);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.join-box p { color: var(--muted); font-size: 1.05rem; }
.join-box .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 44px 24px;
  background: rgba(8, 8, 9, 0.8);
}
.footer-inner { text-align: center; display: grid; gap: 8px; }
.footer p { font-size: 0.88rem; color: #8f8873; }
.footer a { color: var(--gold-bright); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .gold-metal, .ticker-track, .emblem-ring, .play-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .emblem-ring { width: 210px; height: 210px; }
  .nav-links { display: none; }
  .section { padding: 80px 20px; }
}
