/* =====================================================================
   HiSoft Corporation — "Sovereign Mesh" creative homepage
   Stack: vanilla HTML/CSS/JS · Three.js (hero) · GSAP ScrollTrigger
   Brand: Teal Trust  (#008080 primary · #2DD4BF mint · #020A0F midnight)
   ===================================================================== */

:root {
  /* Brand accents — identical across both themes (this IS Teal Trust) */
  --teal:        #008080;
  --teal-bright: #2DD4BF;
  --mint:        #7fe9dc;

  /* ---- DARK theme (default) surface + text tokens ---- */
  --midnight:    #020A0F;   /* page canvas */
  --charcoal:    #07141C;
  --charcoal-60: rgba(7, 20, 28, 0.60);
  --white:       #FFFFFF;   /* headings */
  --silver:      #94A3B8;   /* body copy */
  --border:      rgba(45, 212, 191, 0.16);
  --border-soft: rgba(148, 163, 184, 0.14);
  --card:        rgba(11, 24, 33, 0.72);

  /* Semantic surface tokens (theme-aware; replace hardcoded dark literals) */
  --ink:         rgba(2, 10, 15, 0.60);   /* sunken panels / inputs */
  --ink-strong:  rgba(2, 10, 15, 0.92);   /* solid dark chrome (header, mobile nav) */
  --panel-fill:  rgba(7, 20, 28, 0.90);   /* report title bar, agenda rows */
  --header-grad-top: rgba(2, 10, 15, 0.86);
  --header-grad-bot: rgba(2, 10, 15, 0.45);
  --footer-bg:   rgba(2, 10, 15, 0.70);
  --on-teal:     #021014;                 /* text on teal-filled buttons/badges */
  --shadow-strong: rgba(0, 0, 0, 0.55);
  --shadow-soft:   rgba(0, 0, 0, 0.45);
  --grid-line:   rgba(45, 212, 191, 0.04);
  --glow-a:      rgba(0, 128, 128, 0.22);
  --glow-b:      rgba(45, 212, 191, 0.10);
  --icon-glow:   drop-shadow(0 0 12px rgba(45, 212, 191, 0.40));

  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;

  --shell: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ===================== LIGHT THEME ===================== */
:root[data-theme="light"] {
  --midnight:    #EEF3F4;   /* soft off-white canvas */
  --charcoal:    #FFFFFF;
  --charcoal-60: rgba(255, 255, 255, 0.72);
  --white:       #0B1F27;   /* headings -> deep teal-ink */
  --silver:      #48606C;   /* body copy -> slate */
  --border:      rgba(0, 128, 128, 0.22);
  --border-soft: rgba(11, 31, 39, 0.12);
  --card:        rgba(255, 255, 255, 0.60);   /* frosted glass (was 0.86 = flat) */

  --ink:         rgba(255, 255, 255, 0.75);
  --ink-strong:  rgba(255, 255, 255, 0.96);
  --panel-fill:  rgba(236, 243, 244, 0.94);
  --header-grad-top: rgba(255, 255, 255, 0.88);
  --header-grad-bot: rgba(255, 255, 255, 0.55);
  --footer-bg:   rgba(255, 255, 255, 0.70);
  --on-teal:     #FFFFFF;
  --shadow-strong: rgba(11, 31, 39, 0.18);
  --shadow-soft:   rgba(11, 31, 39, 0.10);
  --grid-line:   rgba(0, 128, 128, 0.06);
  --glow-a:      rgba(0, 128, 128, 0.16);     /* raised so the blur has depth to refract */
  --glow-b:      rgba(45, 212, 191, 0.14);
  --icon-glow:   drop-shadow(0 0 3px rgba(0, 128, 128, 0.14));

  color-scheme: light;
}

/* Light-theme cards: give them the same lifted frosted-glass feel as dark.
   The --card alpha is now 0.60 (was 0.86, which read flat). A 1px top inner
   highlight + soft elevation makes them read as glass rather than paper.
   Dark theme is intentionally untouched (user likes its current glass). */
:root[data-theme="light"] .status-deck,
:root[data-theme="light"] .bento-card,
:root[data-theme="light"] .quote-card,
:root[data-theme="light"] .report-card,
:root[data-theme="light"] .prod-card,
:root[data-theme="light"] .contact-form {
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65),
              0 14px 34px rgba(11, 31, 39, 0.12);
}

* { box-sizing: border-box; }

/* Smooth theme cross-fade (reduced-motion users get an instant swap below) */
body, .site-header, .status-deck, .bento-card, .report-card,
.quote-card, .contact-form, .site-footer, .prod-card {
  transition: background-color .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease);
}

