/* ════════════════════════════════════════════════════════════════
   LOST ON PURPOSE — GLOBAL STYLESHEET
   Dark Victorian London / Sherlock mystery / found-footage journal
   ════════════════════════════════════════════════════════════════ */

/* ─── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=IM+Fell+English:ital@0;1&family=Special+Elite&display=swap');

/* ─── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:            #070503;
  --bg2:           #0F0A06;
  --gold:          #C4953A;
  --gold-bright:   #E8BF70;
  --gold-dim:      #6B5020;
  --gold-glow:     rgba(196, 149, 58, 0.25);
  --parchment:     #D4C09A;
  --parchment-dim: #7A6B50;
  --red-deep:      #2A0A0A;

  --font-display: 'Cinzel Decorative', serif;
  --font-body:    'IM Fell English', serif;
  --font-mono:    'Special Elite', monospace;

  --border-soft:  1px solid rgba(196, 149, 58, 0.1);
  --border-hover: 1px solid rgba(196, 149, 58, 0.3);

  --shadow-heading: 0 0 50px rgba(196, 149, 58, 0.3), 0 0 130px rgba(196, 149, 58, 0.1);

  --maxw: 1180px;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
  position: relative;
  /* faint radial warmth behind everything */
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(196, 149, 58, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(42, 10, 10, 0.35) 0%, transparent 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: crosshair; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ─── Typography ────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold);
  text-shadow: var(--shadow-heading);
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.stamp {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.serif-italic { font-style: italic; }

.runes {
  font-family: var(--font-display);
  color: var(--gold-dim);
  letter-spacing: 0.3em;
}

/* ─── Layout helpers ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

section { position: relative; z-index: 3; }

.section-pad { padding: 110px 0; }

.divider {
  text-align: center;
  color: var(--gold-dim);
  font-family: var(--font-display);
  letter-spacing: 0.5em;
  font-size: 0.9rem;
  margin: 12px 0;
  opacity: 0.6;
}

/* ════════════════════════════════════════════════════════════════
   ATMOSPHERE — grain, fog, vignette
   ════════════════════════════════════════════════════════════════ */

/* 1. Animated film grain (found-footage) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grainShift 0.12s steps(1) infinite;
}

@keyframes grainShift {
  0%   { background-position: 0 0; }
  25%  { background-position: -40px 30px; }
  50%  { background-position: 60px -50px; }
  75%  { background-position: -30px -40px; }
  100% { background-position: 50px 60px; }
}

/* 2. Multi-layer parallax fog */
#fogWrap {
  position: fixed;
  inset: -40%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

.fog-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.fog-layer.f1 {
  background: radial-gradient(ellipse 65% 45% at 50% 50%, rgba(210, 175, 100, 0.09) 0%, transparent 68%);
  animation: f1 22s ease-in-out infinite;
}
.fog-layer.f2 {
  background: radial-gradient(ellipse 50% 70% at 28% 62%, rgba(180, 148, 85, 0.06) 0%, transparent 68%);
  animation: f2 31s ease-in-out infinite;
}
.fog-layer.f3 {
  background: radial-gradient(ellipse 80% 42% at 72% 33%, rgba(228, 195, 130, 0.05) 0%, transparent 68%);
  animation: f3 40s ease-in-out infinite;
}

@keyframes f1 {
  0%,100% { transform: translate(-3%, 2%)  scale(0.95); }
  50%     { transform: translate(3%, -2%)  scale(1.08); }
}
@keyframes f2 {
  0%,100% { transform: translate(2%, -3%)  scale(1.05); }
  50%     { transform: translate(-4%, 3%)  scale(0.96); }
}
@keyframes f3 {
  0%,100% { transform: translate(-2%, -2%) scale(1.02); }
  50%     { transform: translate(4%, 2%)   scale(1.07); }
}

/* 3. Vignette */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(0, 0, 0, 0.6) 68%, rgba(0, 0, 0, 0.93) 100%);
}

/* ════════════════════════════════════════════════════════════════
   BREATHING EFFECT
   ════════════════════════════════════════════════════════════════ */
@keyframes breathe {
  from { transform: scale(1);     opacity: 0.9; }
  to   { transform: scale(1.012); opacity: 1;   }
}

.breathe { animation: breathe 7s ease-in-out infinite alternate; }
.breathe-slow { animation: breathe 8s ease-in-out infinite alternate; }

