/* ============================================
   REDRAW — Redrawn Dog on TON
   ============================================ */

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

:root {
  --bg: #0a0a0a;
  --text: #fafafa;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --font-main: 'Space Grotesk', sans-serif;
  --font-hand: 'Caveat', cursive;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
  font-weight: 400;
}

/* ---- FADE IN ---- */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- ROUGH BORDER ---- */

.rough-border {
  border: 2px solid var(--accent);
  border-radius: 2px 8px 4px 12px;
  position: relative;
}

.rough-border::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 6px 2px 10px 4px;
  pointer-events: none;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  z-index: 1;
}

.hero-image-wrap {
  margin-bottom: 32px;
}

.hero-image {
  max-width: 320px;
  width: 80%;
  height: auto;
  border-radius: 8px;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.15));
  transition: transform 0.4s ease;
}

.hero-image:hover {
  transform: rotate(-2deg) scale(1.03);
}

.hero-title {
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: rgba(250, 250, 250, 0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.hero-tagline-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  padding: 12px 32px;
}

.tagline-circle {
  position: absolute;
  inset: -10px -20px;
  width: calc(100% + 40px);
  height: calc(100% + 20px);
  pointer-events: none;
}

.primary-tagline {
  font-family: var(--font-hand);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  position: relative;
}

.secondary-tagline {
  font-family: var(--font-hand);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  color: rgba(250, 250, 250, 0.6);
  margin-top: 8px;
}

.hero-scribble-left,
.hero-scribble-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: 80px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-scribble-left {
  left: 20px;
}

.hero-scribble-right {
  right: 20px;
}

.hero-scribble-left svg,
.hero-scribble-right svg {
  width: 100%;
  height: 60%;
  margin-top: 20%;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bobDown 2s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes bobDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   THESIS
   ============================================ */

.thesis {
  background: linear-gradient(180deg, var(--bg) 0%, #0d0d0d 50%, var(--bg) 100%);
  padding: 120px 0;
}

.thesis-quote {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--accent);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.4;
  border: none;
}

.thesis-body {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(250, 250, 250, 0.75);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.thesis-signoff {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: rgba(250, 250, 250, 0.4);
  text-align: center;
  font-style: italic;
}

.scribble-accent {
  text-align: center;
  margin-bottom: 40px;
}

.scribble-accent.bottom {
  margin-top: 40px;
  margin-bottom: 0;
}

.scribble-accent svg {
  width: 200px;
  max-width: 60%;
}

/* ============================================
   CONTRACT
   ============================================ */

.contract {
  text-align: center;
}

.contract-display {
  display: inline-block;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px 12px 6px 8px;
  padding: 20px 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
  max-width: 100%;
}

.contract-display:hover,
.contract-display:focus {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  outline: none;
}

.contract-address {
  font-family: 'Courier New', monospace;
  font-size: clamp(0.65rem, 2.2vw, 1rem);
  color: var(--text);
  word-break: break-all;
  display: block;
  letter-spacing: 0.02em;
}

.copy-hint {
  display: block;
  font-size: 0.7rem;
  color: rgba(250, 250, 250, 0.3);
  margin-top: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.contract-display:hover .copy-hint {
  color: var(--accent);
}

.copy-feedback {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.ripple-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================
   BUY
   ============================================ */

.buy {
  text-align: center;
  padding: 80px 0;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 18px 48px;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  background: #fff;
  color: var(--bg);
  transform: rotate(-1deg) scale(1.04);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
  display: block;
  margin-top: 20px;
  color: rgba(250, 250, 250, 0.5);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  border: none;
}

.btn-secondary:hover {
  color: var(--accent);
}

/* ============================================
   COMMUNITY
   ============================================ */

.community {
  text-align: center;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.community-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0, 212, 255, 0.03);
  transition: all 0.3s ease;
}

.community-card:hover {
  background: rgba(0, 212, 255, 0.08);
  transform: rotate(1deg) translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.community-card:nth-child(2):hover {
  transform: rotate(-1.5deg) translateY(-4px);
}

.community-card:nth-child(3):hover {
  transform: rotate(0.5deg) translateY(-6px);
}

.community-icon {
  font-size: 2rem;
  line-height: 1;
}

.community-name {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.7);
}

/* ============================================
   GALLERY
   ============================================ */

.gallery {
  text-align: center;
}

.gallery-subtitle {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--accent);
  margin-top: -28px;
  margin-bottom: 40px;
  font-style: italic;
}

.gallery-featured {
  margin-bottom: 18px;
}

.gallery-hero {
  width: 100%;
  border-radius: 6px 10px 4px 8px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  transition: all 0.4s ease;
  cursor: pointer;
}

.gallery-hero:hover {
  border-color: var(--accent);
  transform: rotate(-0.5deg) scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.15);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  opacity: 0;
  animation: imgFadeIn 0.6s ease forwards;
}

.gallery-grid img:nth-child(1) { border-radius: 4px 8px 2px 6px; animation-delay: 0.05s; }
.gallery-grid img:nth-child(2) { border-radius: 6px 3px 8px 4px; animation-delay: 0.1s; }
.gallery-grid img:nth-child(3) { border-radius: 3px 7px 5px 9px; animation-delay: 0.15s; }
.gallery-grid img:nth-child(4) { border-radius: 7px 4px 6px 3px; animation-delay: 0.2s; }
.gallery-grid img:nth-child(5) { border-radius: 5px 9px 3px 7px; animation-delay: 0.25s; }
.gallery-grid img:nth-child(6) { border-radius: 8px 3px 7px 5px; animation-delay: 0.3s; }

@keyframes imgFadeIn {
  to { opacity: 1; }
}

.gallery-grid img:hover {
  border-color: var(--accent);
  transform: rotate(-1.5deg) scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
  z-index: 2;
  position: relative;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1001;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s, color 0.3s;
  padding: 20px;
  z-index: 1001;
  line-height: 1;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  color: var(--accent);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(250, 250, 250, 0.4);
  letter-spacing: 0.2em;
}

/* ============================================
   FREEREDRAW
   ============================================ */

.freeredraw {
  background: #060606;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.freeredraw::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(rgba(255,255,255,0.01) 0% 25%, transparent 0% 50%) 0 0 / 4px 4px;
  pointer-events: none;
}

.freeredraw-tag {
  position: relative;
  display: inline-block;
  margin-bottom: 32px;
}

.freeredraw-hashtag {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(3rem, 12vw, 7rem);
  color: #00ff88;
  transform: rotate(-3deg);
  display: inline-block;
  text-shadow:
    0 0 20px rgba(0, 255, 136, 0.4),
    0 0 60px rgba(0, 255, 136, 0.2),
    0 0 100px rgba(0, 255, 136, 0.1);
  animation: sprayPulse 3s ease-in-out infinite;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

@keyframes sprayPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 60px rgba(0, 255, 136, 0.2), 0 0 100px rgba(0, 255, 136, 0.1); }
  50% { text-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3), 0 0 120px rgba(0, 255, 136, 0.15); }
}