/* Brand-tinted text selection (replaces default blue highlight) */
::selection { background: rgba(45, 212, 191, 0.28); color: var(--white); }
::-moz-selection { background: rgba(45, 212, 191, 0.28); color: var(--white); }

/* Decorative chrome: avoid accidental text selection during clicks/drags.
   Real content (headings, paragraphs, lists) remains selectable/copyable. */
.brand, .primary-nav, .hamburger, .btn,
.footer-legal, .mesh-canvas, .marquee { user-select: none; -webkit-user-select: none; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--silver);
  background: var(--midnight);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient page backdrop: subtle teal radial + faint grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, var(--glow-a), transparent 60%),
    radial-gradient(700px 500px at 10% 8%, var(--glow-b), transparent 55%),
    var(--midnight);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--white); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
em { font-style: normal; color: var(--teal-bright); }
a { color: var(--teal-bright); text-decoration: none; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--teal); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .72rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn-lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  color: var(--on-teal); box-shadow: 0 8px 30px rgba(0, 128, 128, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(45, 212, 191, 0.45); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--white); }
.btn-outline:hover { border-color: var(--teal-bright); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--silver); }
.btn-ghost:hover { color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, var(--header-grad-top), var(--header-grad-bot));
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border-soft); background: var(--ink-strong); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  color: var(--white); flex: 0 0 auto;
  padding: .25rem .5rem; margin: -.25rem -.5rem;          /* hit-area padding w/o shifting layout */
}
.brand-logo { height: 60px; width: auto; display: block; transition: transform .25s var(--ease); }
.brand:hover .brand-logo { transform: translateY(-1px); }
.brand-logo:hover { filter: drop-shadow(0 0 12px rgba(45,212,191,.5)); }

/* Two-layer logo: full-colour PNG on light theme; on dark the baked-in
   dark "Corporation" word vanishes, so we swap to a pre-generated dark
   variant (hisoft-logo-dark.png) where only the dark word is lifted to a
   light tone and the teal wordmark is preserved. The dark copy stays
   in normal flow (position:relative) so the stack keeps its size and the
   logo never collapses out of the header. */
.brand-logo-stack { position: relative; display: inline-block; line-height: 0; }
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--color { display: none; }
[data-theme="dark"] .brand-logo--dark {
  display: inline-block;
  position: relative;
}

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.primary-nav li { display: flex; align-items: center; }
.nav-link {
  font: inherit; font-weight: 500; color: var(--silver); background: none; border: 0; cursor: pointer;
  padding: .55rem .85rem; border-radius: 10px; transition: color .2s, background .2s;
}
.nav-link:hover, .has-mega:hover .nav-link { color: var(--white); background: rgba(45,212,191,.08); }

.has-mega { position: relative; }
/* Invisible bridge fills the gap between the trigger and the absolutely
   positioned panel so :hover is never interrupted while the cursor travels. */
.has-mega::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); width: min(640px, 90vw); height: 12px;
}
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: min(640px, 90vw);
  /* Theme-aware, near-opaque fill (same solid-chrome token as the scrolled
     header) so page content behind is occluded — no text bleed-through — while
     the backdrop blur keeps the frosted-glass edge. Dark in dark mode, light in
     light mode, automatically. */
  background: var(--ink-strong);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 16px; padding: 1rem;
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), transform .22s var(--ease);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.is-open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.mega-item { display: block; padding: .8rem .9rem; border-radius: 12px; transition: background .2s; }
.mega-item strong { display: block; color: var(--white); font-family: var(--sans); font-size: .95rem; }
.mega-item span { font-size: .82rem; color: var(--silver); }
.mega-item:hover { background: rgba(45,212,191,.08); }

.header-cta { display: flex; gap: .5rem; align-items: center; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .5rem; }
.hamburger span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; gap: .25rem; padding: 1rem 1.25rem 1.5rem; border-top: 1px solid var(--border-soft); background: var(--ink-strong); }
.site-header.nav-open .mobile-nav { display: flex; }
.mobile-nav a { color: var(--silver); padding: .7rem .2rem; border-bottom: 1px solid var(--border-soft); font-weight: 500; }
.mobile-nav a:hover { color: var(--white); }
.mobile-cta { display: flex; gap: .5rem; margin-top: 1rem; }
.mobile-cta .btn { flex: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 7rem 0 4rem; overflow: hidden; }
.mesh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-glow { position: absolute; inset: 0; z-index: 0; background: radial-gradient(60% 50% at 70% 40%, var(--glow-a), transparent 70%); pointer-events: none; }
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
}
.eyebrow, .section-eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal-bright); margin: 0 0 1rem;
}
.hero-title { max-width: 26ch; line-height: 1.04; }
.hero-copy { align-self: center; }
.hero-lede { font-size: 1.08rem; max-width: 46ch; color: var(--silver); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.8rem 0 1.6rem; }

