/* ==========================================================================
   MOTIQ — Base / Global Styles
   Modern reset + global defaults
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

/* ── Typography Base ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  max-width: 72ch;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

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

strong, b {
  font-weight: var(--font-weight-bold);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ── Selection ──────────────────────────────────────────────────────────── */
::selection {
  background-color: var(--color-red);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-red);
  color: var(--color-white);
}

/* ── Focus ──────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-steel);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-steel) var(--bg-secondary);
}

/* ── Utility Classes ────────────────────────────────────────────────────── */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.container--narrow {
  max-width: var(--container-xl);
}

.container--wide {
  max-width: 1600px;
}

/* Section spacing */
.section {
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.section--sm {
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 4rem);
}

/* Section header */
.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: var(--space-4);
}

.section__label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--color-red);
  border-radius: 1px;
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Glassmorphism */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--surface-glass-border);
}

.glass--heavy {
  backdrop-filter: blur(var(--glass-blur-heavy)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(var(--glass-saturation));
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chrome-text {
  background: var(--gradient-chrome);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Text utilities */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Maple leaf divider */
.maple-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.maple-divider::before,
.maple-divider::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--divider);
}

.maple-divider svg {
  width: 16px;
  height: 16px;
  fill: var(--color-red);
  opacity: 0.6;
}

/* Aspect ratios */
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-1-1  { aspect-ratio: 1 / 1; }
.aspect-3-4  { aspect-ratio: 3 / 4; }

/* Overflow hidden */
.overflow-hidden { overflow: hidden; }

/* Relative positioning */
.relative { position: relative; }
