/* ============================================================
   GLOBAL DARK — Marketing Site (Phase 2 Dark Redesign)
   Tokens, base styles, header, footer, and shared component
   styles (testimonials, CTA banner) for home / product /
   contact / about pages.
   Admin pages do NOT extend base.html and remain on admin.css.
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Surface */
  --bg:           #0b0e16;
  --surface-1:    #131724;
  --surface-2:    #1c2030;
  --surface-3:    #262b3d;

  /* Borders */
  --border:        #262b3d;
  --border-strong: #3a3f55;

  /* Text */
  --text:        #e6e8ec;
  --text-muted:  #9aa0ad;
  --text-dim:    #6b7180;

  /* Brand primary */
  --primary:        #6366f1;
  --primary-hover:  #818cf8;
  --primary-pressed:#4f46e5;
  --primary-soft:   rgba(99, 102, 241, 0.12);
  --primary-glow:   rgba(99, 102, 241, 0.35);

  /* Accent (sparing) */
  --accent:       #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft:  rgba(34, 211, 238, 0.12);

  /* Type */
  --font:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

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

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow-x: clip (not hidden) — clip prevents horizontal scroll
     without breaking position:sticky on descendants like .nav */
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: var(--primary-soft);
  color: var(--text);
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease),
              background 180ms var(--ease),
              border-color 180ms var(--ease),
              box-shadow 180ms var(--ease),
              color 180ms var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
  color: #fff;
}
.btn-primary:active {
  transform: translateY(0);
  background: var(--primary-pressed);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--surface-1);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Focus rings (a11y) */
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   HEADER / NAV  (matches /style-guide nav pattern)
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 22, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-logo img {
  height: 60px;
  width: auto;
  display: block;
}

.nav-content {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Slightly compact buttons in the nav */
.nav-cta .btn { padding: 10px 18px; font-size: 14px; }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  flex-direction: column;
  gap: 5px;
}
.hamburger-line {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
@media screen and (max-width: 900px) {
  .nav-inner { padding: 6px var(--space-4); }
  .hamburger { display: flex; }
  .nav-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-5) var(--space-6);
    background: rgba(11, 14, 22, 0.96);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
  }
  .nav.open .nav-content { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .nav-links a { font-size: 17px; }
  .nav-cta {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--space-3);
  }
  .nav-cta .btn { justify-content: center; padding: 12px 18px; }
  .nav-logo img { height: 44px; }
}

@media screen and (max-width: 480px) {
  .nav-logo img { height: 38px; }
}

/* ============================================================
   FOOTER  (matches /style-guide footer pattern)
   ============================================================ */
.footer {
  position: relative;
  margin-top: var(--space-6);
  padding: var(--space-9) var(--space-5) var(--space-6);
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-1) 100%);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto var(--space-7);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-7);
}

.footer-brand { max-width: 460px; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-4);
}
.footer-logo img {
  height: 60px;
  width: auto;
  display: block;
}

.footer-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-dim);
  font-size: 13px;
}

.copyright {
  text-align: left;
  color: var(--text-dim);
}

/* Legacy footer classes — hide leftovers from old markup if any linger */
.footer-background,
.pngwing-4-icon,
.linked-in-link,
.linked-in-parent,
.linked-in-white-1-icon,
.ellipse-div { display: none; }

@media screen and (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media screen and (max-width: 600px) {
  .footer { padding: var(--space-7) var(--space-4) var(--space-5); }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* ============================================================
   "OBSIDIAN" wordmark — dark-system treatment
   Preserves brand equity (chiseled-stone metaphor) restyled
   for dark backgrounds.
   ============================================================ */
.obsidian-name-text {
  font-family: var(--font);
  font-size: 1.2em;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #e0e3eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 0 22px rgba(99, 102, 241, 0.35);
}

/* ============================================================
   TESTIMONIALS (shared partial)
   ============================================================ */
.testimonials-top {
  display: flex;
  justify-content: center;
  padding: var(--space-9) var(--space-5);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  border-top: 1px solid var(--border);
}

.testimonials-inner {
  width: min(900px, 100%);
  text-align: center;
}

.testimonials-header {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-6);
}

.testimonial-slider {
  position: relative;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 950ms ease, visibility 0s linear 950ms;
}
.testimonial-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transition: opacity 950ms ease;
}