.trust-ribbon { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.trust-ribbon li { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--white); font-weight: 500; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 10px var(--teal-bright); }

/* ---------- Status Deck ---------- */
.status-deck {
  background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem;
  box-shadow: 0 18px 48px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
}
.deck-head { display: flex; align-items: center; gap: .55rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-bright); margin-bottom: 1.1rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.55);} 70% { box-shadow: 0 0 0 12px rgba(45,212,191,0);} 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0);} }
.deck-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.metric-num { font-family: var(--serif); font-weight: 700; font-size: 1.7rem; color: var(--white); line-height: 1; }
.metric-label { font-size: .78rem; color: var(--silver); margin-top: .3rem; }
.deck-foot { margin-top: 1.2rem; padding-top: .9rem; border-top: 1px solid var(--border-soft); }
.region { font-family: var(--mono); font-size: .72rem; color: var(--teal-bright); }

.scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 14px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: var(--teal-bright); border-radius: 2px; transform: translateX(-50%); animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 8px;} 30% { opacity: 1;} 70% { opacity: 1; top: 22px;} 100% { opacity: 0; top: 22px;} }

/* ---------- Section scaffolding ---------- */
section { position: relative; padding: 6rem 0; }
.section-title { max-width: 18ch; }
.section-sub { max-width: 56ch; font-size: 1.02rem; }

/* ---------- Scrub report engine ---------- */
.scrub { border-top: 1px solid var(--border-soft); }
.scrub-stage { margin-top: 2.5rem; perspective: 1200px; display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; }
.scrub-left { display: flex; flex-direction: column; gap: 1.1rem; }
.scrub-copy p { font-size: 1.02rem; line-height: 1.65; max-width: 46ch; }
.scrub-copy .tick { margin-bottom: 1.6rem; }
.scrub-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.scrub-ticks li { position: relative; padding-left: 2rem; font-size: 1.02rem; line-height: 1.5; color: var(--silver); }
.scrub-ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--on-teal);
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
}
.report-card {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; transform-style: preserve-3d;
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
  will-change: transform;
}
.report-bar { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; background: var(--panel-fill); border-bottom: 1px solid var(--border-soft); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.report-title { font-family: var(--mono); font-size: .78rem; color: var(--silver); margin-left: .4rem; }
.report-body { padding: 1.2rem 1.3rem 1.5rem; }
.report-eligible { font-size: .82rem; color: var(--silver); margin: 0 0 1rem; font-family: var(--mono); }
.report-eligible span { color: var(--white); }

/* Agenda list (always visible before generation) */
.agenda { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .5rem; }
.agenda-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .85rem; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--ink); font-size: .9rem; }
.agenda-name { color: var(--silver); }
.agenda-state { font-family: var(--mono); font-size: .72rem; color: var(--silver); padding: .2rem .5rem; border-radius: 999px; background: rgba(148,163,184,.12); }
.agenda-item.done .agenda-state { color: var(--on-teal); background: var(--teal-bright); }

/* Spinner */
.report-spinner { display: flex; align-items: center; gap: .7rem; padding: .9rem 0 1.1rem; }
.report-spinner[hidden] { display: none; }
.spinner-ring { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(45,212,191,.2); border-top-color: var(--teal-bright); animation: spin .8s linear infinite; }
.spinner-tick { display: none; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: var(--on-teal); font-weight: 700; background: linear-gradient(135deg, var(--teal), var(--teal-bright)); }
.spinner-text { font-size: .85rem; color: var(--silver); font-family: var(--mono); }
.spinner-time { margin-left: auto; font-size: .8rem; color: var(--teal-bright); font-family: var(--mono); }
.report-spinner.done .spinner-ring { display: none; }
.report-spinner.done .spinner-tick { display: inline-flex; }
.report-spinner.done .spinner-text { color: var(--teal-bright); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
.report-results { margin-top: .4rem; animation: fadeUp .5s var(--ease); }
.result-row { padding: .7rem 0; border-bottom: 1px dashed var(--border-soft); }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .88rem; margin-bottom: .5rem; }
.result-head span { color: var(--silver); }
.badge { font-family: var(--mono); font-size: .7rem; font-weight: 700; padding: .22rem .55rem; border-radius: 999px; letter-spacing: .04em; }
.badge.pass { color: var(--on-teal); background: linear-gradient(135deg, var(--teal), var(--teal-bright)); }
.bar { position: relative; height: 9px; border-radius: 999px; background: rgba(148,163,184,.14); overflow: hidden; display: flex; }
.bar-for { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); transition: width 1s var(--ease); }
.bar-against { display: block; height: 100%; background: rgba(255,95,86,.55); transition: width 1s var(--ease); }
.bar-legend { display: flex; justify-content: space-between; font-size: .76rem; color: var(--silver); margin-top: .35rem; font-family: var(--mono); }
.bar-legend .lf b { color: var(--teal-bright); } .bar-legend .la b { color: #ff8a86; }
.result-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .9rem; font-family: var(--mono); font-size: .76rem; }
.result-foot .hash { color: var(--mint); }
.result-foot .verified { color: var(--teal-bright); }
.report-btn { width: 100%; margin-top: 1.1rem; }
.report-btn[disabled] { opacity: .55; cursor: default; }

