/* QuietBlade Biometrics — Elegant Classic theme (mobile-first, flexbox-only) */
/* ------------------------------------------------------------- */
/* Reset & base normalize */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding-left: 1.2rem; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

/* CSS Custom Properties (with fallbacks) */
:root {
  --primary: #0F1E2E; /* deep navy */
  --secondary: #0AA0A8; /* teal */
  --accent: #F5FAFF; /* light accent */
  --surface: #FFFFFF;
  --paper: #F7F5F2; /* muted, classic paper tone */
  --ink: #0F1E2E; /* primary text */
  --ink-soft: #2C3A4A;
  --muted-ink: #5A6776;
  --border: #D9DFE6;
  --shadow: 0 8px 20px rgba(15,30,46,0.08), 0 2px 6px rgba(15,30,46,0.06);
  --radius-s: 6px;  
  --radius-m: 10px;
  --radius-l: 14px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-60: 60px; --space-80: 80px;
}

/* Typography — Elegant Classic: serif headings, clear Verdana body */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  font-size: 16px; line-height: 1.7; color: var(--ink); background: var(--surface);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", Times, serif; /* classic serif for elegance */ color: var(--primary); letter-spacing: 0.2px; }

h1 { font-size: 40px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 28px; line-height: 1.3; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 700; }

p { font-size: 16px; color: var(--ink-soft); }
small { font-size: 14px; color: var(--muted-ink); }
strong { color: var(--ink); }

/* Layout scaffolding — Flexbox everywhere */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-20); display: flex; justify-content: center; }
.content-wrapper { width: 100%; display: flex; flex-direction: column; gap: var(--space-20); }
.text-section { display: flex; flex-direction: column; gap: var(--space-16); max-width: 900px; }

/* Sections: global spacing matching elegant proportions */
section { margin-bottom: var(--space-60); padding: var(--space-40) var(--space-20); display: flex; }
section .container { width: 100%; }

/* MANDATORY SPACING AND ALIGNMENT PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Header */
header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 1000; }
header .container { align-items: center; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-12) 0; }
.logo img { height: 36px; width: auto; }

/* Primary navigation */
.main-nav { display: none; align-items: center; gap: var(--space-20); }
.main-nav a { font-family: "Trebuchet MS", Segoe UI, Arial, sans-serif; /* brand display font lightly used */
  font-size: 15px; color: var(--ink-soft); padding: 8px 6px; border-radius: var(--radius-s);
  transition: color .2s ease, background-color .2s ease;
}
.main-nav a:hover { color: var(--primary); background: var(--accent); text-decoration: none; }

/* Header CTAs */
.header-ctas { display: none; align-items: center; gap: var(--space-12); }
.header-ctas a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: var(--radius-s); font-weight: 700; font-size: 15px; line-height: 1; border: 1px solid var(--secondary); transition: all .25s ease; }
.header-ctas a:first-child { background: transparent; color: var(--secondary); }
.header-ctas a:first-child:hover { background: var(--accent); }
.header-ctas a:last-child { background: var(--secondary); color: #fff; border-color: var(--secondary); box-shadow: 0 4px 10px rgba(10,160,168,0.18); }
.header-ctas a:last-child:hover { filter: brightness(0.95); box-shadow: 0 6px 16px rgba(10,160,168,0.28); text-decoration: none; }

/* In-content CTAs (anchors shown as buttons right under headings/paragraphs) */
.content-wrapper > div > a,
.text-section > div > a { display: inline-flex; align-items: center; justify-content: center; margin-right: var(--space-12); margin-bottom: var(--space-12); padding: 10px 16px; border-radius: var(--radius-s); border: 1px solid var(--secondary); font-weight: 700; font-size: 15px; transition: all .25s ease; }
.content-wrapper > div > a:nth-child(1) { background: var(--secondary); color: #fff; }
.content-wrapper > div > a:nth-child(1):hover { filter: brightness(0.96); text-decoration: none; }
.content-wrapper > div > a:nth-child(2) { background: transparent; color: var(--secondary); }
.content-wrapper > div > a:nth-child(2):hover { background: var(--accent); text-decoration: none; }

/* Lists — refined spacing */
ul li, ol li { margin-bottom: 10px; color: var(--ink-soft); }
ul li strong, ol li strong { color: var(--ink); }

/* Cards (generic) */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow); padding: var(--space-20); display: flex; flex-direction: column; gap: var(--space-12); }

/* Testimonials — light surfaces, high contrast text for readability */
.testimonial-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.testimonial-card p { color: var(--ink); }
.testimonial-card p:first-child { font-family: Georgia, "Times New Roman", Times, serif; font-size: 18px; line-height: 1.6; }

/* Footer */
footer { background: var(--paper); border-top: 1px solid var(--border); }
footer .content-wrapper { flex-direction: column; gap: var(--space-20); padding: var(--space-32) 0; }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
footer nav a { color: var(--ink-soft); font-size: 15px; padding: 6px 8px; border-radius: var(--radius-s); transition: background-color .2s ease, color .2s ease; }
footer nav a:hover { background: var(--accent); color: var(--primary); text-decoration: none; }
footer .text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* Text-image sections (if used) */
.text-image-section { align-items: center; }
.text-image-section > * { flex: 1 1 260px; }