/* ════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--gold-dim);
  color: var(--parchment);
  background: transparent;
  transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, filter 0.25s ease;
  position: relative;
}

.btn:hover { filter: blur(0.4px); }

.btn-solid {
  background: linear-gradient(180deg, rgba(196, 149, 58, 0.95), rgba(140, 104, 38, 0.95));
  color: #100a04;
  border: 1px solid var(--gold-bright);
  font-weight: 400;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  box-shadow: 0 0 30px var(--gold-glow);
}
.btn-solid:hover {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 48px var(--gold-glow);
  color: #0a0602;
}

.btn-ghost {
  background: transparent;
  color: var(--parchment-dim);
  border: 1px solid rgba(196, 149, 58, 0.18);
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}
.btn-ghost:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: 0 0 26px var(--gold-glow);
}

.btn-full { width: 100%; }
.btn-lg { padding: 20px 38px; font-size: 0.95rem; }

/* ════════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: var(--border-soft);
  padding: 34px;
  position: relative;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease, filter 0.25s ease;
}
.card:hover {
  border: var(--border-hover);
  box-shadow: 0 0 40px rgba(196, 149, 58, 0.08);
  transform: translateY(-4px) scale(1.006);
  filter: blur(0px);
}
.card:hover { animation: breathe 7s ease-in-out infinite alternate; }

.gold-element { animation: breathe 7s ease-in-out infinite alternate; }

/* ════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  transition: backdrop-filter 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  backdrop-filter: blur(12px);
  background: rgba(7, 5, 3, 0.6);
  border-bottom: 1px solid rgba(196, 149, 58, 0.18);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px var(--gold-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  transition: color 0.3s ease;
}
.nav-link:hover { color: var(--gold-bright); }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 1.6rem;
  line-height: 1;
}

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

.hero-eyebrow {
  opacity: 0;
  animation: fadeUp 1.3s ease forwards;
  animation-delay: 0.25s;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.98;
  color: var(--gold);
  text-shadow: var(--shadow-heading);
  opacity: 0;
  animation: emergeFromFog 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.7s;
}
.hero-title .breathe-target { display: inline-block; }

.hero-sub {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  max-width: 640px;
  margin: 32px auto 0;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards;
  animation-delay: 1.8s;
}

.hero-cta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 46px;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards;
  animation-delay: 2.1s;
}

.hero-scroll {
  margin-top: 70px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards, pulseFade 2.6s ease-in-out 3s infinite;
  animation-delay: 2.4s;
}

@keyframes emergeFromFog {
  from { opacity: 0; filter: blur(20px); transform: scale(1.06); }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseFade {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 0.9; }
}

/* ════════════════════════════════════════════════════════════════
   SOCIAL PROOF BAR
   ════════════════════════════════════════════════════════════════ */
.proof-bar {
  border-top: 1px solid rgba(196, 149, 58, 0.15);
  border-bottom: 1px solid rgba(196, 149, 58, 0.15);
  background: rgba(15, 10, 6, 0.5);
  padding: 26px 0;
}
.proof-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 44px;
}
.proof-item {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--parchment-dim);
}
.proof-item b { color: var(--gold); font-weight: 400; }

/* ════════════════════════════════════════════════════════════════
   SECTIONS / CASE FILES
   ════════════════════════════════════════════════════════════════ */
.section-stamp {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 26px;
  max-width: 18ch;
}

.section-lead {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 1.18rem;
  max-width: 56ch;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

/* Case file evidence box */
.case-box {
  background: linear-gradient(160deg, var(--bg2), #0b0704);
  border: 1px solid rgba(196, 149, 58, 0.22);
  padding: 30px;
  font-family: var(--font-mono);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
}
.case-box::before {
  content: 'CONFIDENTIAL';
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--red-deep);
  border: 1px solid var(--red-deep);
  padding: 3px 8px;
  transform: rotate(8deg);
  color: #5a1a1a;
  border-color: #5a1a1a;
}
.case-box h4 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.case-box ul li {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--parchment-dim);
  padding: 7px 0;
  border-bottom: 1px dashed rgba(196, 149, 58, 0.12);
}
.case-box ul li::before { content: '▸ '; color: var(--gold-dim); }

