@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

/* ═══════════════════════════════════════════════════════════
   VALDORIAN — GLOBAL STYLESHEET
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --black:      #080c08;
  --deep:       #0c1209;
  --surface:    #111a0e;
  --raised:     #172013;
  --border:     #243320;

  /* Gold — primary accent (dominant) */
  --gold:       #c8a842;
  --gold-light: #e0c060;
  --gold-dark:  #8a7020;
  --gold-dim:   #6a5518;

  /* Green — secondary accent */
  --green:      #5a8a42;
  --green-dim:  #3d6030;
  --green-pale: #8ab878;

  /* Text */
  --text:       #a0b890;
  --text-dim:   #5a7050;
  --text-bright:#c8dab8;
  --white:      #e8f0d8;

  /* Fonts */
  --font-pixel: 'Press Start 2P', monospace;
  --font-body:  'Courier Prime', monospace;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  cursor: none !important;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── PIXEL CURSOR ───────────────────────────────────────── */
#cursor-canvas {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  top: 0; left: 0;
}

/* ─── LEAVES CANVAS ──────────────────────────────────────── */
#leaves-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  image-rendering: pixelated;
}

/* ─── SCANLINES (subtle) ─────────────────────────────────── */
#scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); }
::selection { background: var(--gold); color: var(--black); }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, padding 0.4s, border-color 0.4s;
}
#site-nav.scrolled {
  background: rgba(8, 12, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 4rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(200,168,66,0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-logo-img {
  width: 24px; height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}
.nav-logo-name {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.25s;
  line-height: 1;
}
.nav-logo-name .accent { color: var(--gold); }
.nav-logo:hover .nav-logo-name { color: var(--gold-light); }

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  position: relative;
  transition: color 0.25s;
  padding-bottom: 5px;
  line-height: 1;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease-out);
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold-light); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 20px; height: 1px;
  background: var(--text-dim);
  transition: all 0.25s;
}

/* ═══════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* Section label */
.section-label {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1.25rem;
  line-height: 1;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-pixel);
  color: var(--white);
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}
h1 { font-size: clamp(1.4rem, 3.5vw, 2.8rem); letter-spacing: 0.08em; }
h2 { font-size: clamp(0.9rem, 2vw, 1.5rem);   letter-spacing: 0.08em; }
h3 { font-size: clamp(0.7rem, 1.5vw, 1rem);   letter-spacing: 0.06em; }

/* Pixel ornament divider */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 3rem;
  width: fit-content;
}
.ornament-line {
  width: 64px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dark));
}
.ornament .ornament-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold-dark));
}
.ornament-diamond {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color 0.35s;
  line-height: 1;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.35s var(--ease-out);
}
.btn:hover { color: var(--black); }
.btn:hover::before { transform: translateX(0); }
.btn span, .btn svg { position: relative; z-index: 1; }
.btn svg { transition: transform 0.25s; }
.btn:hover svg { transform: translateX(4px); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-ghost::before { background: var(--surface); }
.btn-ghost:hover { color: var(--text-bright); }

/* Tags */
.tag {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  line-height: 1;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 2rem;
  line-height: 1;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

/* Pixel corners for boxes */
.pixel-frame {
  position: relative;
  border: 1px solid var(--border);
}
.pixel-frame::before, .pixel-frame::after,
.pixel-frame .pf-bl, .pixel-frame .pf-br {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--gold-dark);
  border-style: solid;
}
.pixel-frame::before  { top: 8px;    left: 8px;  border-width: 1px 0 0 1px; }
.pixel-frame::after   { top: 8px;    right: 8px; border-width: 1px 1px 0 0; }
.pixel-frame .pf-bl   { bottom: 8px; left: 8px;  border-width: 0 0 1px 1px; }
.pixel-frame .pf-br   { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
#site-footer {
  border-top: 1px solid var(--border);
  margin-top: 8rem;
  background: var(--deep);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 4rem 4rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 4rem;
}
.footer-brand {}
.footer-logo-name {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--white);
  margin-bottom: 0.875rem;
  line-height: 1;
}
.footer-logo-name .accent { color: var(--gold); }
.footer-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.footer-copy {
  font-family: var(--font-pixel);
  font-size: 0.32rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  line-height: 2.2;
}
.footer-col-title {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  line-height: 1;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.875rem; }
.footer-col a {
  font-family: var(--font-pixel);
  font-size: 0.36rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.25s;
  line-height: 1;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-pixel);
  font-size: 0.34rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.footer-status-dot {
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom-left,
.footer-bottom-right {
  font-family: var(--font-pixel);
  font-size: 0.32rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  line-height: 1;
}
.footer-diamond { color: var(--gold); margin-right: 0.5rem; }

/* ═══════════════════════════════════════════════════════════
   PAGE SECTIONS — SHARED
   ═══════════════════════════════════════════════════════════ */

/* Pixel grid bg utility */
.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

/* Glitch text effect */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--white);
}
.glitch::before {
  color: rgba(200,168,66, 0.55);
  animation: glitch1 7s steps(1) infinite;
}
.glitch::after {
  color: rgba(90,138,66, 0.6);
  animation: glitch2 7s steps(1) infinite;
}
@keyframes glitch1 {
  0%, 94%, 100% { clip-path: none; transform: none; }
  95%  { clip-path: inset(15% 0 65% 0); transform: translateX(-3px); }
  96%  { clip-path: inset(45% 0 25% 0); transform: translateX(3px); }
  97%  { clip-path: inset(72% 0 8%  0); transform: translateX(-2px); }
}
@keyframes glitch2 {
  0%, 93%, 100% { clip-path: none; transform: none; }
  94%  { clip-path: inset(55% 0 18% 0); transform: translateX(2px); }
  95%  { clip-path: inset(18% 0 55% 0); transform: translateX(-2px); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  #site-nav { padding: 1.25rem 2rem; }
  #site-nav.scrolled { padding: 0.875rem 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 3rem; padding: 4rem 2rem 3rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { padding: 1.25rem 2rem; }
}

@media (max-width: 768px) {
  #cursor-canvas { display: none !important; }
  *, *::before, *::after { cursor: auto !important; }

  #site-nav { padding: 1rem 1.5rem; }
  #site-nav.scrolled { padding: 0.75rem 1.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(8,12,8,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 0.875rem 1.5rem; font-size: 0.45rem; }
  .nav-links a::after { display: none; }
  .nav-hamburger { display: flex; }

  .btn { padding: 0.875rem 1.5rem; font-size: 0.42rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.5rem 2.5rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { padding: 1.25rem 1.5rem; flex-direction: column; gap: 0.75rem; text-align: center; }
  .footer-bottom-right { display: none; }
}

@media (max-width: 480px) {
  .btn { width: 100%; justify-content: center; }
}