/* ---------- Bento matrix ---------- */
.bento { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.bento-card {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
.bento-card:hover { border-color: var(--border); box-shadow: 0 14px 36px rgba(0,0,0,.3); }
.bento-card.span-2 { grid-column: span 2; }
.bento-ico { width: 34px; height: 34px; display: block; margin-bottom: .9rem; color: var(--teal-bright); filter: var(--icon-glow); }
.bento-card h3 { color: var(--white); }
.bento-card p { font-size: .95rem; margin: 0; }
.bento-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.bento-tags span {
  font: 600 .72rem/1 var(--sans); letter-spacing: .02em; color: var(--teal-bright);
  background: rgba(45, 212, 191, .10); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: .35rem .7rem;
}

/* ---------- Social proof / marquee ---------- */
.proof { border-top: 1px solid var(--border-soft); }
.marquee { margin: 2.5rem 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: inline-flex; gap: 3rem; white-space: nowrap; will-change: transform; animation: marquee 26s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: 1.5rem; color: var(--silver); opacity: .75; }
@keyframes marquee { from { transform: translateX(0);} to { transform: translateX(-50%);} }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.quote-card { margin: 0; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.6rem; }
.quote-card blockquote { margin: 0 0 1rem; color: var(--white); font-size: .98rem; line-height: 1.55; }
.quote-card figcaption { font-size: .85rem; color: var(--teal-bright); }
.quote-card figcaption strong { color: var(--white); display: block; }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border-soft);
  color: var(--teal-bright); cursor: pointer; flex: 0 0 auto;
  transition: border-color .2s, transform .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--teal-bright); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; display: none; }
/* Two icons only — driven by the RESOLVED theme (light/dark), so System shows the icon of whatever it resolves to */
:root[data-theme="light"] .theme-toggle .ico-light { display: block; }
:root[data-theme="dark"]  .theme-toggle .ico-dark  { display: block; }