/* Method / step cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.numeral {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.4rem;
  color: rgba(196, 149, 58, 0.22);
  line-height: 1;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.card-text {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 1rem;
}

/* Persona cards */
.persona-icon { font-size: 2.2rem; margin-bottom: 14px; filter: sepia(0.4); }
.persona-eg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin-top: 14px;
  display: block;
}

/* ════════════════════════════════════════════════════════════════
   PRICING
   ════════════════════════════════════════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  gap: 28px;
  justify-content: center;
  align-items: start;
}
.price-card {
  background: var(--bg2);
  border: 1px solid rgba(107, 80, 32, 0.5);
  padding: 40px 34px;
  position: relative;
}
.price-card.pro {
  background: #120c07;
  border: 1px solid var(--gold);
  box-shadow: 0 0 60px rgba(196, 149, 58, 0.16);
}
.price-card.pro { animation: breathe 7s ease-in-out infinite alternate; }
.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #0a0602;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  padding: 6px 16px;
  text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.price-tier {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.price-name {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.5rem;
  margin: 6px 0 22px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--parchment);
  line-height: 1.1;
}
.price-amount small {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--parchment-dim);
  letter-spacing: 0.1em;
}
.price-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--parchment-dim);
  letter-spacing: 0.08em;
  margin-top: 4px;
  min-height: 1.2em;
}
.price-features {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-features li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--parchment);
  display: flex;
  gap: 10px;
}
.price-features li.no { color: var(--parchment-dim); }
.price-features .yes { color: var(--gold); }
.price-features .x { color: var(--parchment-dim); }

/* Billing toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 46px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}
.billing-toggle .active { color: var(--gold); }
.switch {
  position: relative;
  width: 56px;
  height: 28px;
  border: 1px solid var(--gold-dim);
  border-radius: 30px;
  background: var(--bg2);
  cursor: crosshair;
  transition: border-color 0.3s ease;
}
.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.3s ease, background 0.3s ease;
}
.switch.on .knob { transform: translateX(28px); background: var(--gold-bright); }
.save-tag { color: var(--gold-dim); font-size: 0.7rem; }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid rgba(196, 149, 58, 0.14);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 22px 40px 22px 0;
  position: relative;
  transition: color 0.3s ease;
}
.faq-q:hover { color: var(--gold-bright); }
.faq-q::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  font-style: italic;
  color: var(--parchment-dim);
}
.faq-item.open .faq-a { max-height: 240px; padding-bottom: 24px; }

/* ════════════════════════════════════════════════════════════════
   FORMS / INPUTS
   ════════════════════════════════════════════════════════════════ */
.field { margin-bottom: 26px; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}
.input, .select {
  width: 100%;
  background: #0a0603;
  border: 1px solid rgba(196, 149, 58, 0.18);
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.input::placeholder { color: #4a3f30; }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 22px var(--gold-glow);
}
.select { appearance: none; cursor: crosshair; background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%), linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 12px) center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }

/* Segmented / option selectors */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.seg-opt {
  flex: 1;
  min-width: 64px;
  text-align: center;
  background: #0a0603;
  border: 1px solid rgba(196, 149, 58, 0.18);
  color: var(--parchment-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 12px 8px;
  transition: all 0.3s ease;
}
.seg-opt:hover { border-color: var(--gold-dim); color: var(--parchment); }
.seg-opt.active {
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 20px var(--gold-glow);
  background: rgba(196, 149, 58, 0.06);
}

/* Theme radio cards */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-opt {
  background: #0a0603;
  border: 1px solid rgba(196, 149, 58, 0.16);
  padding: 16px 10px;
  text-align: center;
  transition: all 0.3s ease;
}
.theme-opt:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.theme-opt.active {
  border-color: var(--gold);
  box-shadow: 0 0 22px var(--gold-glow);
  background: rgba(196, 149, 58, 0.07);
}
.theme-opt .ico { font-size: 1.5rem; display: block; margin-bottom: 8px; filter: sepia(0.3); }
.theme-opt .lbl {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--parchment);
}

