/* ============================================================
   HexShield — Custom Stylesheet
   Typography-first, minimalist dark theme
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-bg:          #0A0E17;
  --color-bg-alt:      #0F1420;
  --color-bg-card:     #141925;
  --color-bg-elevated: #1A1F2E;
  --color-border:      rgba(255, 255, 255, 0.06);
  --color-border-glow: rgba(59, 130, 246, 0.15);

  --color-text:        #E2E8F0;
  --color-text-muted:  #94A3B8;
  --color-text-dim:    #8FA1B8;

  --color-accent:      #2563EB;
  --color-accent-hover:#1D4ED8;
  --color-green:       #10B981;
  --color-green-hover: #059669;

  /* Typography Scale (modular — 1.250 ratio) */
  --fs-xs:    0.75rem;    /* 12px */
  --fs-sm:    0.875rem;   /* 14px */
  --fs-base:  1rem;       /* 16px */
  --fs-md:    1.125rem;   /* 18px */
  --fs-lg:    1.25rem;    /* 20px */
  --fs-xl:    1.5rem;     /* 24px */
  --fs-2xl:   2rem;       /* 32px */
  --fs-3xl:   2.5rem;     /* 40px */
  --fs-4xl:   3.25rem;    /* 52px */
  --fs-5xl:   4rem;       /* 64px */

  /* Font Families */
  --ff-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;

  /* Spacing */
  --space-section: 7rem;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Typography System ---------- */

/* Display — hero headlines */
.display-hero {
  font-family: var(--ff-heading);
  font-size: clamp(2.5rem, 5vw + 1rem, var(--fs-5xl));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
}

/* H1 — page titles */
h1, .h1 {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 4vw + 0.5rem, var(--fs-4xl));
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}

/* H2 — section titles */
h2, .h2 {
  font-family: var(--ff-heading);
  font-size: clamp(1.5rem, 3vw + 0.25rem, var(--fs-3xl));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #fff;
}

/* H3 — card titles, subsections */
h3, .h3 {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
}

/* H4 — small headings */
h4, .h4 {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: #fff;
}

/* H5/-6 */
h5, .h5 { font-size: var(--fs-md); font-weight: 600; color: #fff; }
h6, .h6 { font-size: var(--fs-base); font-weight: 600; color: var(--color-text); text-transform: uppercase; letter-spacing: 0.08em; }

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* Override Bootstrap .text-muted for dark theme */
.text-muted {
  color: var(--color-text-muted) !important;
}

/* Lead paragraph */
.lead {
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Label / overline */
.overline {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #93C5FD;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* Monospace / code */
.mono, code {
  font-family: var(--ff-mono);
  font-size: 0.9em;
}

/* ---------- Links ---------- */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--color-accent-hover);
}

/* ---------- Navbar ---------- */
.navbar-ls {
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 0;
  transition: all var(--transition);
  z-index: 1050;
}

.navbar-ls .navbar-brand {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.navbar-ls .navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-green));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.navbar-ls .navbar-brand:hover {
  color: #fff;
}

.navbar-ls .nav-link {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem !important;
  transition: color var(--transition);
  letter-spacing: -0.01em;
}
.navbar-ls .nav-link:hover,
.navbar-ls .nav-link.active {
  color: #fff;
}

.navbar-ls .navbar-toggler {
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.65rem;
}
.navbar-ls .navbar-toggler-icon {
  filter: invert(1);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: none;
}

.btn-primary-ls {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
}
.btn-primary-ls:hover {
  background: var(--color-accent-hover);
  color: #fff;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.btn-outline-ls {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline-ls:hover {
  background: var(--color-bg-elevated);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.btn-green-ls {
  background: var(--color-green);
  color: #fff;
}
.btn-green-ls:hover {
  background: var(--color-green-hover);
  color: #fff;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.85rem 2.25rem;
  font-size: var(--fs-base);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-section) 0;
}
.section-sm {
  padding: 4rem 0;
}

/* Section header */
.section-header {
  margin-bottom: 4rem;
  max-width: 640px;
}
.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
}
.section-header p {
  margin-top: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero .lead {
  max-width: 560px;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 3rem;
}
.stat-item {
  background: var(--color-bg-card);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #fff;
  display: block;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  margin-top: 0.25rem;
  display: block;
}

@media (max-width: 767px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; padding-top: 8rem; }
}

/* ---------- Cards ---------- */
.card-ls {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  height: 100%;
}
.card-ls:hover {
  border-color: var(--color-border-glow);
  background: var(--color-bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.card-ls .card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(59, 130, 246, 0.15);
}
.card-ls .card-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-green);
  border-color: rgba(16, 185, 129, 0.15);
}