.drip {
  position: absolute;
  bottom: -30px;
  width: 12px;
  pointer-events: none;
}

.drip-1 {
  left: 15%;
  height: 40px;
  animation: dripDrop 4s ease-in infinite 0.5s;
}

.drip-2 {
  left: 55%;
  height: 30px;
  animation: dripDrop 4s ease-in infinite 1.5s;
}

.drip-3 {
  right: 12%;
  height: 50px;
  animation: dripDrop 4s ease-in infinite 2.5s;
}

@keyframes dripDrop {
  0% { opacity: 0; transform: translateY(-5px); }
  20% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(15px); }
}

.freeredraw-subtitle {
  font-family: var(--font-main);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: rgba(250, 250, 250, 0.7);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.freeredraw-cta {
  font-family: var(--font-hand);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(0, 255, 136, 0.5);
  font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 60px 0 40px;
  text-align: center;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-tagline {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-brand {
  font-size: 0.85rem;
  color: rgba(250, 250, 250, 0.5);
  margin-bottom: 8px;
}

.footer-contract {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: rgba(250, 250, 250, 0.2);
  word-break: break-all;
  margin-bottom: 16px;
}

.footer-year {
  font-size: 0.7rem;
  color: rgba(250, 250, 250, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero-image {
    max-width: 240px;
  }

  .hero-scribble-left,
  .hero-scribble-right {
    width: 40px;
  }

  .hero-scribble-left { left: 8px; }
  .hero-scribble-right { right: 8px; }

  .community-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    gap: 12px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contract-display {
    padding: 16px 18px;
  }

  .btn {
    padding: 16px 36px;
    width: 100%;
    max-width: 300px;
  }

  .lightbox-prev { left: 2px; padding: 12px; }
  .lightbox-next { right: 2px; padding: 12px; }
}

@media (max-width: 480px) {
  .hero-subtitle {
    margin-bottom: 32px;
  }

  .hero-tagline-wrap {
    padding: 8px 16px;
  }
}
