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

:root {
  --clr-bg-1: #2b1b0b; /* deep brown */
  --clr-bg-2: #4b3717; /* warm brown */
  --clr-accent: #f0c040; /* bread gold */
  --clr-text: #f8f5f1;
  --clr-dark: #0d0d0d;
  --skew-angle: -4deg;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Chewy', cursive;
  background: linear-gradient(135deg, var(--clr-bg-1), var(--clr-bg-2));
  color: var(--clr-text);
  overflow-x: hidden;
}

h1,
h2 {
  font-family: 'Anton', Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Panels */
.panel {
  /* min-height removed to tighten spacing */
  padding: clamp(2rem, 5vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
}

/* Skewed panels for broken-layout vibe */
.skew {
  transform: skewY(var(--skew-angle));
}
.skew > * {
  transform: skewY(calc(var(--skew-angle) * -1));
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4));
}
#hero > * {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

#loaf-img {
  width: min(70vw, 320px);
  transition: transform 0.6s ease;
  will-change: transform;
}
#loaf-img:hover {
  transform: scale(1.15) rotate(10deg);
}

.epic-title {
  font-family: 'Anton', Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: 2px;
  position: relative;
  background: linear-gradient(90deg, #fff 0%, #ffd54f 25%, #fff 50%, #ffd54f 75%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

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

/* old glitch class retained for legacy but hidden */
.glitch {
  font-size: clamp(2.5rem, 8vw, 6rem);
  position: relative;
  white-space: nowrap;
  display:none;
  animation: glitch 2s infinite;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #f0f;
  clip-path: inset(15% 0 25% 0);
}
.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #0ff;
  clip-path: inset(75% 0 5% 0);
}
@keyframes glitch {
  0% {
    clip-path: inset(0 0 0 0);
  }
  20% {
    clip-path: inset(10% 0 85% 0);
  }
  40% {
    clip-path: inset(80% 0 0 0);
  }
  60% {
    clip-path: inset(15% 0 60% 0);
  }
  80% {
    clip-path: inset(40% 0 40% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.cta {
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
  border: none;
  cursor: pointer;
  color: var(--clr-dark);
  background: var(--clr-accent);
  border-radius: 999px;
  box-shadow: 0 0.35em 0 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.cta:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* Narrative paragraphs */
.narrative {
  max-width: 50ch;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.shout {
  font-weight: 900;
  color: var(--clr-accent);
}

/* Prophecy */
.prophecy-title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
.prophecy-list {
  list-style: none;
  margin-bottom: 2rem;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
}
.prophecy-list li {
  margin: 0.5rem 0;
}

.youtube {
  width: 90%;
  max-width: 700px;
  aspect-ratio: 16/9;
  border-radius: 0.75rem;
  border: 4px solid var(--clr-accent);
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.6);
}

/* Form */
#cult-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 420px;
  width: 100%;
}
#cult-form label {
  display: flex;
  flex-direction: column;
  font-size: 1.1rem;
  gap: 0.5rem;
}
#cult-form input[type="text"] {
  padding: 0.6rem;
  border-radius: 0.5rem;
  border: 2px solid var(--clr-accent);
  outline: none;
}
#cult-form input[type="range"] {
  accent-color: var(--clr-accent);
}

#cult-response {
  margin-top: 1rem;
  font-size: 1.3rem;
}
.hidden {
  display: none;
}

/* Footer */
footer {
  padding: 1rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--clr-text);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  border-top: 2px solid var(--clr-accent);
}
.heart {
  color: red;
}

/* Radiant rotating rays background */
#rays {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 200vmax;
  height: 200vmax;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255,255,255,0.06) 0deg, rgba(255,255,255,0.06) 6deg, transparent 6deg, transparent 12deg);
  animation: spinRays 40s linear infinite;
  mix-blend-mode: overlay;
  z-index: 0;
  border-radius: 50%;
}


@keyframes spinRays {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Holy flash animation */
@keyframes flashFade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Canvas overlay for crumbs removed */

/* Hero overlay big text */
#hero::before {
  content: "LOAF";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Anton', Impact, sans-serif;
  font-size: 35vw;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
  pointer-events: none;
}

/* Full-height panels */
.full {
  min-height: 100vh;
}

/* Timeline styling – vertical, alternating sides */
.timeline {
  position: relative;
  margin: 3rem auto;
  max-width: 900px;
  width: 100%;
  padding: 0 2rem;
}
/* center line */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(var(--clr-accent), transparent 60%);
}
/* events */
.timeline .event {
  position: relative;
  width: 50%;
  padding: 1.2rem 2rem;
  box-sizing: border-box;
}
/* alternating */
.timeline .event:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline .event:nth-child(even) {
  left: 50%;
}
/* connector dots */
.timeline .event::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-dark);
}
.timeline .event:nth-child(odd)::before {
  right: -8px;
}
.timeline .event:nth-child(even)::before {
  left: -8px;
}
/* year styling */
.timeline .year {
  display: block;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 1.4rem;
  color: var(--clr-accent);
  margin-bottom: 0.25rem;
}
@media (max-width: 700px) {
  .timeline::before {
    left: 8px;
    transform: none;
  }
  .timeline .event,
  .timeline .event:nth-child(even),
  .timeline .event:nth-child(odd) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 2.5rem;
  }
  .timeline .event::before {
    left: 0;
  }
}

/* Token card */
.token-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 3rem auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  max-width: 840px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--clr-accent);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  text-align: center;
}
.token-title {
  font-family: 'Chewy', cursive;
  font-size: clamp(1.3rem, 3vw, 2rem);
}
.address-box {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--clr-dark);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  user-select: all;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: var(--clr-text);
}
.copy-btn {
  background: var(--clr-accent);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--clr-dark);
}
.copy-btn:active {
  transform: translateY(2px);
}
.twitter-btn { /* deprecated inside card */
  display: inline-block;
  background: #1da1f2;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.twitter-btn:hover {
  background: #0d8ae5;
}

/* Floating Twitter button */
.twitter-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #1da1f2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
  z-index: 10;
}
.twitter-fab:hover {
  background: #0d8ae5;
  transform: scale(1.05);
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  width: 100%;
}
.gallery img {
  width: 100%;
  border-radius: 0.5rem;
  border: 3px solid var(--clr-accent);
  box-shadow: 0 0 0.75rem rgba(0,0,0,0.5);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  body {
    font-size: 90%;
  }
  #loaf-img {
    width: 60vw;
  }
}
