/* ============================================================
   JAWASEC v3 — DotDNA-inspired refinements (Tier 1)
   Loaded AFTER jawasec-v2.css to override key tokens.
   ============================================================ */

:root {
  /* Brighter, more saturated lime (was #00ff88, then #4dff7a) */
  --acc: #6cff5e;
  --acc-soft: rgba(108, 255, 94, 0.18);
  --acc-deep: #0e3a1f;
  --acc-glow: #6cff5e;

  /* Panel shell tokens — bigger gap so the panel clearly floats */
  --outer: #000000;
  --shell-bg: #070b09;
  --shell-radius: 32px;
  --shell-pad: 22px;

  /* Fade text — more aggressive contrast */
  --fade-color: rgba(234, 243, 239, 0.22);
}

[data-theme="light"] {
  --outer: #ebebe8;
  --shell-bg: #f6f7f4;
  --fade-color: rgba(13, 18, 16, 0.28);
}

/* ============================================================
   PAGE SHELL — outer black, inner rounded panel
   ============================================================ */
html, body { background: var(--outer); }
body {
  padding: var(--shell-pad);
  /* keep overflow-x: hidden from base */
}

/* Disable v2 body::before glow — we move it inside the shell */
body::before { display: none !important; }

.page-shell {
  position: relative;
  background: var(--shell-bg);
  border-radius: var(--shell-radius);
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100vh - var(--shell-pad) * 2);
}

