/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  font-weight: var(--font-weight-normal);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Crossfading background layers */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.bg-layer--back {
  opacity: 1;
}

.bg-layer--front {
  opacity: 0;
}

.bg-layer--front.active {
  opacity: 1;
}

/* Gradient overlay on top of background image — flows full page */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.45) 30%, rgba(0, 0, 0, 0.45) 70%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-semibold);
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-timing);
}

a:hover {
  color: var(--color-primary-hover);
}

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

ul {
  list-style: none;
}

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

/* Section spacing */
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

/* Darker section background — solid with subtle border */
.section--solid {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section--solid::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
}

/* Button System - matching app glassmorphism */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--btn-bg-default);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  color: var(--btn-text-default);
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text-hover);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--btn-bg-primary);
  color: var(--btn-text-hover);
  border: var(--glass-border-hover);
}

.btn--primary:hover {
  background: var(--btn-bg-primary-hover);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: var(--glass-border);
}

.btn--secondary:hover {
  background: var(--glass-bg-light);
  color: var(--color-text);
}

.btn--large {
  padding: 14px 32px;
  font-size: 1.1rem;
}

.btn--block {
  width: 100%;
}

/* Selection color */
::selection {
  background: rgba(100, 108, 255, 0.3);
  color: white;
}