/* ---------- Product grid (11 solutions) ---------- */
.solutions-hub { border-top: 1px solid var(--border-soft); }
.prod-grid {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
}
.prod-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.prod-card::after {
  /* teal glow trace on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px 180px at var(--mx, 50%) var(--my, 0%), rgba(45,212,191,.14), transparent 70%);
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.prod-card:hover { border-color: var(--border); box-shadow: 0 14px 36px var(--shadow-soft); }
.prod-card:hover::after { opacity: 1; }
.prod-card.featured { grid-column: span 2; }
.prod-card.featured .prod-name { font-size: 1.45rem; }
.prod-ico { width: 40px; height: 40px; display: block; margin-bottom: 1rem; color: var(--teal-bright); filter: var(--icon-glow); }
.prod-name { font-family: var(--serif); color: var(--white); font-size: 1.2rem; line-height: 1.2; margin: 0 0 .5rem; }
.prod-desc { font-size: .92rem; color: var(--silver); margin: 0 0 1.1rem; line-height: 1.55; }
.prod-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.prod-link { font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--teal-bright); display: inline-flex; align-items: center; gap: .35rem; }
.prod-link:hover { color: var(--white); }
.prod-tag {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .02em;
  color: var(--on-teal); background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  padding: .28rem .6rem; border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.prod-tag.flag { color: var(--teal-bright); background: rgba(45,212,191,.12); }
.prod-price { font-family: var(--mono); font-size: .78rem; color: var(--mint); }
.prod-price b { color: var(--white); font-size: .92rem; }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--border-soft); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact-form { display: grid; gap: .9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .82rem; color: var(--silver); font-weight: 500; }
.contact-form input,
.contact-form textarea { font: inherit; padding: .75rem .9rem; border-radius: 10px; border: 1px solid var(--border-soft); background: var(--ink); color: var(--white); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--teal-bright); box-shadow: 0 0 0 3px rgba(45,212,191,.2); }
.form-note { font-size: .85rem; color: var(--teal-bright); margin: .2rem 0 0; min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--footer-bg); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand .brand-logo { height: 56px; }
.foot-brand p { font-size: .9rem; max-width: 36ch; }
.foot-addr { color: var(--teal-bright); font-family: var(--mono); font-size: .78rem; }
.foot-col h4 { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--silver); margin-bottom: 1rem; }
.foot-col a:not(.social-link) { display: block; color: var(--silver); font-size: .9rem; padding: .28rem 0; }
.foot-col a:not(.social-link):hover { color: var(--white); }
.footer-legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .8rem; color: var(--silver); }
.foot-cert { font-family: var(--mono); color: var(--teal-bright); }

/* ---------- Footer contact column ---------- */
.foot-contact .foot-address {
  font-style: normal;
  color: var(--silver);
  font-size: .9rem;
  line-height: 1.5;
  margin: 0 0 .4rem;
}
.foot-contact-line { color: var(--teal-bright); font-family: var(--mono); font-size: .82rem; }
.foot-contact-line:hover { color: var(--white); }

/* ---------- Footer social bar (inline within the contact column) ---------- */
.social-bar--inline { margin-top: .8rem; }
.social-bar { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }
.social-bar li { margin: 0; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  color: var(--silver);
  background: var(--card);
  border: 1px solid var(--border);
  transition: color .25s var(--ease), background-color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}
.social-link svg { width: 17px; height: 17px; display: block; }
.social-link:hover {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 128, 128, 0.35);
}

/* ---------- Reveal animation base (GSAP toggles .is-in) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .status-deck { max-width: 460px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.span-2 { grid-column: span 2; }
  .testimonials, .prod-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .primary-nav, .header-cta { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .bento, .testimonials, .prod-grid, .footer-grid { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .prod-card.featured { grid-column: span 1; }
  .scrub-stage { grid-template-columns: 1fr; gap: 1.8rem; }
  section { padding: 4rem 0; }
  .deck-metrics { grid-template-columns: 1fr 1fr; }
  .header-inner { height: 72px; gap: 1rem; }
  .brand-logo { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .spinner-ring { animation: none; border-top-color: var(--teal-bright); }
  body, .site-header, .status-deck, .bento-card, .report-card,
  .quote-card, .contact-form, .site-footer, .prod-card { transition: none !important; }
}

/* =====================================================================
   ABOUT US — editorial company profile. Reuses the site's Teal Trust
   tokens, frosted cards, mono eyebrows, and the bento/card hover grammar.
   No status-deck, badges, "Request Demo", or contact form on this page.
   ===================================================================== */

/* ---------- Opening thesis (centered masthead, symmetric) ---------- */
.about-open { padding: 8.5rem 0 5rem; text-align: center; }
.about-open-inner { max-width: 46rem; margin-inline: auto; }
.about-thesis {
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.01em;
  margin: 0 auto 1.4rem; max-width: 20ch;
}
.about-thesis-sub { font-size: 1.12rem; color: var(--silver); max-width: 56ch; margin: 0 auto; line-height: 1.7; }
/* Centered symmetric gradient rule under the hero copy (mirrors body section dividers) */
.about-open-inner::after {
  content: ""; display: block; width: 96px; height: 2px; margin: 2.6rem auto 0;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  border-radius: 2px;
}