/* ─── Bureau Elite-gated form options (see js/pro-gate.js) ────────── */
.seg-opt.locked, .theme-opt.locked {
  position: relative;
  opacity: 0.5;
  cursor: not-allowed;
}
.seg-opt.locked:hover { border-color: rgba(196, 149, 58, 0.18); color: var(--parchment-dim); }
.theme-opt.locked:hover { border-color: rgba(196, 149, 58, 0.16); transform: none; }
.lock-badge {
  position: absolute; top: 4px; right: 6px;
  font-size: 0.7rem; line-height: 1; opacity: 0.85; pointer-events: none;
}
.lock-note {
  margin-top: 12px; text-align: center;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--gold-dim);
}
.lock-note a { color: var(--gold); text-decoration: underline; }
.lock-note a:hover { color: var(--gold-bright); }

/* ════════════════════════════════════════════════════════════════
   APP — two-panel quest generator
   ════════════════════════════════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 28px 80px;
  align-items: start;
}
.panel {
  background: var(--bg2);
  border: var(--border-soft);
  padding: 34px;
}
.panel-header {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(196, 149, 58, 0.12);
}

.quest-display {
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}
.quest-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 24px;
}
.quest-empty .big-rune {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--gold-dim);
}
.quest-empty p { font-style: italic; color: var(--parchment-dim); max-width: 32ch; }

/* Loading */
.quest-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 28px;
  text-align: center;
}
.loadbar {
  width: 280px;
  max-width: 70%;
  height: 3px;
  background: rgba(196, 149, 58, 0.12);
  overflow: hidden;
  position: relative;
}
.loadbar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: loadSlide 1.4s ease-in-out infinite;
}
@keyframes loadSlide {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.load-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  min-height: 1.4em;
}

/* Quest result */
.quest-result { display: none; }
.quest-result.show { display: block; }
.case-header {
  border-bottom: 1px solid rgba(196, 149, 58, 0.2);
  padding-bottom: 20px;
  margin-bottom: 8px;
}
.case-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
}
.case-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.8rem;
  margin: 10px 0;
}
.case-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--parchment-dim);
}
.case-intro {
  font-style: italic;
  color: var(--parchment-dim);
  margin: 18px 0 8px;
}

.loc-card {
  background: #0a0603;
  border-left: 4px solid var(--gold);
  border-top: 1px solid rgba(196, 149, 58, 0.08);
  border-right: 1px solid rgba(196, 149, 58, 0.08);
  border-bottom: 1px solid rgba(196, 149, 58, 0.08);
  padding: 22px 24px;
  margin-top: 18px;
  opacity: 0;
  transform: translateY(18px);
  animation: locReveal 0.7s ease forwards;
}
@keyframes locReveal {
  to { opacity: 1; transform: translateY(0); }
}
.loc-name {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.loc-name .ord { color: var(--gold-dim); font-size: 0.9rem; }
.loc-area {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.loc-row { margin: 9px 0; font-size: 0.98rem; }
.loc-row .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  text-transform: uppercase;
}
.quest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(196, 149, 58, 0.14);
}
.final-note {
  font-style: italic;
  text-align: center;
  color: var(--gold-dim);
  margin-top: 24px;
}

.quest-error {
  display: none;
  text-align: center;
  padding: 60px 20px;
  font-style: italic;
  color: #b5704a;
}

/* ════════════════════════════════════════════════════════════════
   MODAL (auth / upgrade)
   ════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(3, 2, 1, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--gold);
  box-shadow: 0 0 70px rgba(196, 149, 58, 0.18);
  width: 100%;
  max-width: 420px;
  padding: 38px 34px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--gold-dim);
  font-size: 1.5rem;
  line-height: 1;
}
.modal-close:hover { color: var(--gold-bright); }
.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  text-align: center;
}
.modal .sub {
  font-style: italic;
  color: var(--parchment-dim);
  text-align: center;
  margin-bottom: 26px;
  font-size: 0.95rem;
}
.tabs {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid rgba(196, 149, 58, 0.18);
}
.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--parchment-dim);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px;
  transition: all 0.3s ease;
}
.tab.active { background: rgba(196, 149, 58, 0.1); color: var(--gold-bright); }
.modal-msg {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  margin-top: 14px;
  min-height: 1.2em;
  letter-spacing: 0.04em;
}
.modal-msg.err { color: #c06b46; }
.modal-msg.ok { color: var(--gold); }

/* ════════════════════════════════════════════════════════════════
   EMAIL CAPTURE / FINAL CTA
   ════════════════════════════════════════════════════════════════ */
