/* HUXOS Website Styles — Based strictly on HUXOS Design System v1.0 (September 2026) */

/* Global container and layout */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--action);
  text-decoration: none;
  transition: color var(--duration-fast);
}

a:hover {
  color: var(--action-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Base grid container */
.hx-container {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 640px) {
  .hx-container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Sections */
.hx-section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
  border-top: var(--border-width) solid var(--line);
  background-color: var(--surface);
}

.hx-section-alt {
  background-color: var(--surface-alt);
}

@media (max-width: 768px) {
  .hx-section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Header customization */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--surface);
  border-bottom: var(--border-width) solid var(--line);
  transition: background-color var(--duration-base), border-color var(--duration-base);
}

.site-nav .hx-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.nav-brand img {
  height: 34px;
  width: auto;
  display: block;
}

.nav-brand .logo-dark {
  display: none;
}

[data-theme="dark"] .nav-brand .logo-light {
  display: none;
}

[data-theme="dark"] .nav-brand .logo-dark {
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: var(--space-1) 0;
  position: relative;
  transition: color var(--duration-fast);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--action);
  text-decoration: none;
}

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

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--line);
  background-color: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: background-color var(--duration-fast), border-color var(--duration-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--surface-alt);
  border-color: var(--line-strong);
}

.theme-toggle-btn:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-width);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 840px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: var(--border-width) solid var(--line);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    align-items: flex-start;
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
}

/* Hero Band Section */
.hero-band {
  background-color: var(--band);
  color: var(--on-band);
  position: relative;
  overflow: hidden;
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.hero-band-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 960px) {
  .hero-band-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.hero-overline {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-band-muted);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--on-band);
  margin: 0;
  text-wrap: balance;
}

.hero-lead {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 28px;
  color: var(--on-band-muted);
  max-width: 62ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* Motif & Artwork in Hero */
.hero-art-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-art-card {
  border: var(--border-width) solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.04);
  padding: var(--space-6);
  width: 100%;
  max-width: 480px;
}

.hero-art-card svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Section Headers */
.section-header {
  margin-bottom: var(--space-12);
  max-width: 760px;
}

.section-overline {
  margin-bottom: var(--space-3);
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand);
  margin: 0 0 var(--space-3) 0;
}

.section-lead {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-muted);
  margin: 0;
}

/* Engine Grid (4 Engines Portfolio) */
.engines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 992px) {
  .engines-grid {
    grid-template-columns: 1fr;
  }
}

/* Principles Grid (Generic 2x2) */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .principles-grid {
    grid-template-columns: 1fr;
  }
}

.engine-card {
  background-color: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  transition: border-color var(--duration-fast);
}

.engine-card:hover {
  border-color: var(--line-strong);
}

.engine-card-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.engine-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.engine-logo-wrap {
  height: 28px;
  display: flex;
  align-items: center;
}

.engine-logo-wrap img {
  height: 24px;
  width: auto;
  max-width: 180px;
}

.engine-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 800;
  color: var(--brand);
  margin: 0;
}

.engine-card-desc {
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  margin: 0;
}

.engine-specs-list {
  list-style: none;
  margin: var(--space-2) 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.engine-specs-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-muted);
}

.engine-specs-list li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  stroke: var(--brand);
}

.engine-card-footer {
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tabs & Interactive Demonstrations */
.interactive-tabs-card {
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  overflow: hidden;
}

.tab-nav {
  display: flex;
  border-bottom: var(--border-width) solid var(--line);
  background-color: var(--surface-alt);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--action);
  background-color: var(--surface);
}

.tab-panel {
  display: none;
  padding: var(--space-8);
}

.tab-panel.active {
  display: block;
}

.tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

@media (max-width: 800px) {
  .tab-grid {
    grid-template-columns: 1fr;
  }
}

.code-block {
  background-color: #0A0F1E;
  color: #E6EAF2;
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  border: var(--border-width) solid var(--line);
}

/* Alerts Stack */
.alerts-demo-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Deployments Grid */
.deployments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 880px) {
  .deployments-grid {
    grid-template-columns: 1fr;
  }
}

.metric-big {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 40px;
  font-weight: 800;
  color: var(--brand);
  margin-top: var(--space-2);
  margin-bottom: var(--space-1);
}

/* Demo Form Section */
.demo-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 880px) {
  .demo-form-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.form-card {
  background-color: var(--surface);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-select {
  font: 400 15px/22px var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  border: var(--border-width) solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px var(--space-3);
  width: 100%;
}

.form-select:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-width);
}

/* Footer Section */
.site-footer {
  background-color: var(--band);
  color: var(--on-band);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.15);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

@media (max-width: 880px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

.footer-logo {
  height: 36px;
  width: auto;
  display: block;
  margin-bottom: var(--space-4);
}

.footer-desc {
  font-size: 14px;
  line-height: 22px;
  color: var(--on-band-muted);
  max-width: 38ch;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-band);
  margin: 0 0 var(--space-4) 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-band-muted);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer-links a:hover {
  color: var(--on-band);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 13px;
  line-height: 20px;
  color: var(--on-band-muted);
}

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

/* Product Page Specific */
.product-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  background-color: var(--surface-alt);
  border-bottom: var(--border-width) solid var(--line);
}

.product-hero-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 800px;
}

.product-lockup {
  height: 38px;
  width: auto;
  max-width: 320px;
  margin-bottom: var(--space-2);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}

.breadcrumb-nav a {
  color: var(--ink-muted);
}

.breadcrumb-nav a:hover {
  color: var(--action);
}

/* Outline Lucide Icon Utility */
.icon-24 {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
