/* ==========================================================================
   Perfai Security — Document stylesheet for embedded Community pages
   Mirrors the live homepage design language:
     bg #0D141A, IBM Plex Sans body, Montserrat headings, JetBrains Mono,
     metallic-pink CTA pill, glass surfaces, hairline borders.
   ========================================================================== */

/* Google Fonts are loaded site-wide via <link crossorigin="anonymous"> in index.html.
   Shadow-DOM embedded docs inherit those font faces, so no @import is needed here. */

:root{
  /* Surfaces */
  --bg:#0D141A;
  --surface-1:#131e27;
  --surface-2:#17242f;
  --surface-3:#1e2e3d;

  /* Text */
  --text-primary:#f1f4f8;
  --text-secondary:#dde3ed;
  --text-body:#c2cad8;
  --text-muted:#a8b6cc;
  --text-subtle:#8694ad;

  /* Borders */
  --border-subtle:rgba(241,244,248,0.10);
  --border-default:rgba(241,244,248,0.18);
  --border-strong:#44597d;
  --border-control:#2f4264;

  /* Metallic pink accent system (matches homepage) */
  --accent:#ff56c9;
  --accent-highlight:#ff9fde;
  --accent-base:#c93aa1;
  --accent-shadow:#4f1640;
  --accent-border:rgba(255,143,218,0.40);
  --accent-glow:rgba(255,86,201,0.32);
  --accent-soft:rgba(255,86,201,0.10);
  --accent-soft-strong:rgba(255,86,201,0.20);
  --accent-text:#fff0fa;

  --accent-gradient:linear-gradient(135deg, var(--accent-highlight) 0%, var(--accent-shadow) 50%, var(--accent-highlight) 100%);
  --accent-gradient-hover:linear-gradient(135deg,#ffb6e6 0%,#66194f 50%,#ffb6e6 100%);
  --text-gradient-pink:linear-gradient(135deg,#ffc7e9 0%,#ff56c9 100%);

  /* Status colors */
  --success:#7ee0a3;
  --warning:#f5c16c;
  --danger:#ff8c8c;
  --info:#9dc7ff;

  /* Fonts (homepage stack) */
  --font-body:'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading:'Montserrat', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Radius */
  --radius-sm:0.5rem;
  --radius-md:0.75rem;
  --radius-lg:1rem;
  --radius-xl:1.5rem;
  --radius-pill:999px;

  /* Shadows */
  --shadow-card:0 1px 0 hsl(213 27% 100% / 0.05) inset, 0 30px 80px -30px rgba(0,0,0,0.7);
  --shadow-glow:0 0 80px rgba(255,86,201,0.30);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;font-feature-settings:"ss01","ss02","cv01","cv11"}

body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text-primary);
  font-size:17px;
  line-height:1.65;
  max-width:880px;
  margin:0 auto;
  padding:2.75rem 2rem 5rem;
  -webkit-font-smoothing:antialiased;
}

p{color:var(--text-body)}
strong{color:var(--text-primary);font-weight:600}
a{color:var(--accent-highlight);text-decoration:none;transition:color .14s}
a:hover{color:var(--accent)}
::selection{background:var(--accent);color:var(--bg)}

/* ============================================================
   Typography — Montserrat headings, tight negative tracking,
   sentence-case (NOT uppercase) like the live homepage h2's.
   ============================================================ */
h1, h2, h3, h4, h5, h6, .hero h1{
  font-family:var(--font-heading);
  font-weight:700;
  font-size:clamp(1.3rem, 3.5vw, 2.1rem);
  line-height:1.12;
  letter-spacing:-0.02em;
  color:#ffffff;
  text-transform:none;
  margin-bottom:.6rem;
}


