/* ==========================================================================
   RDLAB — "Dark Editorial Hybrid" GLOBAL layer (header + footer, site-wide).
   Loaded on every page. Restyles the shared chrome to the dark system and
   fixes the header-overlap bug (header is always solid/blurred, never
   fully transparent). Page bodies keep their own per-page treatment.
   ========================================================================== */
:root{
  --ink:#0b0b0d; --ink-soft:#151418; --ink-line:rgba(255,255,255,.09); --cream:#f2f0ec;
  --paper:#f6f4ef; --paper-soft:#eeebe2; --paper-line:rgba(17,17,17,.08); --charcoal:#16151a;
  --red:#b5121b; --red-bright:#d4222c; --gold:#c9a227;
  --f-serif:'Fraunces', Georgia, serif;
  --f-body:'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-label:'Space Grotesk', system-ui, sans-serif;
}

/* ---------------- HEADER (always solid/blurred — fixes overlap) ---------------- */
.header, .header--clean{
  position:sticky; top:0; z-index:90;   /* explicit: pin to the top on scroll */
  height:88px;
  background:rgba(11,11,13,.82) !important;
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  /* red neon underline — visible from the top, not only on scroll */
  border-bottom:1px solid rgba(212,34,44,.55);
  box-shadow:0 6px 26px -8px rgba(212,34,44,.32);
  transition:height .4s ease, box-shadow .4s ease, background .4s ease, border-color .4s ease;
}
/* Logged-in only: keep the sticky header below the WP admin bar so it doesn't
   tuck underneath it on scroll (invisible to visitors — they have no admin bar). */
body.admin-bar .header, body.admin-bar .header--clean{ top:32px; }
@media (max-width:782px){ body.admin-bar .header, body.admin-bar .header--clean{ top:46px; } }
.header--clean .header-inner{ height:100%; padding:0 !important; }
.header--clean.header-scrolled{
  height:64px;
  background:rgba(11,11,13,.9) !important;
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-bottom-color:rgba(212,34,44,.7) !important;
  box-shadow:0 12px 44px -10px rgba(212,34,44,.5);
}
.header--clean.header-scrolled .brand--logo-only{ opacity:1 !important; width:auto !important; transform:none !important; pointer-events:auto !important; }

/* brand → typed "RDLAB.STUDIO" wordmark (no logo image), pinned LEFT */
.header--clean .header-inner{ display:flex !important; align-items:center; }
.header--clean .brand--word{ order:0 !important; margin:0 !important; display:inline-flex; align-items:center; text-decoration:none; }
.header--clean .nav-pill{ order:1 !important; margin:0 auto !important; transform:none !important; }
.header--clean .header-right--clean{ order:2 !important; margin:0 !important; }
.brand-word{
  display:inline-flex; align-items:center; gap:11px;
  font-family:var(--f-label); font-weight:700; font-size:19px; letter-spacing:.03em;
  text-transform:uppercase; color:var(--cream); line-height:1;
}
.brand-word .bw-mark{ width:12px; height:12px; border-radius:50%; background:var(--red); flex:0 0 12px; }
.brand-word .bw-text{ display:inline; }        /* one inline unit → tight "RDLAB.STUDIO" */
.brand-word .bw-accent{ color:inherit; }       /* single red dot at the start; the "." stays cream */
.header--clean.header-scrolled .brand-word{ font-size:18px; }

