/**
 * BASE STYLES
 */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--text-on-accent);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--font-normal);
  line-height: var(--leading-none);
  text-transform: uppercase;
  margin: 0;
  /* Enable stylistic alternates: ss03 for M, ss07 for S */
  font-feature-settings:
    'ss03' 1,
    'ss07' 1;
}

h1 {
  font-size: var(--text-6xl);
}

h2 {
  font-size: var(--text-5xl);
}

h3 {
  font-size: var(--text-4xl);
}

h4 {
  font-size: var(--text-3xl);
}

p {
  margin: 0 0 var(--space-4);
  line-height: var(--leading-relaxed);
}

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

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

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

/* Lists */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* Code */
code,
pre {
  font-family: var(--font-mono);
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: var(--space-8) 0;
}

/* Focus states */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Suppress focus ring on hash-targeted sections (#what-is-it, #faq, etc.).
   Must come AFTER :focus-visible to win by cascade order at equal specificity.
   Sections aren't keyboard-navigable, so no a11y concern. */
:target,
:target:focus-visible {
  outline: none;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-accent {
  color: var(--accent);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.uppercase {
  text-transform: uppercase;
}

.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;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #c5c0b8;
  border-radius: var(--radius-full);
}

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

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s var(--ease-out-expo);
}

/* === V3 Design === */

/* DEPRECATED — use --radius-xl instead */

/* Prevent horizontal overflow from AOS animations + scrolling tickers */
html,
body {
  overflow-x: clip;
}

/* Mobile menu open — prevent body scroll on iOS Safari.
   overflow:hidden on BOTH html + body is required for iOS. */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

html.no-scroll .ticker {
  display: none;
}

/* AOS fallback — show content before AOS initializes or if JS is disabled/blocked.
   AOS adds .aos-initialized to <html> after AOS.init() runs; until then this
   rule keeps all [data-aos] elements visible so content is never hidden. */
html:not(.aos-initialized) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}
