:root {
  --bg: #ffffff;
  --text: #000000;
  --accent: #000000;
  --font-main: "Outfit", sans-serif;
  --font-mono: "Space Mono", monospace;
  --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Optimization: Hints to browser */
.hero-img, .reveal-text, .reveal-card, .custom-cursor, section::before {
  will-change: transform, opacity;
}

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  opacity: 0;
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
  overflow: hidden;
}

.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.5);
  opacity: 0.6;
  transform: scale(1.1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, #000 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  color: #fff;
  padding: 20px;
}

h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-bottom: 20px;
  filter: url(#hand-drawn);
}

.highlight {
  color: #fff;
  -webkit-text-stroke: 1px #fff;
  color: transparent;
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}

.scroll-indicator .line {
  width: 1px;
  height: 50px;
  background: #fff;
  margin: 10px auto;
  animation: scrollLine 2s infinite;
}

/* Hero Socials */
.hero-socials {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  justify-content: center;
  filter: url(#hand-drawn);
}

.social-icon {
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 5px;
  transition: all 0.2s ease;
  padding: 8px;
}

.social-icon:hover {
  background: #fff;
  color: #000;
  transform: rotate(-3deg) scale(1.1);
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

/* CA Bar */
.ca-bar {
  background: #000;
  color: #fff;
  padding: 15px 0;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  font-family: var(--font-mono);
  position: sticky;
  top: 0;
  z-index: 100;
  filter: url(#hand-drawn);
}

.ca-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 20px;
}

.ca-address {
  font-size: 0.9rem;
  word-break: break-all;
  opacity: 0.8;
}

.ca-copy-btn {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 5px 15px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: all 0.2s ease;
}

.ca-copy-btn:hover {
  background: #fff;
  color: #000;
  transform: skew(-10deg);
}

@keyframes scrollLine {
  0% {
    height: 0;
    transform: translateY(0);
  }
  50% {
    height: 50px;
    transform: translateY(0);
  }
  100% {
    height: 0;
    transform: translateY(50px);
  }
}

/* Content Sections */
.content-section {
  padding: 15vh 10vw;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 2px solid #000;
}

.content-section.inverse {
  background: #000;
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin-bottom: 20px;
  display: block;
}

h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 40px;
  text-transform: uppercase;
  font-weight: 700;
  filter: url(#hand-drawn);
  animation: sketchy-vibe 0.2s infinite;
}

@keyframes sketchy-vibe {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(1px, -1px);
  }
  50% {
    transform: translate(-1px, 1px);
  }
  75% {
    transform: translate(1px, 1px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Unique sketchy backgrounds */
section:nth-of-type(1)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      transparent 80%,
      rgba(0, 0, 0, 0.05) 100%
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(0, 0, 0, 0.03) 40px,
      rgba(0, 0, 0, 0.03) 80px
    );
  z-index: -1;
  filter: url(#sketchy-bg);
}

section:nth-of-type(2)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 100px,
      rgba(255, 255, 255, 0.05) 100px,
      rgba(255, 255, 255, 0.05) 200px
    ),
    radial-gradient(
      circle at 80% 70%,
      transparent 70%,
      rgba(255, 255, 255, 0.02) 100%
    );
  z-index: -1;
  filter: url(#sketchy-bg);
}

section:nth-of-type(3)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  filter: url(#sketchy-bg);
}

section:nth-of-type(4)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(
    circle at 50% 50%,
    transparent,
    transparent 150px,
    rgba(255, 255, 255, 0.02) 150px,
    rgba(255, 255, 255, 0.02) 300px
  );
  z-index: -1;
  filter: url(#sketchy-bg);
}

.text-block p,
.quote,
.protocol-card h3,
.protocol-card li {
  filter: url(#hand-drawn);
}

.reveal-text.active {
  animation: sketchy-vibe 0.4s infinite;
}

/* Base Responsive Adjustments */
@media (max-width: 768px) {
    :root {
        --transition: 0.4s ease;
    }
    
    .content-section {
        padding: 10vh 5vw;
    }

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

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

    .ca-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .ca-address {
        font-size: 0.75rem;
        max-width: 100%;
    }

    .hero-socials {
        flex-wrap: wrap;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .protocol-card {
        padding: 25px;
    }

    .text-block p {
        font-size: 1.1rem;
    }
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.text-block p {
  font-size: 1.4rem;
  margin-bottom: 30px;
  font-weight: 300;
}

.quote {
  font-family: var(--font-mono);
  font-style: italic;
  border-left: 4px solid currentColor;
  padding-left: 20px;
  margin-top: 40px;
}

/* Protocol Grid */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

@media (max-width: 992px) {
  .protocol-grid {
    grid-template-columns: 1fr;
  }
}

.protocol-card {
  border: 2px solid currentColor;
  padding: 40px;
  transition: var(--transition);
}

.protocol-card:hover {
  background: var(--text);
  color: var(--bg);
}

.protocol-card h3 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-decoration: underline;
}

.protocol-card ul {
  list-style: none;
}

.protocol-card li {
  margin-bottom: 15px;
  position: relative;
  padding-left: 20px;
}

.protocol-card li::before {
  content: "→";
  position: absolute;
  left: 0;
}

/* X Link Button */
.btn-wrap {
  margin-top: 50px;
}

.x-link {
  display: inline-block;
  padding: 15px 40px;
  border: 2px solid currentColor;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  transition: var(--transition);
}

.x-link:hover {
  background: #fff;
  color: #000;
  transform: skew(-5deg);
}

.inverse .x-link:hover {
  background: #000;
  color: #fff;
  border-color: #fff;
}

/* Animations */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-card {
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-card.active {
  opacity: 1;
  transform: scale(1);
}

/* Footer */
footer {
  padding: 60px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-top: 2px solid #000;
}
