/* ===== Rally FOX ($RALF) — base styles =====
   Background: assets/bg-forest.jpg as a fixed-position backdrop layer (body::before),
   lightly darkened for legibility only. Palette: white + orange only, no green. */

:root{
  --bg: #08090a;
  --bg-raised: #0f1210;
  --bg-card: #101512;
  --line: #1d2620;
  --line-strong: #2a3a30;
  --text: #f5f1ea;
  --text-dim: #c9beae;
  --text-faint: #8a7e70;
  --orange: #ff7a33;
  --orange-strong: #ffa066;
  --orange-line: rgba(255,122,51,0.45);
  --orange-glow: rgba(255,122,51,0.35);
  --ink: #1c0f08;
  --font-display: 'Rajdhani', 'Space Grotesk', Arial, sans-serif;
  --font-body: 'Space Grotesk', Arial, sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: url('../assets/cursor.png') 7 5, auto;
}

/* Fixed backdrop as its own layer (not background-attachment:fixed, which
   reveals a solid-color gap on scroll/overscroll in many mobile browsers).
   Stacked with plain positive z-index (0 vs 1) rather than a negative
   z-index, which avoids a Chromium flicker bug where a negative-z-index
   fixed layer briefly blanks out during smooth-scroll compositing. */
.bg-layer{
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8,10,8,0.32), rgba(8,10,8,0.4)),
    url('../assets/bg-forest.jpg') center / cover no-repeat;
}

.page{
  position: relative;
  z-index: 1;
}

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

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

h1,h2,h3{ font-family: var(--font-display); margin: 0; }

.accent{ color: var(--orange); }

a, button, .link-card, .gallery-item, .lightbox-close, .nav-toggle, .text-panel{
  cursor: url('../assets/cursor.png') 7 5, pointer;
}

/* ===== Nav ===== */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(253,250,245,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28,15,8,0.08);
}

.nav-logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.nav-logo span{ color: var(--orange); }