/* ---------- Sovereignty thesis ---------- */
.about-sovereign { border-top: 1px solid var(--border-soft); }
.sovereign-grid { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.sovereign-card {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.8rem; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
.sovereign-card:hover { border-color: var(--border); box-shadow: 0 14px 36px var(--shadow-soft); }
.sovereign-ico { width: 36px; height: 36px; display: block; margin-bottom: 1rem; color: var(--teal-bright); filter: var(--icon-glow); }
.sovereign-card h3 { color: var(--white); font-size: 1.18rem; margin: 0 0 .6rem; }
.sovereign-card p { color: var(--silver); font-size: .95rem; line-height: 1.6; margin: 0; }

/* ---------- Ledger timeline ---------- */
.about-ledger { border-top: 1px solid var(--border-soft); }
.ledger { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.ledger-row {
  display: grid; grid-template-columns: 84px 110px 1fr; gap: 1.4rem; align-items: center;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.3rem 1.6rem; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.ledger-row:hover { border-color: var(--border); box-shadow: 0 14px 36px var(--shadow-soft); }
.ledger-year {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--teal-bright);
  line-height: 1;
}
.ledger-hash {
  font-family: var(--mono); font-size: .76rem; color: var(--mint);
  background: rgba(45, 212, 191, .08); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: .3rem .7rem; justify-self: start; white-space: nowrap;
}
.ledger-body h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.ledger-body p { margin: 0; color: var(--silver); font-size: .92rem; line-height: 1.55; }

/* ---------- Trust charter (what we will NOT do) ---------- */
.about-charter { border-top: 1px solid var(--border-soft); }
.charter { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.charter-item {
  display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
.charter-item:hover { border-color: var(--border); box-shadow: 0 14px 36px var(--shadow-soft); }
.charter-ico { width: 40px; height: 40px; color: var(--teal-bright); filter: var(--icon-glow); }
.charter-item h3 { margin: 0 0 .5rem; font-size: 1.08rem; color: var(--white); }
.charter-item p { margin: 0; color: var(--silver); font-size: .92rem; line-height: 1.55; }

/* ---------- Leadership ---------- */
.about-leaders { border-top: 1px solid var(--border-soft); }
.leader-grid { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: stretch; }
.leader-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 2.4rem 1.9rem 2rem; text-align: center; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
/* Quiet top accent line for visual rhythm */
.leader-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  opacity: .7;
}
.leader-card:hover { border-color: var(--border); box-shadow: 0 18px 44px var(--shadow-soft); }
/* Bigger avatar with gradient ring + soft glow */
.leader-avatar {
  width: 116px; height: 116px; margin: 0 auto 1.3rem; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(45,212,191,.16), rgba(45,212,191,.04));
  background-clip: padding-box;
  border: 3px solid transparent;
  background-image:
    linear-gradient(var(--card), var(--card)),
    linear-gradient(135deg, var(--teal-bright), var(--teal));
  background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 0 0 6px rgba(45,212,191,.06), 0 12px 30px rgba(45,212,191,.10);
}
.leader-avatar svg {
  width: 56px; height: 56px; color: var(--teal-bright);
  filter: drop-shadow(0 2px 6px rgba(45,212,191,.45));
}
.leader-card h3 { margin: 0 0 .25rem; font-size: 1.32rem; color: var(--white); }
.leader-role { font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; color: var(--teal-bright); margin: 0 0 .8rem; }
.leader-cred { font-size: .82rem; color: var(--mint); margin: 0 0 1.1rem; line-height: 1.5; max-width: 32ch; }
.leader-bio { color: var(--silver); font-size: .92rem; line-height: 1.6; margin: 0 0 1.5rem; }
/* LinkedIn button */
.leader-linkedin {
  margin-top: auto; display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.15rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--white); text-decoration: none;
  background: rgba(45,212,191,.08); border: 1px solid var(--border-soft);
  transition: background .25s var(--ease), border-color .25s, transform .25s, box-shadow .25s;
}
.leader-linkedin svg { width: 16px; height: 16px; color: var(--teal-bright); transition: color .25s; }
.leader-linkedin:hover {
  background: var(--teal); color: var(--on-teal); border-color: var(--teal);
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,128,128,.35);
}
.leader-linkedin:hover svg { color: var(--on-teal); }

/* ---------- Executive team (denser roster grid) ---------- */
.about-exec { border-top: 1px solid var(--border-soft); }
.exec-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}
.exec-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.9rem 1.2rem 1.7rem; text-align: center; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
.exec-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  opacity: .7;
}
.exec-card:hover { border-color: var(--border); box-shadow: 0 18px 44px var(--shadow-soft); }
.exec-avatar {
  width: 84px; height: 84px; margin: 0 auto 1.1rem; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  border: 3px solid transparent;
  background-image:
    linear-gradient(var(--card), var(--card)),
    linear-gradient(135deg, var(--teal-bright), var(--teal));
  background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 0 0 6px rgba(45,212,191,.06), 0 12px 30px rgba(45,212,191,.10);
}
.exec-avatar svg {
  width: 40px; height: 40px; color: var(--teal-bright);
  filter: drop-shadow(0 2px 6px rgba(45,212,191,.45));
}
.exec-card h3 { margin: 0 0 .25rem; font-size: 1.06rem; color: var(--white); }
.exec-role { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--teal-bright); margin: 0 0 .7rem; }
.exec-cred { font-size: .8rem; color: var(--silver); line-height: 1.5; margin: 0; }