.accent, .text-gradient-pink, h1 .accent, .hero h1 .accent, .summary .gh{
  background:var(--text-gradient-pink);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
h1 .red, .red{color:var(--danger)}
h1 .green, .green{color:var(--success)}
.hl-pink{color:var(--accent-highlight);font-weight:600}
.hl-red{color:var(--danger);font-weight:600}
.hl-green{color:var(--success);font-weight:600}
u, .hero h1 u{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:5px;text-decoration-thickness:2px}

/* ============================================================
   Eyebrow / tag — homepage uses font-mono, 0.18em tracking,
   uppercase, muted color, with a glowing pink dot.
   ============================================================ */
.tag{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:1.25rem;
  display:flex;align-items:center;gap:10px;
}
.tag-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 12px rgba(255,86,201,0.8);
  display:inline-block;
}
.eyebrow, .hero .eyebrow, .doc-eyebrow, .cta-eyebrow{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:.85rem;
  font-style:normal;
}
.hero .eyebrow{color:var(--accent-highlight)}

/* ============================================================
   Hero — glass card, hairline border, subtle pink wash, NO heavy
   neon. Matches homepage section feel.
   ============================================================ */
.hero{
  position:relative;overflow:hidden;
  padding:2.25rem 2.25rem 2rem;
  background:linear-gradient(180deg, hsl(208 33% 12% / 0.92), hsl(208 33% 8% / 0.92));
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-card);
  margin-bottom:1.75rem;
  color:var(--text-primary);
}
.hero::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255,86,201,0.10), transparent 65%);
}
.hero > *{position:relative}
.hero-sub{font-size:1rem;color:var(--text-body);line-height:1.7;margin-top:.5rem;max-width:62ch}
.hero-sub strong{color:var(--text-primary)}
.hero-sub .redacted, .redacted{color:var(--accent-highlight);font-weight:600}
.hero .badge{
  position:absolute;top:1.5rem;right:1.75rem;
  font-family:var(--font-mono);
  font-size:10.5px;color:var(--text-muted);
  letter-spacing:0.06em;text-align:right;line-height:1.55;font-weight:400;
}

/* ============================================================
   Narrative / Story / DRM
   ============================================================ */
.narrative{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:1.5rem}
.story{
  background:linear-gradient(180deg, hsl(208 33% 12% / 0.92), hsl(208 33% 8% / 0.92));
  border:1px solid var(--accent-border);
  border-left:2px solid var(--accent);
  border-radius:var(--radius-lg);
  padding:1.5rem;color:var(--text-primary);
}
.story h3{font-family:var(--font-heading);font-size:15px;font-weight:600;margin-bottom:.6rem;line-height:1.3;color:var(--text-primary);letter-spacing:-0.02em}
.story p{font-size:14px;color:var(--text-body);line-height:1.7}
.story strong{color:var(--text-primary)}

.drm{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px;
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.5rem;color:var(--text-primary);
}
.drm h4{font-family:var(--font-heading);font-size:14px;font-weight:600;margin-bottom:.5rem;color:var(--text-primary);letter-spacing:-0.015em}
.drm p{font-size:13px;color:var(--text-body);line-height:1.65}
.drm .ic{font-size:20px;margin-bottom:.5rem;color:var(--accent);filter:drop-shadow(0 0 8px rgba(255,86,201,0.4))}

/* ============================================================
   Summary band — uses surface, not loud gradient
   ============================================================ */
.summary{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-left:2px solid var(--accent);
  border-radius:var(--radius-lg);
  padding:1.4rem 1.6rem;color:var(--text-body);
  font-size:14.5px;line-height:1.75;margin-bottom:1.5rem;
}
.summary strong{color:var(--text-primary)}

/* ============================================================
   Stats — homepage stat grid: number in heading font, small mono label
   ============================================================ */
.stats{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.5rem 1.25rem;margin-bottom:1.75rem;
  color:var(--text-primary);
  display:grid;grid-template-columns:repeat(6,1fr);gap:14px;text-align:center;
}
.stat .k{
  font-family:var(--font-mono);
  font-size:10px;font-weight:500;
  color:var(--text-muted);
  letter-spacing:0.14em;text-transform:uppercase;
  display:block;margin-bottom:.55rem;
  background:none;padding:0;border:0;border-radius:0;
}
.stat .v{
  font-family:var(--font-heading);
  font-size:1.5rem;font-weight:700;
  color:var(--text-primary);
  letter-spacing:-0.03em;line-height:1;
}

@media(max-width:780px){.stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){.stats{grid-template-columns:repeat(2,1fr)}}