.testimonial-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6) var(--space-7);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-5);
  align-items: start;
  transition: border-color 220ms var(--ease),
              transform 220ms var(--ease),
              min-height 200ms ease;
}
.testimonial-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.testimonial-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-content { text-align: left; }

.testimonial-quote {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 var(--space-4) 0;
}

.testimonial-quote .gap-sm {
  display: block;
  width: 100%;
  height: 8px;
  line-height: 0;
  font-size: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.testimonial-meta { font-size: 14px; }
.testimonial-author {
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}
.testimonial-role,
.testimonial-company {
  color: var(--text-muted);
  font-size: 13px;
  display: inline;
}
.testimonial-role::after { content: " — "; }

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.testimonial-dots .dot {
  width: 8px;
  height: 8px;
  background: var(--surface-3);
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: inline-block;
  appearance: none;
  cursor: pointer;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.testimonial-dots .dot:hover { background: var(--border-strong); }
.testimonial-dots .dot.active {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.testimonial-dots .dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media screen and (max-width: 700px) {
  .testimonials-top { padding: var(--space-7) var(--space-4); }
  .testimonial-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: var(--space-5) var(--space-4);
    min-height: auto !important;
  }
  .testimonial-content { text-align: center; }
  .testimonial-quote { font-size: 15px; }
}

/* ============================================================
   CTA BANNER (shared partial)
   ============================================================ */
.cta-banner {
  display: flex;
  justify-content: center;
  padding: var(--space-7) var(--space-5);
  font-family: var(--font);
}

.cta-banner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 760px;
  padding: var(--space-6) var(--space-6);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top left, var(--primary-soft) 0%, transparent 60%),
    var(--surface-1);
  border: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}
.cta-banner-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, var(--accent-soft) 0%, transparent 55%);
  pointer-events: none;
}

.cta-banner-heading {
  margin: 0;
  position: relative;
  z-index: 1;
  font-family: var(--font);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.cta-banner-button-wrap {
  position: relative;
  z-index: 1;
  align-self: center;
}

.cta-banner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  padding: 14px 28px;
  background: var(--primary);
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: background 180ms var(--ease),
              transform 180ms var(--ease),
              box-shadow 180ms var(--ease);
}
.cta-banner-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.cta-banner-button-label {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media screen and (max-width: 600px) {
  .cta-banner { padding: var(--space-7) var(--space-4); }
  .cta-banner-card { padding: var(--space-6) var(--space-5); }
}

/* ============================================================
   FLASH MESSAGES (used on contact page)
   ============================================================ */
.flash-messages {
  width: 100%;
  max-width: 720px;
  margin: 0 auto var(--space-5);
}
.flash-message-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.flash-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
}
.flash-message.success {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--accent);
  background: var(--accent-soft);
}
.flash-message.error,
.flash-message.danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
}

/* ============================================================
   ERROR PAGES (404 / 500)
   Shared template at templates/error.html.
   ============================================================ */
.error-hero {
  position: relative;
  padding: var(--space-10) 0 var(--space-9);
  text-align: center;
  overflow: hidden;
}
.error-hero::before {
  content: '';
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.14) 0%,
    rgba(34, 211, 238, 0.04) 35%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}

.error-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  max-width: 640px;
  margin: 0 auto;
}

.error-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.error-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.error-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}

.error-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  max-width: 540px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-3);
}

@media screen and (max-width: 600px) {
  .error-hero { padding: var(--space-9) var(--space-4) var(--space-7); }
  .error-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .error-actions .btn { justify-content: center; }
}