/* Content grids (if used) */
.content-grid > * { flex: 1 1 260px; }

/* Accent sections (optional) */
section:nth-of-type(odd) .content-wrapper.text-section { background: transparent; }
section:nth-of-type(1) { background: var(--accent); border-bottom: 1px solid var(--border); }

/* Mobile navigation (burger) */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; color: var(--primary); background: var(--surface); transition: background-color .2s ease, box-shadow .2s ease; }
.mobile-menu-toggle:hover { background: var(--accent); box-shadow: 0 2px 8px rgba(15,30,46,.08); }

.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(15,30,46,0.5); display: none; align-items: stretch; justify-content: flex-end; z-index: 1200; transition: opacity .3s ease; }
.mobile-menu.open { display: flex; }
.mobile-menu .mobile-nav { background: var(--surface); width: 86%; max-width: 360px; padding: var(--space-32) var(--space-20); display: flex; flex-direction: column; gap: 8px; transform: translateX(100%); transition: transform .35s ease; box-shadow: -8px 0 24px rgba(15,30,46,0.18); }
.mobile-menu.open .mobile-nav { transform: translateX(0); }
.mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.mobile-nav a { padding: 12px 10px; border-radius: var(--radius-s); color: var(--ink); font-size: 16px; }
.mobile-nav a:hover { background: var(--accent); text-decoration: none; }

/* Cookie consent banner (fixed) */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); color: var(--ink); border-top: 1px solid var(--border); box-shadow: 0 -8px 20px rgba(15,30,46,0.06); z-index: 1100; transform: translateY(100%); transition: transform .35s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-16) var(--space-20); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.cookie-actions .cookie-accept { background: var(--secondary); color: #fff; border: 1px solid var(--secondary); border-radius: var(--radius-s); padding: 10px 16px; font-weight: 700; }
.cookie-actions .cookie-accept:hover { filter: brightness(0.96); }
.cookie-actions .cookie-reject { background: transparent; color: var(--secondary); border: 1px solid var(--secondary); border-radius: var(--radius-s); padding: 10px 16px; font-weight: 700; }
.cookie-actions .cookie-reject:hover { background: var(--accent); }
.cookie-actions .cookie-settings { background: transparent; color: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px 16px; }
.cookie-actions .cookie-settings:hover { background: #fff; }

/* Cookie preferences modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(15,30,46,0.55); display: none; align-items: center; justify-content: center; z-index: 1300; }
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-dialog { width: 92%; max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.cookie-dialog .cookie-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-16) var(--space-20); border-bottom: 1px solid var(--border); }
.cookie-dialog .cookie-body { padding: var(--space-20); display: flex; flex-direction: column; gap: var(--space-16); }
.cookie-dialog .cookie-footer { padding: var(--space-16) var(--space-20); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }
.cookie-switches { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 10px 0; }
.cookie-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 28px; border-radius: 28px; border: 1px solid var(--border); background: var(--paper); position: relative; transition: all .25s ease; }
.cookie-toggle::after { content: ""; width: 18px; height: 18px; background: #fff; border: 1px solid var(--border); border-radius: 50%; transform: translateX(-7px); transition: transform .25s ease; }
.cookie-toggle.is-on { background: rgba(10,160,168,0.15); border-color: var(--secondary); }
.cookie-toggle.is-on::after { transform: translateX(7px); border-color: var(--secondary); }

/* Tables and code (if any appear in resources) */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; display: block; }
thead { display: block; background: var(--accent); }
thead tr { display: flex; }
thead th, tbody td { padding: 12px; text-align: left; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--border); flex: 1 1 150px; }
tbody { display: block; }
tbody tr { display: flex; }
code, pre { font-family: Consolas, Monaco, monospace; background: #F3F6FA; border: 1px solid var(--border); border-radius: var(--radius-s); padding: 2px 6px; color: var(--primary); }
pre { padding: 12px; overflow: auto; }

/* Subtle interactive micro-interactions */
.card, .testimonial-card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,30,46,0.12); }

/* Accessibility: clear link styles in content */
.text-section a { text-decoration: underline; text-underline-offset: 2px; }
.text-section a:hover { text-decoration-thickness: 2px; }

/* Spacing helpers (if needed) */
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-24 { margin-top: 24px !important; } .mb-24 { margin-bottom: 24px !important; }

/* Responsive adjustments */
@media (min-width: 480px) {
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  h3 { font-size: 21px; }
}

@media (min-width: 768px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  section { padding: var(--space-60) var(--space-20); }
  .text-image-section { flex-direction: row; }
  /* Show desktop nav */
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  /* Footer layout */
  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: var(--space-32); }
  footer .text-section { max-width: 360px; }
}

@media (min-width: 1024px) {
  .logo img { height: 40px; }
  .content-wrapper { gap: var(--space-24); }
  .text-section { max-width: 980px; }
  .content-grid > * { flex: 1 1 320px; }
}

/* Ensure adequate spacing between adjacent sections and cards */
section + section { margin-top: 0; }
.card + .card, .testimonial-card + .testimonial-card { margin-top: var(--space-20); }

/* Prevent overlap and ensure z-index layering for overlays */
header, .mobile-menu, .cookie-banner, .cookie-modal { isolation: isolate; }

/* Print adjustments (optional) */
@media print { 
  .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { color: #000; text-decoration: underline; }
}