/* nav — flat on dark, red underline grows from left on hover */
.header--clean .nav-pill{
  background:transparent !important; border:0 !important; box-shadow:none !important; padding:0; gap:4px;
}
.header--clean .nav-pill a{
  position:relative; background:transparent !important; border:0 !important;
  font-family:var(--f-label); font-weight:600; font-size:14px; letter-spacing:.01em;
  color:rgba(242,240,236,.72) !important; padding:8px 14px; border-radius:0;
}
.header--clean .nav-pill a:hover, .header--clean .nav-pill a.active{ color:var(--cream) !important; transform:none; }
.header--clean .nav-pill a::after{
  content:""; position:absolute; left:14px; right:14px; bottom:2px; height:2px; border-radius:2px;
  background:var(--red-bright); transform:scaleX(0); transform-origin:left; transition:transform .3s cubic-bezier(.16,1,.3,1); opacity:1;
}
.header--clean .nav-pill a:hover::after, .header--clean .nav-pill a.active::after{ transform:scaleX(1); }
.header--clean .nav-pill a.active::after{ background:var(--red-bright); }

/* language switch */
.header--clean .lang{ background:transparent; border:0; box-shadow:none; padding:0; }
.header--clean .lang-item{ font-family:var(--f-label); color:rgba(242,240,236,.5); background:transparent; border:0; }
.header--clean .lang-item:hover{ color:var(--cream); background:transparent; }
.header--clean .lang-item.active{ color:var(--cream); background:transparent; border:0; }
.header--clean .lang-sep{ color:rgba(242,240,236,.25); }

