/* Hibrinix SEO — Unified Design System & Responsive Polish (v5.6.2) */
:root {
  color-scheme: dark;
  --bg: #080415;
  --surface: #110a26;
  --surface-elevated: #1a1038;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(217, 70, 239, 0.48);
  --primary: #B829E3;
  --primary-light: #e879f9;
  --primary-glow: rgba(184, 41, 227, 0.32);
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.22);
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --text: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --ui-gradient: linear-gradient(135deg, #7928CA 0%, #B829E3 50%, #EC4899 100%);
  --ui-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Subtle architectural background grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
  z-index: 0;
}

button, input, textarea, select {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

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

/* Top Scroll Progress Bar */
.ui-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #7c3aed, #d946ef, #06b6d4);
  z-index: 250;
  pointer-events: none;
}

.ui-skip {
  position: fixed;
  top: 12px;
  left: 16px;
  transform: translateY(-200%);
  background: #fff;
  color: #080415;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 300;
  text-decoration: none;
}
.ui-skip:focus {
  transform: none;
}

/* Unified Sticky Header */
body > header {
  background: rgba(8, 4, 21, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner,
.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* Crisp Brand Icon + Text Lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ui-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow);
  flex-shrink: 0;
}
.brand-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
}
.brand-text {
  display: inline-block;
  color: #fff;
}
.brand-text span {
  color: var(--primary-light);
}

/* Primary Navigation Links */
header nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
header nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
header nav a.active {
  color: #fff;
  background: rgba(184, 41, 227, 0.16);
}

/* Unified Buttons */
.btn,
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s var(--ui-ease);
}
.btn {
  font-size: 0.92rem;
  padding: 0.65rem 1.35rem;
}
.btn-sm {
  font-size: 0.85rem;
  padding: 0.48rem 1.05rem;
  border-radius: 9px;
}
.btn-lg {
  font-size: 1rem;
  padding: 0.88rem 1.85rem;
  border-radius: 12px;
  font-weight: 700;
}
.btn:hover,
.btn-sm:hover {
  transform: translateY(-2px);
}
.btn-primary,
.btn-admin {
  background: var(--ui-gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 25px var(--primary-glow);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(217, 70, 239, 0.48);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

/* Mobile Menu Button (hidden on desktop) */
.ui-menu {
  display: none;
}

/* Gradient Headline Text */
.gradient-text {
  background: linear-gradient(115deg, #ffffff 0%, #f0abfc 45%, #d946ef 80%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Capsule Pill Badges & Glowing Dots */
.pill-badge,
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(184, 41, 227, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.3);
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(184, 41, 227, 0.12);
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}

/* Homepage Hero — Centered, Clean & High-Impact */
.ui-orbit {
  display: none !important;
}
.ui-home .hero {
  text-align: center;
  max-width: 960px;
  margin: 4rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.ui-home .hero-copy {
  max-width: 880px;
  margin: 0 auto;
}
.ui-home .hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 1.35rem auto;
  color: #fff;
}
.ui-home .hero p {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto 2.25rem;
  color: var(--text-secondary);
}
.ui-home .hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ui-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.25rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.ui-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.ui-trust svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Interactive Product Workspace Showcase */
.ui-home .showcase-wrap {
  max-width: 1180px;
  margin: 2.5rem auto 6rem;
  padding: 0 1.5rem;
}
.showcase-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}
.showcase-intro h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 1rem 0 0.75rem;
  color: #fff;
}
.showcase-intro > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 auto;
}

.mockup-window {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(26, 11, 46, 0.96), rgba(11, 4, 22, 0.98));
  border: 1px solid rgba(217, 70, 239, 0.25);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(184, 41, 227, 0.14);
  overflow: hidden;
}
.window-bar {
  min-height: 54px;
  padding: 0 1.5rem;
  background: rgba(20, 8, 36, 0.9);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.window-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #fff;
}
.window-title strong {
  font-weight: 700;
}
.window-title > span:last-child {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-left: 1px solid var(--border);
  padding-left: 0.6rem;
}
.window-product-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--ui-gradient);
}
.window-status {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #34d399;
}

/* Section Headers — Centered & Balanced */
.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}
.section-header h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 1rem 0 0.85rem;
  color: #fff;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 auto;
}

/* Bento Cards & Elevated Surfaces */
.bento-card,
.card,
.section-card,
.kpi-card,
.action-card,
.matrix-card,
.login-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: radial-gradient(circle at 100% 0%, rgba(184, 41, 227, 0.1), transparent 50%),
              linear-gradient(155deg, rgba(23, 10, 42, 0.9), rgba(12, 4, 24, 0.95));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.bento-card {
  padding: 2.25rem;
  transition: transform 0.25s var(--ui-ease), border-color 0.25s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}
.bento-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
}
.bento-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* 4-Step Flow Cards — Individual Elevated Cards */
.flow-section {
  background: transparent;
  padding: 3rem 1.5rem 4rem;
  margin: 0 auto;
}
.flow-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.flow-node {
  background: linear-gradient(155deg, rgba(25, 12, 44, 0.85), rgba(13, 5, 24, 0.95));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: left;
  transition: transform 0.25s var(--ui-ease), border-color 0.25s ease;
}
.flow-node:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}
.flow-step {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(184, 41, 227, 0.15);
  border: 1px solid rgba(217, 70, 239, 0.3);
  color: var(--primary-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.flow-node h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.flow-node p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Page Heroes (Pricing, etc.) */
.page-hero {
  text-align: center;
  padding: 4.5rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 1.25rem 0 1rem;
}
.page-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}

/* Form Controls */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
select,
textarea {
  background: rgba(12, 5, 24, 0.9);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(184, 41, 227, 0.2);
  outline: none;
}

/* Scrollable Tables */
.ui-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 14px;
}

/* Auth Screens */
.ui-auth {
  background:
    radial-gradient(circle 500px at 20% 20%, rgba(184, 41, 227, 0.16), transparent 70%),
    radial-gradient(circle 400px at 80% 80%, rgba(6, 182, 212, 0.1), transparent 70%),
    var(--bg);
}
.ui-auth > .card,
.ui-auth > .login-card {
  width: 100%;
  max-width: 450px;
  padding: 2.5rem;
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

/* Unified Footer */
body > footer {
  background: #05020d;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.footer-links a,
.footer-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: #fff;
}

/* Subtle Reveal Animation */
.ui-reveal {
  animation: ui-rise 0.55s var(--ui-ease) both;
}
@keyframes ui-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .header-inner,
  .header-container {
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
  }
  .ui-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9px;
    padding: 0.5rem 0.85rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }
  .ui-menu svg {
    width: 18px;
    height: 18px;
  }
  header .header-inner > nav,
  header .header-container > nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    order: 3;
    padding-top: 0.5rem;
  }
  header .nav-actions,
  header .nav-user,
  header .user-panel {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    order: 4;
    padding-top: 0.5rem;
  }
  header.ui-nav-open nav,
  header.ui-nav-open .nav-actions,
  header.ui-nav-open .nav-user,
  header.ui-nav-open .user-panel {
    display: flex;
  }
  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .ui-home .hero {
    margin: 2.5rem auto 2rem;
  }
  .bento-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }
  .bento-span-2 {
    grid-column: auto;
  }
  .window-body {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
