:root {
  --bg: #eae8e3;
  --text: #111111;
  --accent: #3a3a3a;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
  height: 100vh;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: "Manrope", sans-serif;
}

.font-mono {
  font-family: "Fira Code", monospace;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  opacity: 0.22;
  background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Preloader & Reveal Animations */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--text);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 1.2s ease,
    transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* Accordion Component */
.accordion-item {
  border-bottom: 1px solid rgba(17, 17, 17, 0.15);
  cursor: pointer;
  transition: background-color 0.4s ease;
}

.accordion-item:hover {
  background-color: rgba(17, 17, 17, 0.03);
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content > div {
  overflow: hidden;
}

.accordion-item.is-open .accordion-content {
  grid-template-rows: 1fr;
}

.accordion-icon {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(45deg);
}

/* Console & Interactive Sandbox Styling */
.console-tab {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  color: rgba(234, 232, 227, 0.6);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.console-tab:hover {
  color: rgba(234, 232, 227, 0.9);
  background: rgba(255, 255, 255, 0.04);
}

.console-tab.active-tab {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.25);
  font-weight: 600;
}

.tab-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tab-panel.active {
  display: block;
  opacity: 1;
}

.wave-btn {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  padding: 0.4rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(234, 232, 227, 0.7);
  transition: all 0.2s ease;
}

.wave-btn.active,
.wave-btn:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

textarea {
  transition: border-color 0.3s ease;
}
