/* AcidBase Mastery — Base styles */

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

html {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease,
    border-color 0.3s ease, background 0.3s ease;
  mix-blend-mode: difference;
}

.cursor.expanded {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  background: rgba(196, 163, 90, 0.1);
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: background 0.3s ease;
}

.cursor-dot.expanded {
  background: var(--accent);
}

/* Skip navigation link */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  transition: top 0.2s ease;
}

.skip-nav:focus {
  top: 1rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Remove default outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 500;
}

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

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

/* Section label pattern: "001 / Section" */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

/* Monospace tags */
.tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-block;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Offline banner */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 0.5rem 1rem;
  background: var(--coral);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.offline-banner.visible {
  transform: translateY(0);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .cursor,
  .cursor-dot {
    display: none !important;
  }

  body {
    cursor: auto;
  }

  * {
    cursor: auto;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
