/* =========================================================
   main.css
   VioLev — reset + typography + primitives (blank-branded)
   Primitives mirror SecureLynx base.css / Wildridge main.css
   (.container / .label / .btn / .section). No page-specific CSS
   lives here — that belongs in a per-page stylesheet on the fork.
   ========================================================= */

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: pageFade 800ms ease;
}
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; font-weight: 500; }

/* ---------- a11y floor: visible keyboard focus everywhere ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ---------- primitives ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.label {
  font-family: var(--mono); font-size: .82rem; font-weight: 400; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-muted);
}
.text-violet { color: var(--violet); }
.text-muted  { color: var(--text-muted); }

.section { position: relative; padding: clamp(58px, 8vw, 116px) 0; }
.section-heading { margin-bottom: 46px; }
.section-heading .label { display: block; margin-bottom: 16px; }
.section-heading h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--mono); font-size: .78rem; font-weight: 400; letter-spacing: .12em;
  text-transform: uppercase; padding: .92em 1.5em;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast),
              color var(--transition-fast), border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}
.btn-primary { background: var(--violet); color: var(--void); }
.btn-primary:hover { background: var(--violet-bright); transform: translateY(-2px); box-shadow: var(--glow-violet-soft); }
.btn-ghost { border-color: var(--border-active); color: var(--mist); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-bright); transform: translateY(-2px); }

/* ---------- image slot (placeholder until real art lands) ---------- */
.slot {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  background: linear-gradient(165deg, #15102a 0%, #0d0918 60%, #0a0712 100%);
  border: 1px solid var(--border-primary);
}
.slot::after {
  content: attr(data-shot); position: absolute; left: 14px; bottom: 12px; right: 14px;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--haze); opacity: .7; line-height: 1.5;
}

/* ---------- scroll reveal (paired with the footer observer) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--transition-slow), transform var(--transition-slow); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion: honor the quality floor ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
  body { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- interior page hero (shared by section pages) ---------- */
.page-hero { padding: clamp(120px, 16vh, 200px) 0 clamp(48px, 8vh, 96px); }
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 16px 0 14px; color: var(--mist); }
.page-hero .lead { max-width: 54ch; color: var(--text-secondary); }

/* =========================================================
   PRIVACY MODAL — self-contained footer pop-up.
   Its OWN namespace (.pmodal*), deliberately kept apart from
   Journey's .modal system so the two are tuned independently.
   Pure-CSS :target opens it with JS off; the footer script
   layers .is-open for focus handling + a clean URL.
   Mirrors the Journey modal look via shared global tokens.
   ========================================================= */
.pmodal {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vh, 48px) clamp(14px, 4vw, 40px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
}
.pmodal:target, .pmodal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
body.pmodal-open { overflow: hidden; }

.pmodal-backdrop {
  position: absolute; inset: 0; background: rgba(4, 2, 9, 0.74);
  backdrop-filter: blur(3px); cursor: pointer;
}
.pmodal-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 84vh;
  display: flex; flex-direction: column;
  background: var(--bg-panel-strong); border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.85), var(--glow-violet-soft);
  transform: translateY(14px) scale(.985);
  transition: transform var(--transition-medium);
}
.pmodal:target .pmodal-panel, .pmodal.is-open .pmodal-panel { transform: none; }

.pmodal-head {
  flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: clamp(22px, 3vh, 30px) clamp(22px, 3vw, 32px) 14px;
  border-bottom: 1px solid var(--border-secondary);
}
.pmodal-head .label { display: block; margin-bottom: 8px; }
.pmodal-head h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--mist); letter-spacing: -.015em;
}
.pmodal-close {
  flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-primary); border-radius: var(--radius-sm);
  color: var(--haze); font-size: 1.2rem; line-height: 1; cursor: pointer; text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.pmodal-close:hover, .pmodal-close:focus-visible { color: var(--mist); border-color: var(--border-active); background: rgba(139,92,255,.10); }

.pmodal-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: clamp(18px, 2.6vh, 26px) clamp(22px, 3vw, 32px) clamp(24px, 3vh, 32px);
  -webkit-overflow-scrolling: touch;
}
.pmodal-body > * + * { margin-top: 14px; }
.pmodal-body p { color: var(--text-secondary); font-size: .96rem; line-height: 1.65; }
.pmodal-body a { color: var(--violet-bright); }
