* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

html, body {
  width: 100%;
}

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  flex: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

header.scrolled {
  border-bottom-color: var(--border-light);
  box-shadow: 0 6px 24px rgba(12, 47, 49, 0.06);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 2.3rem;
  height: 2.3rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.logo-mark svg { width: 1.35rem; height: 1.35rem; }
.logo-mark img { width: 1.8rem; height: 1.8rem; object-fit: contain; display: block; }

.logo-text small {
  display: block;
  font-family: var(--font-base);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.85;
}

.header-cta {
  display: inline-flex;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  font-size: 0.92rem;
  font-weight: 500;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

nav a:hover { color: var(--text); }

.nav-link.active { color: var(--primary); font-weight: 600; }

/* ===== Container ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  width: 100%;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--spacing-3xl) var(--spacing-lg) var(--spacing-xl);
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: var(--spacing-2xl);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-container { grid-template-columns: 2.2fr 1fr 1fr 1.4fr; }
}

.footer-col { display: flex; flex-direction: column; }

.footer-col h4 {
  font-family: var(--font-base);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: var(--spacing-sm);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1240px;
  margin: var(--spacing-2xl) auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--spacing-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--accent); }

/* ===== Demo banner ===== */
.demo-banner {
  background: linear-gradient(90deg, var(--primary-700), var(--primary));
  color: #fff;
  padding: 0.55rem var(--spacing-lg);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.demo-banner:empty { display: none; }

.demo-tag {
  display: inline-block;
  background: var(--accent);
  color: #241800;
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-full);
  margin-right: 0.55rem;
  vertical-align: middle;
  line-height: 1.5;
}