.page-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70vmin 50vmin at 85% -10%, var(--acc-soft), transparent 60%),
    radial-gradient(55vmin 45vmin at -10% 110%, var(--acc-soft), transparent 55%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Nav floats inside the shell visually */
.nav {
  top: calc(var(--shell-pad) + 18px);
}

/* Tweaks panel positioned relative to viewport still works fine */

/* The hero canvas should follow the rounded top corners */
.hero {
  border-top-left-radius: var(--shell-radius);
  border-top-right-radius: var(--shell-radius);
}

/* ============================================================
   BRACKET SYSTEM — [ section numbers ]
   .eyebrow already has brackets in v2.css; extend to sec-num.
   ============================================================ */
.sec-num {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.sec-num::before {
  content: '[ ';
  color: var(--acc);
  margin-right: 6px;
}
.sec-num::after {
  content: ' ]';
  color: var(--acc);
  margin-left: 6px;
}

/* Floating hero corner brackets — keep subtle brackets on metadata */
.hero-meta::before {
  content: '[';
  color: var(--acc);
  margin-right: 8px;
  letter-spacing: 0;
}
.hero-meta::after {
  content: ']';
  color: var(--acc);
  margin-left: 8px;
  letter-spacing: 0;
}
.hero-meta.tr::before, .hero-meta.br::before { display: none; }
.hero-meta.tl::after, .hero-meta.bl::after { display: none; }

/* ============================================================
   FADE TEXT — three-tone hierarchy
   - default: white
   - <em>: green accent (already in v2)
   - <span class="fade">: muted translucent
   ============================================================ */
.fade {
  color: var(--fade-color) !important;
  font-style: inherit;
  font-weight: inherit;
}
/* Make sure fade beats other inherited colors in headings */
h1 .fade, h2 .fade, h3 .fade,
.display .fade,
.hero h1 .fade,
.manifesto h2 .fade,
.footer-brand h3 .fade {
  color: var(--fade-color) !important;
}

/* ============================================================
   CTA — invert variants of .btn-pill
   ============================================================ */

/* Dark variant — for use on light surfaces */
.btn-pill.btn-pill--dark {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-pill.btn-pill--dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--acc);
}

/* Big "final" pill — used in the contact-final hero CTA */
.btn-pill.btn-pill--final {
  padding: 8px 8px 8px 32px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.btn-pill.btn-pill--final .bubble {
  width: 46px;
  height: 46px;
  font-size: 16px;
}

/* ============================================================
   CONTACT FINAL — typographic closer, no visual chrome
   ============================================================ */
.contact-final {
  position: relative;
  padding: 140px 40px 140px;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.contact-final .cf-inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.contact-final .cf-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-final .cf-eyebrow::before {
  content: '[ ';
  color: var(--acc);
}
.contact-final .cf-eyebrow::after {
  content: ' ]';
  color: var(--acc);
}

.contact-final h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(52px, 7.5vw, 110px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96, "wdth" 85;
  text-wrap: balance;
  text-transform: uppercase;
  max-width: 16ch;
  padding-bottom: 0.05em;
}
.contact-final h2 em {
  font-style: normal;
  color: var(--acc);
  font-weight: 500;
}

.contact-final .cf-sub {
  color: var(--ink-dim);
  font-size: 18px;
  line-height: 1.6;
  max-width: 58ch;
}

.contact-final .cf-cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 700px) {
  .contact-final { padding: 90px 22px 90px; }
}

/* ============================================================
   FOOTER tweak — apply fade to the brand tagline
   ============================================================ */
.footer-brand p .fade {
  color: var(--fade-color) !important;
}

/* ============================================================
   CARD RADII — bump to match the panel-radius vocabulary
   ============================================================ */
.svc-card,
.def-card,
.contact-card,
.inc-timeline,
.mitre {
  border-radius: 24px;
}

/* Numbered tag on def-cards & adv-feats (visual hook) */
.def-card { padding-top: 28px; }
.def-card::after {
  content: '[ ' counter(defcard, decimal-leading-zero) '.0 ]';
  counter-increment: defcard;
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--acc);
  z-index: 2;
}
.def-grid { counter-reset: defcard; }

/* ============================================================
   NAV — inherit pill but slightly nudge style for "inside shell"
   ============================================================ */
.nav {
  border: 1px solid var(--line-strong);
  background: rgba(8, 12, 10, 0.78);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  body { padding: 8px; }
  :root { --shell-radius: 22px; --shell-pad: 8px; }
}

/* ============================================================
   TIER 2 — DotDNA accent card + bottom nav + particle sphere
   ============================================================ */

/* --- Noise filter (used by .def-card.is-feature) ----------- */
.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* --- Active / featured card in def-grid -------------------- */
.def-card.is-feature,
.def-card:hover {
  /* hover also triggers the green state — like the video */
  background: var(--acc);
  color: #06120a;
  border-color: var(--acc);
  transform: translateY(-3px);
}
.def-card.is-feature {
  /* keep one card permanently active (e.g. index 1) */
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.7'/></svg>"),
    var(--acc);
  background-size: 220px 220px, auto;
  background-blend-mode: multiply, normal;
  color: #06120a;
  border-color: var(--acc);
}
.def-card.is-feature::before,
.def-card:hover::before { display: none; }
.def-card.is-feature .icon,
.def-card:hover .icon {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.18);
  color: #06120a;
}
.def-card.is-feature h4,
.def-card:hover h4 { color: #06120a; }
.def-card.is-feature p,
.def-card:hover p { color: rgba(6, 18, 10, 0.78); }
.def-card.is-feature::after,
.def-card:hover::after { color: #06120a; }

/* Top-right arrow badge on each def-card (DotDNA touch) */
.def-card .arrow-badge {
  position: absolute;
  top: 16px;
  right: 56px;   /* leave room for [ 1.0 ] tag rendered via ::after */
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--acc);
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
  z-index: 2;
  font-size: 12px;
}
.def-card:hover .arrow-badge,
.def-card.is-feature .arrow-badge {
  transform: rotate(-45deg);
  background: #06120a;
  color: var(--acc);
  border-color: #06120a;
}

/* --- BOTTOM PILL NAV --------------------------------------- */
.botnav {
  position: fixed;
  bottom: calc(var(--shell-pad) + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(8, 12, 10, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(108, 255, 94, 0.04);
}
[data-theme="light"] .botnav { background: rgba(255,255,255,0.85); }

.botnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 16px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-dim);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s;
  position: relative;
}
.botnav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.botnav a .bn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  opacity: 0.4;
  transition: all .3s var(--ease);
}
.botnav a.active {
  color: var(--ink);
  background: rgba(108, 255, 94, 0.06);
}
.botnav a.active .bn-dot {
  background: var(--acc);
  opacity: 1;
  box-shadow: 0 0 10px var(--acc);
}
.botnav a .plus {
  color: var(--acc);
  font-weight: 500;
  margin-left: 2px;
  opacity: 0.6;
}

@media (max-width: 800px) {
  /* Compact the bottom nav so phones keep section navigation
     (previously hidden, leaving no way to jump between sections). */
  .botnav {
    gap: 2px;
    padding: 5px;
    max-width: calc(100vw - 20px);
    bottom: calc(var(--shell-pad) + 10px);
  }
  .botnav a { padding: 8px 11px; font-size: 11.5px; gap: 6px; }
  .botnav a .bn-dot { display: none; }
  .botnav a .plus { display: none; }
}
@media (max-width: 380px) {
  .botnav a { padding: 7px 8px; font-size: 10.5px; }
}