/* header CTAs → red pill + ghost */
.header--clean .header-right--clean .btn{ border-radius:2px !important; font-family:var(--f-label); font-weight:600; box-shadow:none; }
.header--clean .header-right--clean .btn.primary{ background:var(--red); border:1px solid var(--red); color:#fff; }
.header--clean .header-right--clean .btn.primary:hover{ background:var(--red-bright); border-color:var(--red-bright); transform:translateY(-1px); box-shadow:0 12px 26px -14px rgba(181,18,27,.6); }
.header--clean .header-right--clean .btn.ghost{ background:transparent; border:1px solid rgba(255,255,255,.22); color:var(--cream); }
.header--clean .header-right--clean .btn.ghost:hover{ border-color:var(--cream); background:rgba(255,255,255,.05); }
.header--clean .hamb{ background:transparent; border:1px solid rgba(255,255,255,.22); color:var(--cream); border-radius:2px; }

/* mobile panel → dark */
.mobile-panel{
  background:rgba(11,11,13,.95) !important; backdrop-filter:blur(14px);
  border:1px solid var(--ink-line) !important; border-radius:2px;
}
.mobile-panel a{ color:rgba(242,240,236,.85) !important; font-family:var(--f-label); }
.mobile-panel a:hover{ background:rgba(255,255,255,.05) !important; color:var(--cream) !important; }
.mobile-lang{ background:rgba(255,255,255,.04); border:1px solid var(--ink-line); }
.mobile-lang a{ background:transparent; border:1px solid var(--ink-line); color:rgba(242,240,236,.8); }
.mobile-lang a.active{ background:var(--red); border-color:var(--red); color:#fff; }
.mobile-panel .btn.primary{ background:var(--red) !important; border-color:var(--red) !important; color:#fff; border-radius:2px; }
.mobile-panel .btn:not(.primary){ background:transparent; border:1px solid rgba(255,255,255,.22); color:var(--cream); border-radius:2px; }

@media (max-width:980px){
  .header, .header--clean{ height:64px; }
  .header--clean.header-scrolled{ height:58px; }
}

/* ---------------- FOOTER → dark ---------------- */
.footer-card{ border:1px solid var(--ink-line) !important; box-shadow:none !important; background:var(--ink) !important; border-radius:2px; }
.footer-card::before{ display:none !important; }
/* leftover AI device-mockup image removed from footer; CTA goes full-width */
.footer-hero{ grid-template-columns:1fr !important; }
.footer-hero-media{ display:none !important; }

/* footer spans the full viewport width (edge to edge); content stays centered */
.site-footer{ padding:0 !important; background:var(--ink); margin-top:0; }
.site-footer > .container{ max-width:100% !important; padding:0 !important; }
.footer-card{ border-radius:0 !important; border:0 !important; border-top:1px solid var(--ink-line) !important; box-shadow:none !important; overflow:hidden !important; }
.footer-card::after{ inset:0 0 auto 0 !important; height:340px !important; border-radius:0 !important; }
.footer-inner{ max-width:1200px; margin:0 auto; padding:0 clamp(20px,4vw,40px); }
.footer-hero{ padding-left:0 !important; padding-right:0 !important; }
.footer-main{ background:transparent !important; padding-left:0 !important; padding-right:0 !important; }
.footer-bottom{ background:transparent !important; padding-left:0 !important; padding-right:0 !important; }
.footer-card::after{
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(181,18,27,.14), transparent 60%),
    radial-gradient(700px 380px at 92% 6%, rgba(181,18,27,.08), transparent 60%) !important;
}
.footer-hero h2{ font-family:var(--f-serif); font-weight:500; color:var(--cream); font-size:clamp(28px,3.4vw,44px); letter-spacing:-.01em; }
.footer-hero p{ color:rgba(242,240,236,.62) !important; }
.footer-hero .btn.primary{ background:var(--red) !important; border:1px solid var(--red) !important; color:#fff; border-radius:2px !important; box-shadow:none; }
.footer-hero .btn.primary:hover{ background:var(--red-bright) !important; transform:translateY(-1px); box-shadow:0 14px 30px -14px rgba(181,18,27,.6); }
.footer-main{ background:rgba(255,255,255,.02) !important; border-top:1px solid var(--ink-line) !important; border-bottom:1px solid var(--ink-line) !important; }
.footer-brand{ display:inline-flex; font-family:var(--f-label) !important; }
/* One consistent colour for the whole wordmark. Overrides style.css
   `.footer-brand span{color:var(--muted);font-weight:900}` which otherwise
   turned "STUDIO" (inside .bw-text) blue-grey. */
.footer-brand .brand-word,
.footer-brand .brand-word .bw-text,
.footer-brand .brand-word .bw-accent{ font-size:21px; font-weight:700 !important; color:var(--cream) !important; }
.footer-brand .brand-word .bw-mark{ background:var(--red) !important; }
/* Column headers: same case + weight across all four columns */
.footer-col h3{ font-family:var(--f-label); font-weight:600 !important; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:rgba(242,240,236,.9) !important; }
.footer-col .meta{ color:rgba(242,240,236,.55) !important; }
/* Link lists: uniform weight (kills the bold/non-bold mismatch) */
.footer-links a{ color:rgba(242,240,236,.62) !important; font-family:var(--f-body); font-weight:500 !important; }
.footer-links a:hover{ color:var(--cream) !important; }
.footer-links a::before{ color:var(--red-bright); }
.footer-contact{ color:rgba(242,240,236,.62) !important; }
.footer-contact a{ color:rgba(242,240,236,.75) !important; }
.footer-contact a:hover{ color:var(--cream) !important; }
.footer-mini{ color:rgba(242,240,236,.5) !important; }
.mini-social a{ background:rgba(255,255,255,.05); border:1px solid var(--ink-line); }
.footer-bottom{ background:rgba(0,0,0,.25) !important; }
.footer-bottom .legal, .footer-bottom .legal a{ color:rgba(242,240,236,.5) !important; }
.footer-bottom .legal a:hover{ color:var(--cream) !important; }
.footer-social a{ background:rgba(255,255,255,.06); border:1px solid var(--ink-line); }
.footer-social a:hover{ border-color:rgba(255,255,255,.35); }

/* footer contact/mini icons (inline SVG) → tint light via CSS filter override */
.footer-contact .ico svg [stroke]{ stroke:rgba(242,240,236,.7); }
.footer-contact .ico svg [fill]:not([fill="none"]){ fill:rgba(242,240,236,.7); }
.footer-mini .mini-social svg [fill]:not([fill="none"]){ fill:rgba(242,240,236,.7); }

/* WhatsApp sticky keeps its green — leave as is */

/* ---------------- PRIMARY BUTTON micro-interactions (site-wide) ----------------
   One subtle interaction per button:
   • link CTAs (a.btn.primary) get an arrow that slides right on hover
   • all primary buttons get the spec'd red glow hover-shadow, guaranteed here so
     no per-page `box-shadow:none` can strip it. */
.btn.primary{ transition:transform .25s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, background .25s ease, border-color .25s ease; }
.btn.primary:hover{ box-shadow:0 14px 30px -14px rgba(181,18,27,.6) !important; }
a.btn.primary::after{
  content:"\2192"; /* → */ font-family:var(--f-label); font-weight:600;
  display:inline-block; margin-left:-2px;
  transform:translateX(0); transition:transform .28s cubic-bezier(.16,1,.3,1);
}
a.btn.primary:hover::after{ transform:translateX(5px); }

@media (prefers-reduced-motion:reduce){
  .header, .header--clean, .header--clean .nav-pill a::after{ transition:none !important; }
  .btn.primary, a.btn.primary::after{ transition:none !important; }
}

/* ==========================================================================
   SIGNATURE "WOW" LAYER — shared keyframes + globals. Red/gold neon only.
   Scoped by selectors to Home / Portfolio / footer; harmless elsewhere.
   Every effect fails safe (content stays visible) and honours reduced-motion.
   ========================================================================== */
@property --wow-angle{ syntax:'<angle>'; initial-value:0deg; inherits:false; }
@keyframes wow-trace{ to{ --wow-angle:360deg; } }
@keyframes wow-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
@keyframes wow-pulse{
  0%,100%{ box-shadow:0 12px 30px -16px rgba(181,18,27,.55), 0 0 0 0 rgba(212,34,44,0); }
  50%{ box-shadow:0 12px 30px -16px rgba(181,18,27,.6), 0 0 22px 1px rgba(212,34,44,.34); }
}
@keyframes wow-flicker{
  0%{ opacity:0; } 8%{ opacity:1; } 16%{ opacity:.15; } 26%{ opacity:1; }
  38%{ opacity:.4; } 50%{ opacity:1; } 100%{ opacity:1; }
}

/* 1b. kinetic section headlines (word reveal on scroll-in) — hidden only under html.js */
.kinetic .w{ display:inline-block; overflow:visible; vertical-align:top; padding-bottom:.06em; }
html.js .kinetic .wi{ display:inline-block; opacity:0; transform:translateY(24px); filter:blur(6px);
  transition:opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1), filter .8s; }
.kinetic.is-in .wi{ opacity:1 !important; transform:none !important; filter:none !important; }
.kinetic .wi.wi-em{ font-style:italic; }

/* 7. neon flicker-on eyebrow labels */
.home-eyebrow.flicker-in, .rpf-eyebrow.flicker-in{ animation:wow-flicker .45s linear both; }

/* 4. cursor spotlight — soft red radial that follows the mouse (fine pointer only) */
.spotlight{ position:relative; }
.spotlight::before{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none; opacity:0; transition:opacity .45s ease;
  background:radial-gradient(560px circle at var(--mx,50%) var(--my,50%), rgba(212,34,44,.08), transparent 60%);
}
.spotlight.spot-on::before{ opacity:1; }
.spotlight > *{ position:relative; z-index:1; }

/* 6. magnetic CTA glow-pulse (slow breathing; magnetic-follow itself is JS) */
.magnetic{ animation:wow-pulse 3s ease-in-out infinite; will-change:transform; }

@media (prefers-reduced-motion:reduce){
  .kinetic .wi{ opacity:1 !important; transform:none !important; filter:none !important; transition:none !important; }
  .home-eyebrow.flicker-in, .rpf-eyebrow.flicker-in{ animation:none !important; }
  .magnetic{ animation:none !important; }
  .spotlight::before{ display:none !important; }
}