.stat-card{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.4rem 1.1rem;color:var(--text-primary);text-align:center;
  display:flex;flex-direction:column;justify-content:center;
}
.stat-card .label{
  font-family:var(--font-mono);
  font-size:10.5px;font-weight:500;
  color:var(--text-muted);
  letter-spacing:0.14em;text-transform:uppercase;
  margin-bottom:.5rem;line-height:1.35;
}
.stat-card .big{
  font-family:var(--font-heading);
  font-size:2.25rem;font-weight:700;
  color:var(--text-primary);
  letter-spacing:-0.035em;line-height:1;margin:.35rem 0;
}
.stat-card .sub{font-size:13px;color:var(--text-muted)}

.row{display:grid;grid-template-columns:1fr 1.6fr;gap:14px;margin-bottom:1.25rem;align-items:stretch}
.row.alt{grid-template-columns:1.6fr 1fr}
.two,.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:1.5rem}
.section{margin-bottom:1.5rem}

/* ============================================================
   Section card — glass surface treatment
   ============================================================ */
.section-card{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.5rem 1.75rem;color:var(--text-primary);
}
.section-card.row{display:grid;grid-template-columns:64px 1fr;gap:1.25rem;align-items:start}

.icon-tile{
  width:56px;height:56px;border-radius:var(--radius-md);
  display:flex;align-items:center;justify-content:center;font-size:22px;
  background:var(--accent-soft);color:var(--accent);
  border:1px solid var(--accent-border);
}
.it-blue{background:rgba(157,199,255,0.10);color:var(--info);border-color:rgba(157,199,255,0.30)}
.it-teal,.it-mint{background:rgba(126,224,163,0.10);color:var(--success);border-color:rgba(126,224,163,0.30)}
.it-red{background:rgba(255,140,140,0.10);color:var(--danger);border-color:rgba(255,140,140,0.30)}

/* ============================================================
   Lists
   ============================================================ */
ul.bullets, ol.numbered{list-style:none;padding:0}
ul.bullets li{position:relative;padding-left:18px;font-size:14.5px;color:var(--text-body);line-height:1.7;margin-bottom:.5rem}
ul.bullets li::before{content:'';position:absolute;left:4px;top:10px;width:5px;height:5px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px rgba(255,86,201,0.6)}
ul.bullets strong{color:var(--text-primary)}
ol.numbered{counter-reset:n;padding-left:0}
ol.numbered li{counter-increment:n;position:relative;padding-left:28px;font-size:14.5px;color:var(--text-body);line-height:1.75;margin-bottom:.45rem}
ol.numbered li::before{content:counter(n,decimal-leading-zero);position:absolute;left:0;top:0;color:var(--accent-highlight);font-weight:500;font-family:var(--font-mono);font-size:12px;letter-spacing:0.04em}

/* ============================================================
   Example block (enterprise-api)
   ============================================================ */
.example{margin-bottom:1rem}
.example .ex-title{font-family:var(--font-heading);font-size:14px;font-weight:600;color:var(--text-primary);margin-bottom:.25rem;letter-spacing:-0.015em}
.example .ex-body{font-size:13.5px;color:var(--text-body);line-height:1.7}
.example .ex-arrow{margin-top:.4rem;padding-left:14px;font-size:13px;color:var(--text-muted);border-left:2px solid var(--accent);margin-left:4px;line-height:1.6}

/* ============================================================
   Solution / numbered steps
   ============================================================ */
