:root {
  --black: #070403;
  --black-soft: #100907;
  --oxblood: #4b0708;
  --red: #8f1717;
  --red-hot: #d4492f;
  --brown: #3a2116;
  --earth: #6b4933;
  --nude: #c9ad86;
  --beige: #ead4af;
  --muted: #bba783;
  --border: rgba(234, 212, 175, 0.28);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  --glow: 0 0 30px rgba(183, 28, 24, 0.5);
  --heading: "Cinzel", Georgia, serif;
  --body: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--beige);
  font-family: var(--body);
  background:
    radial-gradient(circle at 50% 0%, rgba(143, 23, 23, 0.32), transparent 34rem),
    radial-gradient(circle at 15% 65%, rgba(107, 73, 51, 0.26), transparent 28rem),
    linear-gradient(180deg, var(--black), #120705 48%, #070403);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 232, 191, 0.05), transparent 35%),
    repeating-linear-gradient(90deg, rgba(234, 212, 175, 0.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: overlay;
  opacity: 0.45;
  z-index: 2;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-texture,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.site-texture {
  background:
    radial-gradient(circle at 20% 20%, rgba(234, 212, 175, 0.08) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 70% 35%, rgba(143, 23, 23, 0.1) 0 1px, transparent 1px 9px),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  opacity: 0.32;
}

.grain {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 0.5px, transparent 0.8px),
    radial-gradient(circle, rgba(0, 0, 0, 0.34) 0 0.7px, transparent 1px);
  background-size: 11px 11px, 17px 17px;
  animation: grainShift 7s steps(5) infinite;
  opacity: 0.15;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 3.5rem);
  background: linear-gradient(180deg, rgba(7, 4, 3, 0.78), rgba(7, 4, 3, 0));
}

.brand,
.footer strong {
  font-family: var(--heading);
  font-weight: 900;
  letter-spacing: 0;
}

.nav-links,
.footer-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.6rem);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links a,
.footer-links a {
  transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--beige);
  text-shadow: 0 0 18px rgba(212, 73, 47, 0.75);
}

.section {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.section-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(5.5rem, 11vw, 8.5rem) 0;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -4vh 0;
  background-image: url("images/devoto_landingpage.png");
  background-size: cover;
  background-position: center;
  transform: translateY(var(--parallax-y, 0));
  transition: transform 80ms linear;
  z-index: -3;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(173, 44, 31, 0.08), transparent 18rem),
    linear-gradient(90deg, rgba(7, 4, 3, 0.86), rgba(75, 7, 8, 0.42), rgba(7, 4, 3, 0.76)),
    linear-gradient(180deg, rgba(7, 4, 3, 0.18), rgba(7, 4, 3, 0.88));
  z-index: -2;
}

.hero-content {
  width: min(980px, calc(100% - 2rem));
  padding-top: 3rem;
  text-align: center;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.75);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--nude);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: #f4dfb8;
  font-family: var(--heading);
  font-size: clamp(4.4rem, 16vw, 13rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: clamp(1rem, 2vw, 1.4rem) 0 0;
  color: var(--beige);
  font-family: var(--heading);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: min(100%, 29rem);
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.95rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 212, 175, 0.56);
  box-shadow: var(--glow), 0 16px 44px rgba(0, 0, 0, 0.42);
}

.button-primary {
  color: #fff3d7;
  background: linear-gradient(135deg, var(--red), #45110b 55%, var(--earth));
}

.button-secondary,
.button-disabled {
  color: var(--beige);
  background: rgba(16, 9, 7, 0.72);
  backdrop-filter: blur(10px);
}

.button-disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.button-disabled:hover {
  transform: none;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
}

.hero-reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: heroFadeUp 850ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-reveal:nth-child(2) {
  animation-delay: 130ms;
}

.hero-reveal:nth-child(3) {
  animation-delay: 260ms;
}

.hero-reveal:nth-child(4) {
  animation-delay: 390ms;
}

.scroll-mark {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  width: 1.5rem;
  height: 2.5rem;
  border: 1px solid rgba(234, 212, 175, 0.38);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-mark span {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--beige);
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}

.lore,
.token {
  background:
    linear-gradient(180deg, rgba(7, 4, 3, 0), rgba(75, 7, 8, 0.14), rgba(7, 4, 3, 0)),
    radial-gradient(circle at 80% 30%, rgba(107, 73, 51, 0.24), transparent 26rem);
}

.lore-grid,
.token-grid,
.devoted-grid {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.lore-grid,
.token-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr);
}