.nav-logo-icon{
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-links{
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav-links a{
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b5c4c;
  transition: color .2s ease;
  position: relative;
}
.nav-links a:hover{ color: var(--orange); }

.nav-cta{
  border: 1px solid var(--orange-line);
  color: var(--orange);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.nav-cta:hover{
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 0 24px var(--orange-glow);
  border-color: var(--orange);
}

.nav-toggle{ display: none; }

/* ===== Hero ===== */
.hero{
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  overflow: hidden;
}

.hero-content{ max-width: 720px; }

.hero-eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: var(--orange);
  margin-bottom: 18px;
}

.hero-title{
  font-size: clamp(48px, 10vw, 108px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.hero-ticker{
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin: 14px 0 0;
}

.hero-tagline{
  color: var(--text-dim);
  font-size: 17px;
  max-width: 480px;
  margin: 20px auto 0;
}

.hero-actions{
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ===== Text panels (white cards for Hero / The Fox / Ral's Notes) ===== */
.text-panel{
  background: #fdfaf5;
  border-radius: 16px;
  padding: 32px clamp(20px, 4vw, 40px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.32);
  transition: transform .25s ease, box-shadow .25s ease;
  color: var(--ink);
  --text: var(--ink);
  --text-dim: #5b4c3d;
  --text-faint: #7a6a58;
  --orange: #e35c22;
  --orange-line: rgba(227,92,34,0.4);
  --orange-glow: rgba(227,92,34,0.3);
  --line: #e8e0d2;
}
.text-panel.is-active{
  transform: scale(1.025);
  box-shadow: 0 24px 52px rgba(0,0,0,0.4);
}

.hero-panel{
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all .2s ease;
  border: 1px solid transparent;
}

.btn-primary{
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 0 0 rgba(255,122,51,0);
}
.btn-primary:hover{
  box-shadow: 0 0 30px var(--orange-glow);
  transform: translateY(-2px);
}

.btn-ghost{
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover{
  border-color: var(--orange);
  color: var(--orange);
}

/* ===== Sections ===== */
.section{
  padding: 100px 32px;
  max-width: 1120px;
  margin: 0 auto;
}

.section-title{
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title .tag{
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--orange);
  border: 1px solid var(--orange-line);
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.05em;
}

.section-sub{
  color: var(--text-faint);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 0 0;
}

/* ===== About ===== */
.about-body{
  margin-top: 32px;
  max-width: 680px;
  color: var(--text-dim);
  font-size: 17px;
}
.about-body p + p{ margin-top: 16px; }

/* ===== Gallery ===== */
.gallery-grid{
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.gallery-item{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #10261a, #0a0c0b);
}

.gallery-item .ph-fill{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  transition: transform .35s ease;
}

.gallery-item .ph-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(6,10,8,0.72);
  opacity: 0;
  transition: opacity .25s ease;
}

.gallery-item .ph-overlay .loupe{
  width: 34px;
  height: 34px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  position: relative;
}
.gallery-item .ph-overlay .loupe::after{
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  background: var(--orange);
  bottom: -6px;
  right: -8px;
  transform: rotate(45deg);
}

.gallery-item .ph-overlay span.caption{
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange);
}

.gallery-item:hover .ph-fill{ transform: scale(1.05); }
.gallery-item:hover .ph-overlay{ opacity: 1; }

/* ===== Lightbox ===== */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4,6,5,0.92);
  backdrop-filter: blur(6px);
  padding: 40px;
}
.lightbox.is-open{ display: flex; }

.lightbox-frame{
  width: min(700px, 90vw);
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--orange-line);
  background: linear-gradient(135deg, #10261a, #0a0c0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 60px var(--orange-glow);
}

.lightbox-close{
  position: absolute;
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  transition: all .2s ease;
}
.lightbox-close:hover{
  border-color: var(--orange);
  color: var(--orange);
}

/* ===== Signal ===== */
.signal-list{
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.signal-item{
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.signal-date{
  font-family: var(--font-display);
  color: var(--orange);
  font-size: 14px;
  letter-spacing: 0.05em;
  min-width: 60px;
  flex-shrink: 0;
}

.signal-text{ color: var(--text-dim); font-size: 15px; }

/* ===== Token cards ===== */
.card-grid{
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.link-card{
  display: block;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.link-card:hover{
  transform: translateY(-4px);
  border-color: var(--orange-line);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 24px var(--orange-glow);
}

.link-card.is-disabled{
  opacity: 0.55;
  cursor: url('../assets/cursor.png') 7 5, default;
}
.link-card.is-disabled:hover{
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}

.link-card-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-card-id{
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-icon{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.link-icon svg{ width: 100%; height: 100%; }
.link-icon svg path{ fill: var(--text-dim); transition: fill .2s ease; }
.link-card:hover .link-icon svg path{ fill: var(--orange); }

.link-icon-img{
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.link-card-label{
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.link-card-arrow{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--orange);
  transition: transform .25s ease, border-color .25s ease;
}
.link-card:hover .link-card-arrow{
  transform: rotate(45deg);
  border-color: var(--orange);
}

.link-card-value{
  margin: 18px 0 10px;
  font-size: 14px;
  color: var(--text-dim);
  word-break: break-all;
}

.link-card-badge{
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ===== Footer ===== */
.site-footer{
  padding: 48px 32px 64px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 13px;
}
.site-footer p{ margin: 4px 0; }
.footer-disclaimer{ max-width: 480px; margin: 8px auto 0; }

/* ===== Scroll reveal ===== */
.reveal{
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: none;
}

/* ===== Particles ===== */
.particles{
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.particle{
  position: absolute;
  bottom: -6%;
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.4);
  box-shadow: 0 0 4px rgba(255,250,240,0.35);
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes particle-rise{
  0%{ transform: translate(0, 0); opacity: 0; }
  10%{ opacity: 0.4; }
  90%{ opacity: 0.4; }
  100%{ transform: translate(var(--drift, 30px), -112vh); opacity: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 820px){
  .nav-links{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: #fdfaf5;
    border-bottom: 1px solid rgba(28,15,8,0.08);
  }
  .nav-links.is-open{ display: flex; }
  .nav-links a{
    width: 100%;
    text-align: center;
    padding: 16px;
    border-top: 1px solid rgba(28,15,8,0.08);
  }
  .nav-toggle{
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
  }
  .nav-toggle span{
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }
  .section{ padding: 72px 20px; }
}