.solution{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:2rem 1.75rem;margin-top:.5rem;
}
.solution-title{
  text-align:center;
  font-family:var(--font-mono);
  font-size:11px;font-weight:500;color:var(--text-muted);
  letter-spacing:0.18em;text-transform:uppercase;
  margin-bottom:1.4rem;
  display:flex;align-items:center;justify-content:center;gap:10px;
}
.solution-title .pill{
  border:1px solid var(--accent-border);
  border-radius:var(--radius-pill);
  padding:8px 22px;
  display:inline-flex;align-items:center;gap:10px;
  background:var(--accent-soft);
  color:var(--text-primary);
  font-family:var(--font-mono);
  letter-spacing:0.14em;
}
.step{display:grid;grid-template-columns:42px 1fr;gap:14px;margin-bottom:1.1rem;align-items:start}
.step-num{
  width:34px;height:34px;border-radius:50%;
  background:var(--accent-gradient);
  color:var(--accent-text);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-heading);font-size:14px;font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,230,236,0.28),
             inset 0 0 0 1px var(--accent-border),
             0 8px 18px -6px var(--accent-glow);
}
.step-h{font-family:var(--font-heading);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:.3rem;letter-spacing:-0.015em}
.step ul{padding-left:0;list-style:none}
.step ul li{position:relative;padding-left:16px;font-size:14px;color:var(--text-body);line-height:1.7;margin-bottom:.3rem}
.step ul li::before{content:'';position:absolute;left:3px;top:10px;width:4px;height:4px;border-radius:50%;background:var(--accent)}

/* ============================================================
   Card (outsourced / replit)
   ============================================================ */
.card{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.5rem;color:var(--text-primary);
}
.card h3{
  font-family:var(--font-mono);
  font-size:11px;font-weight:500;
  color:var(--text-muted);
  letter-spacing:0.18em;text-transform:uppercase;
  margin-bottom:.75rem;padding-bottom:.6rem;
  border-bottom:1px solid var(--border-subtle);
}
.card p{font-size:14px;color:var(--text-body);line-height:1.7}

/* ============================================================
   Panel (finops / telehealth)
   ============================================================ */
.panel{
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:1.5rem 1.75rem;color:var(--text-primary);
  margin-bottom:1.25rem;
}
.panel h2{
  font-family:var(--font-heading);
  font-size:1.0625rem;font-weight:600;
  color:var(--text-primary);
  margin-bottom:.65rem;
  text-transform:none;letter-spacing:-0.02em;
}
.panel h2::before{
  content:'';display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--accent);box-shadow:0 0 10px rgba(255,86,201,0.7);
  margin-right:10px;vertical-align:middle;transform:translateY(-2px);
}
.panel p, .panel li{font-size:14px;color:var(--text-body);line-height:1.75}
.panel strong{color:var(--text-primary)}
.panel ul{padding-left:18px;margin-top:.25rem;list-style:disc}
.panel ul li{margin-bottom:.5rem}
.panel ul li::marker{color:var(--accent)}
.panel ul ul{margin-top:.3rem;margin-bottom:.3rem}
.panel .cats{list-style:none;padding:0}
.panel .cats li{padding-left:18px;position:relative;margin-bottom:.7rem;font-size:14px}
.panel .cats li::before{content:'';position:absolute;left:4px;top:9px;width:5px;height:5px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px rgba(255,86,201,0.6)}
.panel ul li .sub{font-size:13px;color:var(--text-muted);padding-left:14px;position:relative;display:block;margin-top:2px}
.panel ul li .sub::before{content:'◦';position:absolute;left:0;color:var(--accent)}

/* ============================================================
   Breach pill
   ============================================================ */
.breach{
  background:var(--surface-1);
  border:1px solid var(--accent-border);
  border-radius:var(--radius-md);
  padding:1rem 1.5rem;color:var(--text-primary);
  text-align:center;margin-bottom:1.5rem;
}
.breach .lbl, .breach .label{
  font-family:var(--font-mono);
  font-size:11px;font-weight:500;
  color:var(--text-muted);letter-spacing:0.14em;text-transform:uppercase;
  margin-bottom:.35rem;
}
.breach .val{font-family:var(--font-heading);font-size:1.25rem;font-weight:700;color:var(--text-primary);letter-spacing:-0.02em}

/* ============================================================
   Stat trio (supply-chain)
   ============================================================ */
.stat3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:1.75rem}
.stat-c{background:var(--surface-1);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);padding:1.4rem 1.25rem}
.stat-n{font-family:var(--font-heading);font-size:2rem;font-weight:700;line-height:1;margin-bottom:8px;letter-spacing:-0.035em;color:var(--text-primary)}
.stat-l{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);line-height:1.45;text-transform:uppercase;letter-spacing:0.14em}
.n-blue{color:var(--info)} .n-red{color:var(--danger)} .n-green{color:var(--success)}