/* ---------- Legacy ---------- */
.about-legacy { border-top: 1px solid var(--border-soft); }
.legacy-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem; align-items: start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: 0 18px 48px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.legacy-card:hover { box-shadow: 0 22px 56px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04); }
.legacy-ico { width: 64px; height: 64px; color: var(--teal-bright); filter: var(--icon-glow); }
.legacy-text { color: var(--silver); font-size: 1rem; line-height: 1.65; margin: .4rem 0 0; }
.legacy-text strong { color: var(--white); }

/* ---------- Quiet founder CTA (centered frosted card, no form, no "Request Demo") ---------- */
.about-cta { border-top: 1px solid var(--border-soft); padding: 6rem 0; }
.cta-card {
  max-width: 44rem; margin-inline: auto; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3rem 2.4rem; box-shadow: 0 18px 48px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
}
.cta-glyph {
  display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 1.2rem;
  border-radius: 50%; background: rgba(45, 212, 191, .08); border: 1px solid var(--border-soft);
}
.cta-glyph svg { width: 30px; height: 30px; filter: var(--icon-glow); }
.cta-card .section-eyebrow { margin-bottom: .8rem; }
.cta-card .section-title { margin: 0 auto .9rem; }
.cta-card .section-sub { margin: 0 auto 1.8rem; max-width: 46ch; }

