/* ===========================
   PassGuard — Main Stylesheet
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #09090b;
  --surface:   #111113;
  --surface2:  #1a1a1f;
  --surface3:  #222228;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #f4f4f5;
  --muted:     #71717a;
  --muted2:    #52525b;
  --accent:    #a3e635;        /* lime green */
  --accent2:   #84cc16;
  --teal:      #2dd4bf;
  --amber:     #fbbf24;
  --blue:      #60a5fa;
  --pink:      #f472b6;
  --red:       #f87171;
  --orange:    #fb923c;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;

  --grad-accent: linear-gradient(135deg, #a3e635 0%, #2dd4bf 100%);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- BG CANVAS ---- */
#bg-canvas {
  position: fixed;
  inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

.noise {
  position: fixed;
  inset: 0; z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
}

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(9,9,11,0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex; align-items: center; gap: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
}
.logo-icon { color: var(--accent); }

.nav-links {
  display: flex; gap: 0.25rem; margin-left: 1rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }

.nav-cta {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  transition: opacity 0.2s;
  font-family: var(--font-display);
}
.nav-cta:hover { opacity: 0.85; }

/* ---- HERO ---- */
.hero {
  position: relative; z-index: 2;
  max-width: 800px; margin: 0 auto;
  padding: 160px 2rem 100px;
  text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--accent);
  background: rgba(163,230,53,0.08);
  border: 1px solid rgba(163,230,53,0.2);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  animation: fadeUp 0.6s ease both;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-accent {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px; margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-cta-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 4rem;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border2);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem;
  animation: fadeUp 0.6s 0.4s ease both;
}
.hstat { text-align: center; }
.hstat-val {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 800;
  background: var(--grad-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.hstat-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hstat-div { width: 1px; height: 40px; background: var(--border2); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ---- CHECKER SECTION ---- */
.checker-section {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem 100px;
}

.checker-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
}

.checker-card {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2px;
  background: var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border2);
}

.checker-left {
  background: var(--surface);
  padding: 2.5rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}

.checker-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.checker-header p { font-size: 13px; color: var(--muted); }

/* Input */
.input-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; font-family: var(--font-mono); }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pw-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 14px 50px 14px 46px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pw-field:focus {
  border-color: rgba(163,230,53,0.35);
  box-shadow: 0 0 0 3px rgba(163,230,53,0.06);
}
.pw-field::placeholder { color: var(--muted2); font-family: var(--font-body); letter-spacing: normal; }
.toggle-btn {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  transition: color 0.15s; display: flex;
}
.toggle-btn:hover { color: var(--text); }

/* Strength bar */
.strength-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.strength-word { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--muted); transition: color 0.3s; }
.strength-score { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.strength-track {
  height: 6px; background: var(--surface3);
  border-radius: 999px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 999px;
  width: 0%; transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1), background 0.4s;
  background: var(--muted2);
}

/* Checks grid */
.checks-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.check-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  transition: all 0.25s;
  font-family: var(--font-mono);
}
.check-pill.ok {
  background: rgba(163,230,53,0.06);
  border-color: rgba(163,230,53,0.25);
  color: var(--accent);
}
.check-pill svg { flex-shrink: 0; }

/* Suggestions */
.suggestions { display: none; }
.sug-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--amber);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.suggestions ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.suggestions li {
  font-size: 13px; color: var(--muted);
  padding: 8px 12px;
  background: rgba(251,191,36,0.04);
  border: 1px solid rgba(251,191,36,0.12);
  border-left: 2px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* Right panel */
.checker-right {
  background: var(--surface2);
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}

.score-card { text-align: center; }
.score-ring-wrap { position: relative; display: inline-block; margin-bottom: 1rem; }
.score-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface3); stroke-width: 10; }
.ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.34,1.56,0.64,1), stroke 0.4s;
}
.score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-num {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800;
  line-height: 1;
  color: var(--text);
  transition: color 0.3s;
}
.score-max { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.score-label { font-size: 14px; color: var(--muted); font-family: var(--font-mono); }

/* Breakdown */
.bk-title {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted2);
  margin-bottom: 10px; font-family: var(--font-mono);
}
.bk-item {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.bk-item:last-child { border-bottom: none; }
.bk-pts { font-weight: 500; color: var(--muted2); transition: color 0.2s; }
.bk-pts.earned { color: var(--accent); }
.bk-penalty .bk-pts.earned { color: var(--red); }

/* API badge */
.api-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted);
  font-family: var(--font-mono);
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-top: auto;
}
.api-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted2); flex-shrink: 0;
  transition: background 0.3s;
}
.api-dot.connected { background: var(--accent); animation: pulse 2s infinite; }
.api-dot.offline { background: var(--red); }

/* ---- TIPS ---- */
.tips-section {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem 100px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.section-sub { font-size: 1rem; color: var(--muted); max-width: 480px; margin-bottom: 3rem; }

.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tip-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.tip-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.tip-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.tip-icon--teal  { background: rgba(45,212,191,0.1); color: var(--teal); }
.tip-icon--amber { background: rgba(251,191,36,0.1); color: var(--amber); }
.tip-icon--blue  { background: rgba(96,165,250,0.1); color: var(--blue); }
.tip-icon--pink  { background: rgba(244,114,182,0.1); color: var(--pink); }
.tip-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.6rem; }
.tip-card p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.tip-card code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--surface2); padding: 1px 6px;
  border-radius: 4px; color: var(--accent);
}

/* ---- API DOCS ---- */
.api-section {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem 100px;
}
.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 2rem; }
.api-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.api-card--featured { border-color: rgba(163,230,53,0.25); background: rgba(163,230,53,0.03); }
.api-method {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px;
  display: inline-block; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.api-method.get  { background: rgba(96,165,250,0.12); color: var(--blue); }
.api-method.post { background: rgba(163,230,53,0.12); color: var(--accent); }
.api-endpoint {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text); margin-bottom: 8px; word-break: break-all;
}
.api-desc { font-size: 13px; color: var(--muted); margin-bottom: 1rem; line-height: 1.6; }

.code-block {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1.7;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
  overflow-x: auto;
  color: var(--muted);
  white-space: pre;
}
.code-block--wide { max-width: 520px; }
.c-comment { color: var(--muted2); }
.c-key  { color: var(--blue); }
.c-str  { color: var(--accent); }
.c-num  { color: var(--amber); }
.c-bool { color: var(--pink); }
.c-bracket { color: var(--teal); }

.response-block .response-title {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  margin-bottom: 10px; font-family: var(--font-mono);
}

/* ---- FOOTER ---- */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.75rem;
}
.footer-note { font-size: 13px; color: var(--muted2); margin-top: 4px; font-family: var(--font-mono); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .checker-card { grid-template-columns: 1fr; }
  .checker-right { display: none; }
  .api-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .checks-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .hero { padding: 120px 1.25rem 70px; }
  .hero-stats { gap: 1.25rem; }
  .checker-section, .tips-section, .api-section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .checker-left { padding: 1.5rem; }
  .checks-grid { grid-template-columns: 1fr 1fr; }
}
