/* ===== Lev-Tech: warm retro-futurist theme (opt-in via <body class="retro">) =====
   Loaded after style.css. Everything is scoped under body.retro so pages
   that don't opt in are untouched. Re-points the design tokens (fonts are
   unchanged), then restyles the components that use hard-coded shapes. */

body.retro {
  --ink: #2b1a3a;
  --bg: #ffe8cc;
  --bg-raised: #fffaf0;
  --surface: #ffd9b0;
  --surface-2: #ffd9b0;
  --border: var(--ink);
  --text: var(--ink);
  --text-dim: #4a3a55;
  --text-faint: #6b5a75;
  --lime: #c2255c;          /* accent: raspberry (name kept so shared rules still work) */
  --lime-dim: #a01c4a;
  --lime-wash: rgba(194, 37, 92, 0.1);
  --on-lime: #fff8ec;
  --radius: 0;

  --sky-top: #ffd9a0;
  --sky-mid: #ff9e7a;
  --sky-low: #ff6f91;
  --sun-top: #ffe27a;

  --hard-shadow: 3px 3px 0 var(--ink);

  background-color: var(--bg);
  background-image: radial-gradient(rgba(43, 26, 58, 0.09) 1px, transparent 1.4px);
  background-size: 14px 14px;
}

body.retro ::selection { background: var(--ink); color: #ffd166; }

/* Ambient glows belong to the dark theme */
body.retro .cursor-glow,
body.retro .quote-glow,
body.retro .hero-glow { display: none; }

/* ---------- Nav ---------- */
body.retro .site-nav {
  background: var(--bg-raised);
  backdrop-filter: none;
  border-bottom: 2px solid var(--ink);
}
/* mark.svg is near-white for the dark theme; flatten it to ink on the light bar */
body.retro .site-nav .brand img { filter: brightness(0); }
body.retro .nav-links a { border-radius: 0; }
body.retro .nav-links a:hover { background: var(--ink); color: var(--bg-raised); }
body.retro .nav-links a.active { color: var(--lime); }
body.retro .nav-links a.nav-cta {
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
body.retro .nav-toggle { border: 2px solid var(--ink); border-radius: 0; background: var(--bg-raised); }

/* ---------- Buttons ---------- */
body.retro .btn {
  border-radius: 0;
  border: 2px solid var(--ink);
  box-shadow: var(--hard-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
body.retro .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
body.retro .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

body.retro .btn-metal,
body.retro .btn-metal:hover {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe27a 0%, #ff9e7a 55%, #ff6f91 100%);
  background-size: auto;
  animation: none;
  border-color: var(--ink);
  box-shadow: var(--hard-shadow);
}
body.retro .btn-metal:hover { box-shadow: 4px 4px 0 var(--ink); }
body.retro .btn-metal:active { box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Panels ---------- */
body.retro .card,
body.retro .vertical,
body.retro .hero .inner {
  background: var(--bg-raised);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: 5px 5px 0 var(--ink);
}
/* accent rule across the top of each panel */
body.retro .card,
body.retro .vertical { border-top: 6px solid var(--lime); }

body.retro .hero .inner { padding: 36px 40px 32px; }
body.retro .hero h1 { color: var(--ink); }

/* ---------- Hero: sunset sky (compact on inner pages, full scene on the homepage) ---------- */
body.retro .hero {
  padding: 72px 0 48px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 100%);
  border-bottom: 2px solid var(--ink);
}
/* thin grid-floor strip ties inner-page headers to the homepage scene */
body.retro .hero:not(.hero-full)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 22px, var(--sky-low) 22px 26px);
  pointer-events: none;
}
body.retro .hero.hero-full {
  padding: 96px 0 220px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
}

body.retro .retro-sun {
  position: absolute;
  right: 6%;
  bottom: 120px;
  width: min(380px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sun-top) 0%, #ff8e5e 60%, #ff4f7e 100%);
  -webkit-mask-image: linear-gradient(#000, #000), repeating-linear-gradient(to bottom, #000 0 12px, transparent 12px 18px);
  mask-image: linear-gradient(#000, #000), repeating-linear-gradient(to bottom, #000 0 12px, transparent 12px 18px);
  -webkit-mask-size: 100% 48%, 100% 52%;
  mask-size: 100% 48%, 100% 52%;
  -webkit-mask-position: top, bottom;
  mask-position: top, bottom;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

body.retro .retro-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  background: var(--ink);
  border-top: 2px solid var(--ink);
  overflow: hidden;
  pointer-events: none;
}
body.retro .retro-grid {
  position: absolute;
  left: -50%;
  right: -50%;
  top: -10px;
  bottom: -60px;
  background:
    linear-gradient(90deg, rgba(255, 111, 145, 0.85) 2px, transparent 2px) 0 0 / 64px 100%,
    linear-gradient(rgba(255, 111, 145, 0.85) 2px, transparent 2px) 0 0 / 100% 38px;
  transform: perspective(260px) rotateX(58deg);
  transform-origin: 50% 0;
  animation: gridRoll 1.6s linear infinite;
}
body.retro .retro-floor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 26, 58, 0) 55%, var(--ink) 100%);
}
@keyframes gridRoll {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 0 38px; }
}

