:root {
  --tar: #0d0b0a;
  --tar-soft: #1a1410;
  --tar-mid: #2a211c;
  --sewer: #3d4a32;
  --sewer-mist: #5a6b48;
  --brick: #b54a2e;
  --brick-hot: #d45a38;
  --goo: #c4a35a;
  --goo-pale: #e8d5a3;
  --ink: #f2ebe3;
  --ink-mute: #b8aea3;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", Roboto, sans-serif;
  background: var(--tar);
  color: var(--ink);
}

.font-display {
  font-family: Roboto, "Open Sans", sans-serif;
}

/* Atmosphere */
.bg-tar-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(90, 107, 72, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(181, 74, 46, 0.12), transparent 50%),
    linear-gradient(180deg, #14110e 0%, #0d0b0a 45%, #12160f 100%);
}

.noise-overlay::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Header */
.site-header {
  background: rgba(13, 11, 10, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-solid {
  background: rgba(13, 11, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(90, 107, 72, 0.35);
}

.site-logo-img {
  height: 2.25rem;
  width: auto;
}

@media (min-width: 768px) {
  .site-logo-img {
    height: 2.5rem;
  }
}

.site-nav-link {
  color: var(--ink-mute);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: var(--ink);
  background: rgba(90, 107, 72, 0.2);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--ink);
  font-weight: 600;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(90, 107, 72, 0.25);
}

#mobile-menu {
  background: rgba(13, 11, 10, 0.98);
  border-bottom: 1px solid rgba(90, 107, 72, 0.35);
}

/* Buttons */
.btn-brick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, var(--brick-hot), var(--brick));
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.4rem;
  border-radius: 0.65rem;
  box-shadow: 0 8px 24px rgba(181, 74, 46, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-brick:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(181, 74, 46, 0.45);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(196, 163, 90, 0.45);
  color: var(--goo-pale);
  font-weight: 700;
  padding: 0.85rem 1.4rem;
  border-radius: 0.65rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(196, 163, 90, 0.12);
  border-color: var(--goo);
  transform: translateY(-1px);
}

/* Sticky / goo hover */
.goo-link {
  position: relative;
  transition: color 0.2s ease;
}

.goo-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brick), var(--goo));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.goo-link:hover::after {
  transform: scaleX(1);
}

/* Hero */
.hero-bleed {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bleed__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bleed__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 11, 10, 0.35) 0%, rgba(13, 11, 10, 0.55) 40%, rgba(13, 11, 10, 0.92) 100%),
    radial-gradient(ellipse at 30% 70%, rgba(90, 107, 72, 0.25), transparent 50%);
}

.hero-drip {
  position: absolute;
  top: 0;
  width: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.9), rgba(196, 163, 90, 0.35));
  animation: drip 6s ease-in-out infinite;
  opacity: 0.55;
}

@keyframes drip {
  0%, 100% { height: 28px; opacity: 0.35; }
  50% { height: 72px; opacity: 0.7; }
}

.page-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 11, 10, 0.4), rgba(13, 11, 10, 0.95));
}

/* Content */
.prose-gish p {
  color: var(--ink-mute);
  line-height: 1.75;
  margin-bottom: 1.1rem;
}

.prose-gish strong {
  color: var(--ink);
  font-weight: 700;
}

.section-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 107, 72, 0.55), transparent);
}

.ability-tile {
  border: 1px solid rgba(90, 107, 72, 0.35);
  background: linear-gradient(180deg, rgba(42, 33, 28, 0.85), rgba(13, 11, 10, 0.9));
  border-radius: 1rem;
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ability-tile:hover {
  border-color: rgba(196, 163, 90, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(90, 107, 72, 0.45);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brick);
  box-shadow: 0 0 0 3px rgba(181, 74, 46, 0.25);
}

.breadcrumb a {
  color: var(--ink-mute);
}

.breadcrumb a:hover {
  color: var(--goo-pale);
}

.site-footer {
  border-top: 1px solid rgba(90, 107, 72, 0.35);
  background: #0a0908;
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fade-up 0.9s ease both;
}

.animate-fade-up-delay {
  animation: fade-up 0.9s ease 0.15s both;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .animate-fade-up, .animate-fade-up-delay, .hero-drip {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