.card-ls h3 {
  font-size: var(--fs-md);
  margin-bottom: 0.75rem;
}
.card-ls p {
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ---------- Feature Detail Cards ---------- */
.feature-detail {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 2rem;
}
.feature-detail h3 {
  font-size: var(--fs-xl);
  margin-bottom: 1rem;
}
.feature-detail .key-points {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
}
.feature-detail .key-points li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
.feature-detail .key-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.screenshot-placeholder {
  background: var(--color-bg-alt);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-dim);
  font-size: var(--fs-sm);
  font-family: var(--ff-mono);
  margin-top: 1.5rem;
}

/* ---------- Steps (How It Works) ---------- */
.step-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  height: 100%;
}
.step-number {
  font-family: var(--ff-mono);
  font-size: var(--fs-5xl);
  font-weight: 700;
  color: rgba(59, 130, 246, 0.1);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}
.step-card h3 {
  margin-bottom: 1rem;
}

.code-block {
  background: #0D1117;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--color-green);
  line-height: 1.8;
}
.code-block .comment {
  color: var(--color-text-dim);
}

/* ---------- Use Case Cards ---------- */
.usecase-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  height: 100%;
  transition: all var(--transition);
}
.usecase-card:hover {
  border-color: var(--color-border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.usecase-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: block;
}
.usecase-card h3 {
  font-size: var(--fs-md);
  margin-bottom: 0.75rem;
}
.usecase-card p {
  font-size: var(--fs-sm);
}

/* ---------- Differentiator Blocks ---------- */
.diff-block {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  height: 100%;
}
.diff-block h4 {
  font-size: var(--fs-md);
  margin-bottom: 0.75rem;
}
.diff-block p {
  font-size: var(--fs-sm);
  margin-bottom: 0;
}

/* ---------- Table ---------- */
.table-ls {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.table-ls thead th {
  background: var(--color-bg-elevated);
  color: #fff;
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.table-ls tbody td {
  padding: 0.85rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
}
.table-ls tbody tr:last-child td {
  border-bottom: none;
}
.table-ls tbody td:first-child {
  color: #fff;
  font-weight: 500;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 5rem 0;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 100%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 {
  margin-bottom: 1rem;
}
.cta-section p {
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ---------- Contact Form ---------- */
.form-ls .form-label {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.form-ls .form-control,
.form-ls .form-select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-ls .form-control:focus,
.form-ls .form-select:focus {
  background: var(--color-bg-elevated);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  color: #fff;
}
.form-ls .form-control::placeholder {
  color: var(--color-text-dim);
}

/* Contact sidebar */
.contact-sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}
.contact-sidebar h4 {
  font-size: var(--fs-md);
  margin-bottom: 1.5rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.contact-item i {
  color: var(--color-accent);
  margin-top: 0.2rem;
}
.contact-item span {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}
.faq-item .accordion-button {
  background: transparent;
  color: #fff;
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 1.15rem 1.5rem;
  box-shadow: none;
  border-radius: var(--radius-md) !important;
}
.faq-item .accordion-button:not(.collapsed) {
  background: var(--color-bg-elevated);
  color: var(--color-accent);
}
.faq-item .accordion-button::after {
  filter: invert(1) brightness(0.6);
}
.faq-item .accordion-button:not(.collapsed)::after {
  filter: invert(0.5) sepia(1) saturate(5) hue-rotate(190deg);
}
.faq-item .accordion-body {
  padding: 0 1.5rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer-ls {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
}
.footer-ls .footer-brand {
  font-family: var(--ff-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.footer-ls .footer-tagline {
  font-size: var(--fs-sm);
  color: var(--color-text-dim);
  margin-top: 0.5rem;
}
.footer-ls .footer-links a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  transition: color var(--transition);
}
.footer-ls .footer-links a:hover {
  color: #fff;
}
.footer-ls .footer-copy {
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ---------- Page Header ---------- */
.page-header {
  padding: 8rem 0 4rem;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Divider ---------- */
.divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-green));
  border-radius: 4px;
  margin: 1.5rem 0;
}
.divider.center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Badge / Pill ---------- */
.badge-ls {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(59, 130, 246, 0.15);
  letter-spacing: 0.03em;
}

/* ---------- Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * { transition-delay: 0s; }
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.stagger > *:nth-child(6) { transition-delay: 0.4s; }

/* ---------- Glow border effect ---------- */
.glow-border {
  position: relative;
}
.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), transparent, rgba(16,185,129,0.2));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}
.glow-border:hover::after {
  opacity: 1;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 991px) {
  :root {
    --space-section: 5rem;
  }
  .feature-detail { padding: 2rem; }
}

@media (max-width: 767px) {
  :root {
    --space-section: 3.5rem;
  }
  .section-header { margin-bottom: 2.5rem; }
  .feature-detail { padding: 1.5rem; }
  .step-card { padding: 1.5rem; }
  .cta-section { padding: 3.5rem 0; }
  .page-header { padding: 7rem 0 3rem; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-bg-elevated);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-dim);
}