body.retro .hero-chevron { color: var(--lime); }
body.retro .hero-sub { color: var(--ink); }

/* About hero illustration: the dark-theme version enlarges and fades it into the
   background, which blurs it on a light sky. Show it whole, framed like a panel. */
body.retro .about-hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-left: 0;
  object-fit: initial;
  -webkit-mask-image: none;
  mask-image: none;
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---------- Quote band: keeps the justice-shelf photo, light text over it ---------- */
body.retro .quote-section { border-bottom: 2px solid var(--ink); }
body.retro .quote-section .on-image { color: #fff8ec; }
body.retro .card-glass { background: rgba(255, 250, 240, 0.94); backdrop-filter: none; }

/* ---------- Badges, flow steps ---------- */
body.retro .badge {
  border-radius: 0;
  border: 2px solid var(--ink);
}
body.retro .badge-live { background: #ffe27a; color: var(--ink); }
body.retro .badge-soon { background: var(--bg-raised); color: var(--ink); }

body.retro .flow-dot {
  border-radius: 0;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
body.retro .flow-step::before { background: none; border-left: 2px dashed var(--ink); width: 0; }

/* ---------- Forms, tags, misc components on inner pages ---------- */
body.retro .field input,
body.retro .field select,
body.retro .field textarea {
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
}
body.retro .field input:focus,
body.retro .field select:focus,
body.retro .field textarea:focus { border-color: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
body.retro .form-status.err { color: #b3261e; }
body.retro .contact-alt .row .ic { border: 2px solid var(--ink); border-radius: 0; background: var(--bg-raised); }
body.retro .chip { border: 2px solid var(--ink); border-radius: 0; color: var(--ink); }
body.retro .pipeline { border: 2px solid var(--ink); border-radius: 0; background: var(--bg-raised); }
body.retro .pull-quote { border-left: 4px solid var(--lime); }
body.retro .rule { border-top-color: var(--lime); }
body.retro .legal a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
body.retro footer { background: var(--ink); border-top: 2px solid var(--ink); color: #e9d8c4; }
body.retro .footer-brand { color: #fff8ec; }
body.retro .footer-links a,
body.retro .footer-legal a { color: #f5c9a8; }
body.retro .footer-links a:hover,
body.retro .footer-legal a:hover { color: #ffe27a; }
body.retro .footer-bottom { border-top-color: rgba(255, 248, 236, 0.2); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body.retro .retro-sun { right: 50%; transform: translateX(50%); width: min(300px, 70vw); opacity: 0.9; }
}
@media (max-width: 720px) {
  body.retro .hero { padding: 48px 0 40px; }
  body.retro .hero.hero-full { padding: 56px 0 200px; }
  body.retro .hero .inner { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  body.retro .retro-grid { animation: none; }
}
