/* ============================================================
   $alone nugget — site styles
   ============================================================ */

:root {
  --bg: #0a0612;
  --bg-2: #1a0a1f;
  --ink: #fff6e8;
  --ink-dim: #e9d4b8;
  --ink-mute: #8b7a6b;
  --gold: #ffb145;
  --gold-2: #ff7a1a;
  --magenta: #ff5fa0;
  --purple: #6a3aa8;
  --shadow: 0 0 0 1px rgba(255, 246, 232, 0.08);

  --grot: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "VT323", "Space Mono", monospace;
  --display: "Archivo Black", "Space Grotesk", sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
}

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

button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

/* ============================================================
   Global overlays — CRT scanlines, noise, fx canvas
   ============================================================ */

.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9001;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/></svg>");
  animation: noise-shift 1.4s steps(6) infinite;
}

@keyframes noise-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4%, 3%); }
  50%  { transform: translate(2%, -2%); }
  75%  { transform: translate(-3%, -1%); }
  100% { transform: translate(0, 0); }
}

#fx-canvas {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
}

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

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -4%;
  background-image: url("hero.png");
  background-size: cover;
  background-position: center center;
  z-index: 0;
  will-change: transform, filter;
  animation:
    kenburns 26s ease-in-out infinite alternate,
    hue-breathe 14s ease-in-out infinite;
  transform-origin: 50% 55%;
}

@keyframes kenburns {
  0%   { transform: scale(1.04) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1.2%, -0.6%); }
  100% { transform: scale(1.05) translate(1%, 0.4%); }
}

@keyframes hue-breathe {
  0%, 100% { filter: hue-rotate(0deg) saturate(1)   brightness(1); }
  50%      { filter: hue-rotate(-4deg) saturate(1.05) brightness(1.04); }
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
}

/* ----- Topbar ----- */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 44px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.brand-pixel {
  font-family: var(--pixel);
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.nav-link {
  position: relative;
  font-family: var(--pixel);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.02em;
  padding: 4px 2px;
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
}

.nav-link:hover {
  color: var(--ink);
  transform: translateY(-1px);
  text-shadow: 0 0 14px rgba(255, 177, 69, 0.7);
}

.nav-link:active {
  transform: translateY(0);
}

.copy-feedback {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -4px);
  font-family: var(--pixel);
  font-size: 14px;
  background: var(--gold);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

.copy-feedback.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----- Centered hero title (above the nugget) ----- */

.hero-title {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  text-align: center;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.75));
}

.hero-title span {
  display: inline-block;
  font-family: var(--pixel);
  font-size: clamp(64px, 11vw, 180px);
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow:
    0 0 32px rgba(255, 177, 69, 0.55),
    0 0 80px rgba(255, 100, 20, 0.25),
    0 3px 0 rgba(0, 0, 0, 0.5);
  animation: title-flicker 4.8s ease-in-out infinite;
}

@keyframes title-flicker {
  0%, 92%, 100% { opacity: 1; }
  94%           { opacity: 0.78; }
  96%           { opacity: 1; }
  97%           { opacity: 0.85; }
}

/* ----- Hero bottom row ----- */

.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 0 clamp(18px, 4vw, 44px) 26px;
}

.hero-bottom .music-toggle { justify-self: start; }
.hero-bottom .scroll-hint  { justify-self: center; }

.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(10, 6, 18, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 246, 232, 0.1);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 18px;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.music-toggle:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-1px);
}

.m-icon { display: inline-flex; }
.music-toggle .m-on { display: none; }
.music-toggle[aria-pressed="true"] .m-off { display: none; }
.music-toggle[aria-pressed="true"] .m-on { display: inline-flex; }
.music-toggle[aria-pressed="true"] { color: var(--bg); background: var(--gold); }

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--ink-dim);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  animation: float-down 2.4s ease-in-out infinite;
}

.scroll-hint .arrow { font-size: 10px; color: var(--gold); }

@keyframes float-down {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ============================================================
   ABOUT section
   ============================================================ */

.about {
  position: relative;
  padding: clamp(80px, 12vw, 160px) clamp(20px, 6vw, 80px) 60px;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}

.about-bg {
  position: absolute;
  inset: -4%;
  z-index: 0;
  background-image: url("hero2.png");
  background-size: cover;
  background-position: center center;
  will-change: transform, filter;
  animation:
    kenburns 30s ease-in-out infinite alternate,
    hue-breathe 16s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.about-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(106, 58, 168, 0.25), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(255, 122, 26, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(10, 6, 18, 0.55) 0%, rgba(10, 6, 18, 0.7) 60%, rgba(10, 6, 18, 0.88) 100%);
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 60vw, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
  z-index: 2;
}

.about-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}

.about-tag {
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 22px;
  letter-spacing: 0.04em;
}

.about-title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-transform: lowercase;
  margin-bottom: clamp(40px, 7vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 0.02em;
}

.about-title span {
  display: inline-block;
  padding-bottom: 0.08em;
}

.about-title .t-accent {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-2) 50%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin-bottom: clamp(48px, 8vw, 88px);
}

.about-text {
  font-family: var(--grot);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-dim);
}

.about-text strong {
  color: var(--gold);
  font-weight: 700;
}

/* CA block */

.ca-block {
  border: 1px solid rgba(255, 246, 232, 0.15);
  border-radius: 6px;
  padding: 22px clamp(18px, 3vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 177, 69, 0.04), rgba(255, 177, 69, 0.01)),
    rgba(10, 6, 18, 0.5);
  margin-bottom: clamp(48px, 7vw, 80px);
  position: relative;
}

.ca-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 177, 69, 0.5), transparent 50%);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.ca-label {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.ca-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ca-value {
  font-family: var(--pixel);
  font-size: clamp(18px, 2vw, 26px);
  color: var(--ink);
  word-break: break-all;
  flex: 1 1 240px;
}

.ca-copy {
  font-family: var(--pixel);
  font-size: 16px;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold);
  transition: background 0.18s, color 0.18s;
}

.ca-copy:hover {
  background: var(--gold);
  color: var(--bg);
}

/* Stats */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: rgba(255, 246, 232, 0.08);
  border: 1px solid rgba(255, 246, 232, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 80px;
}

.stat {
  background: rgba(10, 6, 18, 0.6);
  padding: 28px 20px;
  text-align: center;
}

.stat-num {
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 56px);
  color: var(--gold);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-num span {
  font-size: 0.5em;
  color: var(--ink-mute);
  margin-left: 2px;
}

.stat-label {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--ink-mute);
  text-transform: lowercase;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* Footer */

.foot {
  text-align: center;
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--ink-mute);
  padding-top: 40px;
  border-top: 1px solid rgba(255, 246, 232, 0.06);
}

.foot-dot { margin: 0 10px; color: var(--gold); }

/* ============================================================
   Responsive tweaks
   ============================================================ */

@media (max-width: 720px) {
  .topbar { padding: 14px 16px; }
  .nav { gap: 14px; }
  .nav-link { font-size: 18px; }
  .hero-bottom { padding: 0 16px 18px; }
  .hero-title { top: 18%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg, .sun-glow, .noise-overlay, .scroll-hint, .hero-title span {
    animation: none !important;
  }
}