/* --- PARTICLE SPHERE — removed (kept minimal closer) ------ */

/* ============================================================
   MODERN TRANSITIONS — split-text reveal, smooth easing
   ============================================================ */

/* Each word gets wrapped in <span class="sw"> by JS */
.sw {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.sw.sw-in {
  opacity: 1;
  transform: translateY(0);
}

/* Smoother default easing on hover-state transforms */
.btn-pill,
.btn-ghost,
.svc-card,
.def-card,
.contact-card,
.stat,
.adv-feat,
.inc-step,
.icon-btn {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Card tilt is applied inline by JS; ensure transition is buttery */
.def-card,
.svc-card,
.contact-card,
.stat,
.adv-feat,
.inc-step {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              background 0.3s ease,
              color 0.3s ease;
  transform-style: preserve-3d;
}

/* Hero adjustments to coexist with bottom pill nav --------- */
.hero {
  padding-bottom: 160px;  /* room for botnav */
}
.hero-scroll { display: none; }  /* replaced by botnav */

/* =========================================================
   LOGIN — nav dropdown
   ========================================================= */
.login-wrap { position: relative; display: flex; }

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.login-btn:hover,
.login-wrap.open .login-btn {
  border-color: var(--acc);
  background: var(--acc-soft);
  color: var(--acc);
}
.login-ic { width: 15px; height: 15px; flex-shrink: 0; }
.login-caret { width: 13px; height: 13px; transition: transform .35s var(--ease); opacity: .7; }
.login-wrap.open .login-caret { transform: rotate(180deg); opacity: 1; }

.login-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 272px;
  padding: 7px;
  background: rgba(10, 16, 13, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02) inset;
  display: flex;
  flex-direction: column;
  gap: 3px;
  /* animated reveal */
  opacity: 0;
  transform: translateY(-10px) scale(.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .32s var(--ease);
  z-index: 120;
}
[data-theme="light"] .login-menu { background: rgba(255,255,255,0.94); }
.login-wrap.open .login-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
/* little pointer */
.login-menu::before {
  content: "";
  position: absolute;
  top: -5px; right: 26px;
  width: 10px; height: 10px;
  background: inherit;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.login-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  color: var(--ink);
  transition: background .25s var(--ease);
}
.login-opt:hover { background: rgba(255,255,255,0.05); }
[data-theme="light"] .login-opt:hover { background: rgba(0,0,0,0.04); }

.login-opt-ic {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.login-opt-ic svg { width: 19px; height: 19px; }
.login-opt:hover .login-opt-ic {
  color: var(--acc);
  border-color: var(--acc);
  background: var(--acc-soft);
}

.login-opt-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.login-opt-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.login-opt-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.login-opt-arrow {
  width: 16px; height: 16px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--ink-mute);
  transform: translateX(-4px);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease), color .3s var(--ease);
}
.login-opt:hover .login-opt-arrow { opacity: 1; transform: translateX(0); color: var(--acc); }

/* =========================================================
   AGENTIC SECTION — portal access buttons (red-box area)
   ========================================================= */
.agent-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.agent-portals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.agent-portal {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.015);
  color: var(--ink);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.agent-portal:hover { transform: translateY(-3px); border-color: var(--line-strong); }

.agent-portal-ic {
  width: 30px; height: 30px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.agent-portal-ic svg { width: 17px; height: 17px; }
.agent-portal-txt {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.agent-portal-arrow {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--ink-mute);
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.agent-portal:hover .agent-portal-arrow { transform: translateX(3px); color: var(--acc); }

/* primary = Agentic SOC Login (accent-filled) */
.agent-portal.is-primary {
  background: var(--acc);
  border-color: var(--acc);
  color: #04130c;
}
.agent-portal.is-primary .agent-portal-ic {
  border-color: rgba(0,0,0,0.18);
  color: #04130c;
}
.agent-portal.is-primary .agent-portal-arrow { color: #04130c; }
.agent-portal.is-primary:hover {
  box-shadow: 0 14px 34px -12px var(--acc-glow);
}

@media (max-width: 560px) {
  .agent-portal { flex: 1 1 100%; }
  .login-btn span#login-label { display: none; }
}