.final-cta { text-align: center; }
.email-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 36px auto 0;
  flex-wrap: wrap;
}
.email-form .input { flex: 1; min-width: 200px; }
.cta-confirm {
  font-style: italic;
  color: var(--gold);
  font-size: 1.2rem;
  margin-top: 36px;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid rgba(196, 149, 58, 0.14);
  padding: 40px 0 50px;
  position: relative;
  z-index: 3;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--parchment-dim);
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
}

/* ════════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .section-pad { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: rgba(7, 5, 3, 0.96);
    backdrop-filter: blur(12px);
    padding: 24px 28px;
    gap: 20px;
    border-bottom: 1px solid rgba(196, 149, 58, 0.2);
  }
  .nav-toggle { display: block; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .theme-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-title, .hero-eyebrow, .hero-sub, .hero-cta, .hero-scroll { opacity: 1 !important; }
  .grain-overlay { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   INTERACTIVE MOTION — buttons, inputs, cards, modals
   Additive polish. Pure CSS, no markup/JS changes. Hover lift, press
   feedback, keyboard focus rings, and modal entrance animations.
   ════════════════════════════════════════════════════════════════ */

/* ---- Buttons ---- */
button, .btn, [class*="btn"], input[type="submit"],
.hero-cta, .email-btn, .email-submit {
  transition: background 0.25s ease, color 0.2s ease,
              box-shadow 0.25s ease, letter-spacing 0.25s ease,
              transform 0.15s ease, filter 0.2s ease;
}
button:hover, .btn:hover, [class*="btn"]:hover, input[type="submit"]:hover,
.email-btn:hover, .email-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(196, 149, 58, 0.25);
}
button:active, .btn:active, [class*="btn"]:active, input[type="submit"]:active,
.email-btn:active, .email-submit:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(196, 149, 58, 0.15);
  filter: brightness(0.9);
}
button:focus-visible, .btn:focus-visible, [class*="btn"]:focus-visible,
input[type="submit"]:focus-visible {
  outline: 1.5px solid rgba(196, 149, 58, 0.6);
  outline-offset: 3px;
}

/* ---- Inputs ---- */
input, textarea, select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 149, 58, 0.1), inset 0 0 12px rgba(196, 149, 58, 0.1);
}

/* ---- Cards ---- */
.clue, .clue-card, .card, [class*="-card"] {
  transition: border-color 0.3s ease, background 0.3s ease,
              transform 0.25s ease, box-shadow 0.3s ease;
}
.clue:hover, .clue-card:hover, .card:hover, [class*="-card"]:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 149, 58, 0.35);
  box-shadow: 0 10px 30px rgba(196, 149, 58, 0.12);
}

/* ---- Modals ----
   Scoped to the overlay container so modal internals are never hidden.
   Visible state keys on the class the markup actually toggles (.open),
   plus .active/.visible for robustness. Inner content fades in after
   the modal itself (0.15s delay); breathing elements keep their pulse,
   and modals that already use .reveal-now keep their emergeFromFog. */
.modal-backdrop, .overlay { transition: opacity 0.3s ease; }

.modal-backdrop.open .modal:not(.reveal-now),
.modal-backdrop.active .modal:not(.reveal-now),
.modal-backdrop.visible .modal:not(.reveal-now),
.overlay.open .modal:not(.reveal-now),
.overlay.active .modal:not(.reveal-now),
.overlay.visible .modal:not(.reveal-now) {
  animation: modalIn 0.35s ease both;
}

.modal-backdrop.open .modal > *:not(.breathe),
.modal-backdrop.active .modal > *:not(.breathe),
.modal-backdrop.visible .modal > *:not(.breathe),
.overlay.open .modal > *:not(.breathe),
.overlay.active .modal > *:not(.breathe),
.overlay.visible .modal > *:not(.breathe) {
  animation: modalContentIn 0.4s ease both;
  animation-delay: 0.15s;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalContentIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion: keep the interface usable, drop the motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   EMAIL OTP — passwordless access code flow
   ════════════════════════════════════════════════════════════════ */
.otp-input {
  text-align: center;
  letter-spacing: 0.55em;
  font-size: 1.6rem;
  padding: 16px 12px 16px calc(12px + 0.55em); /* offset trailing letter-spacing */
}
.otp-email { color: var(--gold); }
.otp-resend {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: underline;
  cursor: crosshair;
  transition: color 0.2s ease;
}
.otp-resend:hover { color: var(--gold-bright); }
.otp-resend.disabled { color: var(--parchment-dim); pointer-events: none; text-decoration: none; }
@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.otp-shake { animation: otpShake 0.4s ease; }

/* ════════════════════════════════════════════════════════════════
   AUTH MODAL — two-tab (Sign In / Create Account) + access code
   ════════════════════════════════════════════════════════════════ */
.auth-modal { max-width: 420px; }
.auth-h { font-size: 1.4rem; text-align: center; margin-bottom: 8px; }

.auth-tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid rgba(196, 149, 58, 0.18); }
.auth-tab {
  flex: 1; background: transparent; border: none; color: var(--parchment-dim);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 8px; position: relative; cursor: crosshair; transition: color 0.3s ease;
}
.auth-tab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform 0.3s ease;
}
.auth-tab.active { color: var(--gold-bright); }
.auth-tab.active::after { transform: scaleX(1); }