/* ---------- About responsive ---------- */
@media (max-width: 980px) {
  .sovereign-grid { grid-template-columns: 1fr; }
  .charter { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: 1fr; }
  .exec-grid { grid-template-columns: repeat(3, 1fr); }
  .ledger-row { grid-template-columns: 72px 1fr; }
  .ledger-hash { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 760px) {
  .exec-grid { grid-template-columns: repeat(2, 1fr); }
  .about-open { padding: 6.5rem 0 3.5rem; }
  .ledger-row { grid-template-columns: 1fr; gap: .5rem; }
  .ledger-year { font-size: 1.3rem; }
  .legacy-card { grid-template-columns: 1fr; gap: 1rem; }
  .legacy-ico { width: 48px; height: 48px; }
}

/* ===================== PRODUCT DETAIL PAGES ===================== */
.pd-hero {
  position: relative; overflow: hidden;
  padding: 8.5rem 0 3rem;
}
.pd-hero .shell { position: relative; z-index: 1; }
.pd-hero-head { display: flex; align-items: center; gap: 1.1rem; margin: 1.4rem 0 1rem; }
.pd-ico-wrap {
  display: inline-grid; place-items: center; width: 72px; height: 72px; flex: none;
  border-radius: 18px; background: rgba(45, 212, 191, .08);
  border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.pd-ico { width: 40px; height: 40px; color: var(--teal-bright); filter: var(--icon-glow); }
.pd-title { font-family: var(--serif); color: var(--white); font-size: 2.4rem; line-height: 1.05; margin: 0; }
.pd-headline { font-family: var(--serif); color: var(--teal-bright); font-size: 1.45rem; line-height: 1.3; max-width: 26ch; margin: .4rem 0 1rem; }
.pd-lede { font-size: 1.05rem; max-width: 60ch; color: var(--silver); margin: 0 0 1.6rem; }

.pd-section { padding: 2.6rem 0; }
.pd-overview {
  max-width: 60ch; margin-inline: auto; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.4rem 2rem; box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.pd-overview-copy { font-size: 1.12rem; color: var(--silver); margin: .8rem 0 0; }

.pd-grid { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.pd-grid .bento-card h3 { color: var(--white); font-family: var(--sans); font-size: 1.05rem; margin: 0 0 .4rem; }
.pd-grid .bento-card p { font-size: .95rem; margin: 0; }

.pd-proof { background: linear-gradient(180deg, transparent, rgba(45,212,191,.04), transparent); }
.pd-highlights { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
.pd-highlights li { display: flex; gap: .9rem; align-items: flex-start; }
.pd-check {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(45, 212, 191, .12); color: var(--teal-bright);
  font-size: .85rem; font-weight: 700; margin-top: .15rem;
}
.pd-highlights strong { display: block; color: var(--white); font-weight: 600; }
.pd-highlights span { color: var(--silver); font-size: .95rem; }

.pd-metrics { margin: 2rem auto 0; max-width: 760px; }
.pd-cta { padding-bottom: 5rem; }

/* ---------- Product detail responsive ---------- */
@media (max-width: 980px) {
  .pd-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-title { font-size: 1.9rem; }
  .pd-ico-wrap { width: 60px; height: 60px; }
  .pd-ico { width: 34px; height: 34px; }
}

/* ===================== FLOATING LIVE CHAT ===================== */
.chat-widget {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 200;
  display: flex;
  flex-direction: column-reverse; /* panel opens ABOVE the chathead, not below */
  align-items: flex-end;
  gap: .8rem;
}

/* Floating action button */
.chat-fab {
  position: relative; /* anchor the absolute unread badge to the button itself */
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--on-teal);
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 30px rgba(0,128,128,.38);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,128,128,.5); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .chat-fab-close { display: none; }
.chat-fab.is-open .chat-fab-open { display: none; }
.chat-fab.is-open .chat-fab-close { display: block; }
.chat-fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: #fff;
  background: #ff5a5f; border-radius: 999px;
  box-shadow: 0 0 0 2px var(--card);
}
/* The hidden attribute must win over display:grid above, otherwise the badge
   shows as an empty red dot even when the count is 0 (setBadge hides via the
   hidden attribute, but display:grid would override display:none). */
.chat-fab-badge[hidden] { display: none !important; }

/* Panel */
.chat-panel {
  width: min(360px, calc(100vw - 2.8rem));
  background: var(--ink-strong);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: chatPop .22s var(--ease);
}
/* The hidden attribute must win over the display:flex below so the panel/
   body/intro actually collapse. Without this, the X/Min buttons appear to do
   nothing because CSS display would override the HTML hidden attribute. */
.chat-panel[hidden],
.chat-body[hidden],
.chat-intro[hidden] { display: none !important; }
@keyframes chatPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; border-bottom: 1px solid var(--border-soft);
}
.chat-head-actions { display: flex; gap: .25rem; }
.chat-title { display: block; color: var(--white); font-weight: 600; font-size: 1rem; }
.chat-sub { display: block; color: var(--silver); font-size: .76rem; }
.chat-icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; border-radius: 8px; color: var(--silver);
  transition: background .2s, color .2s;
}
.chat-icon-btn:hover { background: rgba(255,255,255,.08); color: var(--white); }
.chat-icon-btn svg { width: 18px; height: 18px; }

/* Identity gate */
.chat-intro { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.chat-intro-copy { margin: 0 0 .2rem; color: var(--silver); font-size: .86rem; line-height: 1.45; }
.chat-input {
  width: 100%; padding: .65rem .8rem; border-radius: 10px;
  background: rgba(255,255,255,.05); color: var(--white);
  border: 1px solid var(--border-soft); font: inherit; font-size: .9rem;
}
.chat-input:focus { outline: none; border-color: var(--teal-bright); }
.chat-input::placeholder { color: var(--silver); }
.chat-start { margin-top: .2rem; }
.chat-error { margin: .2rem 0 0; color: #ff8a80; font-size: .8rem; }

/* Conversation */
.chat-body { display: flex; flex-direction: column; min-height: 0; }
.chat-log {
  flex: 1 1 auto; overflow-y: auto; max-height: 320px;
  padding: 1rem; display: flex; flex-direction: column; gap: .55rem;
}
.chat-msg { display: flex; }
.chat-msg--visitor { justify-content: flex-end; }
.chat-msg--admin { justify-content: flex-start; }
.chat-bubble {
  max-width: 80%; padding: .55rem .8rem; border-radius: 14px;
  font-size: .9rem; line-height: 1.4; color: var(--white);
  background: rgba(45,212,191,.14); border: 1px solid var(--border-soft);
  position: relative;
}
.chat-msg--visitor .chat-bubble { background: var(--teal); color: var(--on-teal); border-color: transparent; border-bottom-right-radius: 4px; }
.chat-msg--admin .chat-bubble { border-bottom-left-radius: 4px; }
.chat-meta { display: block; margin-top: .25rem; font-size: .66rem; opacity: .6; text-align: right; }

.chat-compose { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--border-soft); }
.chat-text { flex: 1 1 auto; }
.chat-send {
  flex: none; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center; color: var(--on-teal);
  background: linear-gradient(135deg, var(--teal-bright), var(--teal)); border: 0;
  transition: transform .2s var(--ease);
}
.chat-send:hover { transform: translateY(-2px); }
.chat-send svg { width: 20px; height: 20px; }

@media (max-width: 480px) {
  .chat-widget { right: .9rem; bottom: .9rem; }
  .chat-panel { width: calc(100vw - 1.8rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .chat-panel { animation: none; }
  .chat-fab, .chat-send { transition: none; }
}