.copy-block h2,
.devoted h2,
.token h2 {
  margin: 0;
  color: var(--beige);
  font-family: var(--heading);
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lore-copy {
  margin-top: 1.7rem;
  color: rgba(234, 212, 175, 0.82);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.75;
}

.lore-copy p {
  margin: 0 0 1rem;
}

.model-frame,
.image-shrine {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background:
    linear-gradient(145deg, rgba(234, 212, 175, 0.08), rgba(143, 23, 23, 0.09)),
    rgba(16, 9, 7, 0.78);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.model-frame::before,
.image-shrine::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(234, 212, 175, 0.18), transparent 16rem),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.38));
  pointer-events: none;
  z-index: 1;
}

model-viewer {
  display: block;
  width: 100%;
  height: clamp(24rem, 46vw, 38rem);
  background: radial-gradient(circle at 50% 42%, rgba(143, 23, 23, 0.25), rgba(7, 4, 3, 0.96) 70%);
}

.devoted {
  min-height: 92vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 45%, rgba(212, 73, 47, 0.22), transparent 22rem),
    radial-gradient(circle at 78% 60%, rgba(234, 212, 175, 0.1), transparent 24rem),
    linear-gradient(135deg, #0b0403, #2a0a08 52%, #100704);
}

.devoted::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(108deg, rgba(234, 212, 175, 0.035) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(24deg, rgba(143, 23, 23, 0.06) 0 2px, transparent 2px 34px);
  transform: translate3d(calc(var(--parallax-y, 0) * -0.2), var(--parallax-y, 0), 0);
  z-index: -1;
}

.devoted-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.devoted h2 {
  max-width: 8ch;
  text-shadow: 0 0 34px rgba(212, 73, 47, 0.26);
}

.rotator {
  display: inline-flex;
  min-width: min(100%, 34rem);
  margin-top: 1.3rem;
  color: #fff4db;
  font-family: var(--heading);
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 30px rgba(212, 73, 47, 0.58);
}

.rotator span {
  display: inline-block;
  transition: opacity 360ms ease, transform 360ms ease, filter 360ms ease;
}

.rotator span.is-changing {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(18px) scale(0.96);
}

.jump-shrine {
  transform: rotate(-1.5deg);
}

.manbull-shrine {
  transform: rotate(1.2deg);
}

.image-shrine img {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.92);
}

.token-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1fr);
}

.token-subtitle {
  margin: 0.7rem 0 1.8rem;
  color: var(--nude);
  font-family: var(--heading);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
}

.token-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.info-card {
  min-height: 8rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(234, 212, 175, 0.06), rgba(75, 7, 8, 0.14)),
    rgba(16, 9, 7, 0.7);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.info-card span {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.info-card strong {
  color: var(--beige);
  font-family: var(--heading);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.1;
}

.footer {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
  padding: 2rem clamp(1rem, 4vw, 3.5rem);
  border-top: 1px solid var(--border);
  background: #070403;
}

.footer div {
  display: grid;
  gap: 0.25rem;
}

.footer span {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 800ms ease, transform 800ms ease;
}

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

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes grainShift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-1%, 1%);
  }
  40% {
    transform: translate(1%, -1%);
  }
  60% {
    transform: translate(1%, 1%);
  }
  80% {
    transform: translate(-1%, -1%);
  }
}

@keyframes scrollDot {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  45% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: translate(-50%, 1.1rem);
  }
}

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

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    padding-top: 0.9rem;
  }

  .nav-links {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  .hero {
    min-height: 96svh;
  }

  .hero-bg {
    background-position: 54% center;
  }

  .lore-grid,
  .devoted-grid,
  .token-grid {
    grid-template-columns: 1fr;
  }

  .token-grid .image-shrine {
    order: 2;
  }

  .token-grid .token-content {
    order: 1;
  }

  .devoted h2 {
    max-width: 9ch;
  }

  .token-cards {
    grid-template-columns: 1fr;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .site-header {
    background: linear-gradient(180deg, rgba(7, 4, 3, 0.9), rgba(7, 4, 3, 0));
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero-title {
    font-size: clamp(3.35rem, 18vw, 5.1rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section-inner {
    width: min(100% - 1.25rem, 1180px);
  }

  .copy-block h2,
  .devoted h2,
  .token h2 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  model-viewer,
  .image-shrine img {
    min-height: 20rem;
    height: 24rem;
  }

  .footer-links {
    width: 100%;
    justify-content: space-between;
  }
}