.auth-screen { animation: authFade 0.35s ease both; }
.auth-screen[hidden] { display: none; }
@keyframes authFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.auth-links.center { justify-content: center; }
.auth-links a {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--gold);
  text-decoration: underline; cursor: crosshair; transition: color 0.2s ease;
}
.auth-links a:hover { color: var(--gold-bright); }

.field-hint { color: var(--parchment-dim); font-size: 0.66rem; letter-spacing: 0.06em; }

/* ─── Bureau Frequency (Bring Your Own Key) modal ───────────────── */
.bkey-screen { animation: authFade 0.35s ease both; }
.bkey-screen[hidden] { display: none; }
.bkey-mask { font-family: var(--font-mono); color: var(--gold-bright); letter-spacing: 0.1em; }
.bkey-link { color: var(--gold); text-decoration: underline; }
.bkey-link:hover { color: var(--gold-bright); }

/* ─── Upgrade confirmation toast (LemonSqueezy Checkout.Success) ──── */
.lop-upgrade-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  z-index: 600; max-width: 90vw; text-align: center;
  background: var(--bg2); border: 1px solid var(--gold);
  box-shadow: 0 0 40px rgba(196, 149, 58, 0.25); color: var(--parchment);
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 14px 22px; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease;
}
.lop-upgrade-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pw-strength { height: 4px; background: rgba(196, 149, 58, 0.12); margin-top: 8px; overflow: hidden; }
.pw-strength-bar { height: 100%; width: 0; background: var(--gold-dim); transition: width 0.3s ease, background 0.3s ease; }

.otp-boxes { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-box {
  flex: 1 1 0; min-width: 0; max-width: 48px; height: 54px; text-align: center;
  font-family: var(--font-mono); font-size: 1.5rem;
  background: #0a0603; border: 1px solid rgba(196, 149, 58, 0.25); color: var(--gold-bright);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.otp-box:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 18px var(--gold-glow); }

/* ════════════════════════════════════════════════════════════════
   ACTIVE OPERATIONS — registry modal
   ════════════════════════════════════════════════════════════════ */
.ops-modal { max-width: 460px; }
.ops-list { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; margin-top: 18px; }
.ops-card { padding: 18px 20px; }
.ops-card-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--gold-dim); text-transform: uppercase;
}
.ops-progress { color: var(--gold); }
.ops-title { font-family: var(--font-display); color: var(--gold); font-size: 1.15rem; margin: 8px 0 4px; }
.ops-meta { font-style: italic; color: var(--parchment-dim); font-size: 0.9rem; margin-bottom: 14px; }
.ops-empty { text-align: center; padding: 30px 10px; }
.ops-empty .big-rune { font-family: var(--font-display); font-size: 3.4rem; color: var(--gold-dim); display: block; margin-bottom: 14px; }
.ops-empty p { font-style: italic; color: var(--parchment-dim); }

/* ---- Modal overflow guard (must not overflow at 375px) ---- */
.modal { min-width: 0; }           /* honour width:100% inside the flex backdrop */
.auth-tab { min-width: 0; }
@media (max-width: 420px) {
  .modal { padding: 30px 18px; }
  .auth-tab { font-size: 0.68rem; letter-spacing: 0.05em; padding: 12px 4px; }
  .auth-h { font-size: 1.2rem; }
  .ops-card { padding: 16px; }
  .ops-title { font-size: 1.05rem; }
}