/* ============================================================
   Results (supply-chain)
   ============================================================ */
.results{
  margin-top:1.75rem;
  background:var(--surface-1);
  border:1px solid var(--border-subtle);
  border-left:2px solid var(--accent);
  border-radius:var(--radius-lg);
  padding:1.5rem 1.75rem;
}
.results h2{color:var(--text-primary);margin-bottom:1rem}
.results-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.85rem 1.5rem}
.check{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text-primary);font-weight:500}
.check svg{flex-shrink:0;color:var(--accent)}

/* ============================================================
   CTA — homepage .btn-primary metallic pink pill
   ============================================================ */
.cta-box{
  background:linear-gradient(180deg, hsl(208 33% 12% / 0.92), hsl(208 33% 8% / 0.92));
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-xl);
  padding:2.25rem 2rem;text-align:center;margin-top:2.5rem;
  position:relative;overflow:hidden;
  box-shadow:var(--shadow-card);
}
.cta-box::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255,86,201,0.10), transparent 60%);
}
.cta-box > *{position:relative}
.cta-box h3{
  font-family:var(--font-heading);
  font-size:1.375rem;font-weight:700;
  color:var(--text-primary);
  letter-spacing:-0.025em;
  margin:0 0 .5rem;text-transform:none;
}
.cta-box p{font-size:14px;color:var(--text-muted);margin-bottom:1.35rem}

.cta-btn, .btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  min-height:46px;padding:0 1.5rem;
  font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1;
  letter-spacing:0.01em;
  color:var(--accent-text);
  background:var(--accent-gradient);
  background-size:200% 200%;
  background-position:30% 30%;
  border:none;
  border-radius:var(--radius-pill);
  text-decoration:none;
  box-shadow:
    inset 0 1px 0 rgba(255,230,236,0.28),
    inset 0 0 0 1px var(--accent-border),
    inset 0 -1px 0 rgba(0,0,0,0.32),
    0 1px 0 rgba(0,0,0,0.45),
    0 10px 24px -10px var(--accent-glow);
  transition:background-position .22s ease, box-shadow .14s ease, transform .14s ease;
  cursor:pointer;
}
.cta-btn:hover, .btn-primary:hover{
  background:var(--accent-gradient-hover);
  background-size:200% 200%;
  background-position:70% 30%;
  transform:translateY(-1px);
  color:var(--accent-text);
  box-shadow:
    inset 0 1px 0 rgba(255,230,236,0.34),
    inset 0 0 0 1px var(--accent-highlight),
    inset 0 -1px 0 rgba(0,0,0,0.32),
    0 1px 0 rgba(0,0,0,0.45),
    0 14px 30px -10px var(--accent-glow);
}

.btn-secondary{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  min-height:46px;padding:0 1.25rem;
  font-family:var(--font-body);font-size:.9375rem;font-weight:600;
  color:var(--text-primary);text-decoration:none;
  background:rgba(241,244,248,0.025);
  border:none;border-radius:var(--radius-pill);
  box-shadow:inset 0 0 0 1px var(--border-control);
  transition:background .14s, box-shadow .14s, transform .14s;
}
.btn-secondary:hover{
  background:rgba(241,244,248,0.06);
  box-shadow:inset 0 0 0 1px var(--border-strong);
  transform:translateY(-1px);
  color:var(--text-primary);
}

/* Hairline divider helper */
.hairline{
  height:1px;border:0;
  background-image:linear-gradient(90deg, transparent, var(--border-strong) 50%, transparent);
  margin:2rem 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media(max-width:680px){
  body{padding:1.5rem 1.25rem 4rem;font-size:16px}
  .hero{padding:1.75rem 1.5rem}
  .hero .badge{position:static;text-align:left;margin-bottom:.75rem}
  .narrative,.drm,.two,.two-col,.row,.row.alt,.stat3,.results-grid{grid-template-columns:1fr}
  .stats{grid-template-columns:repeat(2,1fr)}
  .section-card.row{grid-template-columns:1fr;gap:1rem}
  .icon-tile{width:48px;height:48px;font-size:20px}
}
