/* =========================================================
   Fox Goblin — Twilight Sanctuary
   Palette: twilight indigo / fox ember / mystic violet /
            healing aurora teal / moonlight cream
   ========================================================= */

:root {
  --twilight: #120c22;
  --twilight-2: #0c0818;
  --panel: #191130;
  --ember: #ff9a4d;
  --ember-deep: #ff7a2e;
  --violet: #a78bfa;
  --teal: #5eead4;
  --cream: #f5efe6;
  --muted: #a79fb8;
  --line: rgba(167, 159, 184, 0.16);

  --maxw: 1160px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

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

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

body {
  background: var(--twilight);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--ember); color: var(--twilight-2); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { color: var(--cream); font-weight: 600; }
em { font-style: normal; color: var(--teal); }

/* ---------- shared type ---------- */
.eyebrow, .section__eyebrow, .media__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.6rem; }
.section__eyebrow--center { justify-content: center; }
.tick { width: 22px; height: 1px; background: var(--ember); display: inline-block; }

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.section__lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  max-width: 60ch;
  margin-top: 1.4rem;
}

.grad { -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad--teal { background-image: linear-gradient(100deg, var(--teal), #8ff5e2); }
.grad--ember { background-image: linear-gradient(100deg, var(--ember), #ffcf9a); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn--solid {
  color: var(--twilight-2);
  background: linear-gradient(120deg, var(--ember), var(--ember-deep));
  box-shadow: 0 10px 30px -10px rgba(255, 122, 46, 0.7);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 122, 46, 0.85); }
.btn--ghost {
  color: var(--cream);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem var(--pad);
  background: rgba(18, 12, 34, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { color: var(--ember); display: inline-flex; width: 34px; height: 34px; filter: drop-shadow(0 0 9px rgba(255, 154, 77, 0.45)); }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer__brand .brand__mark { width: 30px; height: 30px; }
.brand__word { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav__links a:hover { color: var(--cream); }
.nav__cta { padding: 0.6rem 1.15rem; font-size: 0.9rem; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: clamp(4rem, 10vh, 8rem) var(--pad) 4rem;
  overflow: hidden;
}

.aurora { position: absolute; inset: 0; z-index: 0; filter: blur(70px); opacity: 0.8; }
.aurora__band { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora__band--violet {
  width: 55vw; height: 55vw; top: -18vw; left: -8vw;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 62%);
  animation: drift1 22s ease-in-out infinite;
}
.aurora__band--teal {
  width: 48vw; height: 48vw; top: 4vw; right: -10vw;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.42), transparent 62%);
  animation: drift2 26s ease-in-out infinite;
}
.aurora__band--ember {
  width: 42vw; height: 42vw; bottom: -16vw; left: 26vw;
  background: radial-gradient(circle, rgba(255, 154, 77, 0.42), transparent 60%);
  animation: drift3 30s ease-in-out infinite;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(6vw,4vw) scale(1.1);} }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-5vw,5vw) scale(1.08);} }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(3vw,-4vw) scale(1.12);} }

/* intro video melds with the twilight; aurora glows behind it as fallback */
.hero__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero__video[data-empty="true"] { display: none; }
.hero__video--intro { transition: opacity 0.6s ease; }
.hero__video--loop { opacity: 0; transition: opacity 0.6s ease; }
.hero__video--intro.is-hidden { opacity: 0; }
.hero__video--loop.is-shown { opacity: 0.55; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, var(--twilight) 8%, rgba(18,12,34,0.55) 45%, rgba(18,12,34,0.15) 100%),
    linear-gradient(0deg, var(--twilight) 2%, transparent 40%);
}

.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* page-wide ember field: fixed behind all content, above the twilight base */
.embers-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.eyebrow { display: block; margin-bottom: 1.6rem; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 1.5rem + 6vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero__title-accent {
  background: linear-gradient(105deg, var(--ember) 0%, var(--violet) 55%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede {
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  max-width: 46ch; margin-top: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero__actions--center { justify-content: center; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 3.4rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero__stats dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hero__stats dd { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1; margin-top: 0.5rem; }
.hero__stats dd span { display: block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-top: 0.35rem; }

.scroll-hint { position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); z-index: 2; width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 12px; }
.scroll-hint span { position: absolute; top: 7px; left: 50%; width: 3px; height: 7px; border-radius: 2px; background: var(--ember); transform: translateX(-50%); animation: scrolldot 1.8s ease-in-out infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translate(-50%, 0);} 40% { opacity: 1;} 80% { opacity: 0; transform: translate(-50%, 12px);} 100% { opacity: 0;} }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4.5rem, 11vh, 8rem) var(--pad); }

/* ---------- MISSION ---------- */
.mission__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.mission__body p + p { margin-top: 1.1rem; }
.mission__body { color: var(--muted); }
@media (max-width: 820px) { .mission__grid { grid-template-columns: 1fr; } }

/* ---------- SOLUTION ---------- */
.solution__title { max-width: 24ch; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 3.2rem; }
.card {
  position: relative;
  padding: 2rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1px;
  background: linear-gradient(160deg, rgba(94,234,212,0.4), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover { transform: translateY(-5px); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card__num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ember); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0.9rem 0 0.7rem; }
.card p { color: var(--muted); font-size: 1rem; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* ---------- COLLECTION / ANGEL 1111 ---------- */
.collection { text-align: center; }
.angel { max-width: 900px; margin: 0 auto; }
.angel__number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6rem, 4rem + 18vw, 20rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--cream) 0%, var(--violet) 60%, rgba(167,139,250,0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 60px rgba(167, 139, 250, 0.35));
  margin: 0.5rem 0;
}
.angel__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 22ch; margin: 0 auto; }
.angel__lede { margin-left: auto; margin-right: auto; }

.specs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin: 2.6rem auto 0; max-width: 720px; }
.specs li { display: flex; gap: 0.55rem; align-items: baseline; padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; }
.specs__k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.specs__v { color: var(--cream); font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.gallery__tile {
  aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(255,154,77,0.14), var(--panel));
  transition: transform 0.3s ease;
}
.gallery__tile--v { background: radial-gradient(circle at 50% 40%, rgba(167,139,250,0.18), var(--panel)); }
.gallery__tile--t { background: radial-gradient(circle at 50% 40%, rgba(94,234,212,0.16), var(--panel)); }
.gallery__tile--e { background: radial-gradient(circle at 50% 40%, rgba(255,122,46,0.2), var(--panel)); }
.gallery__tile:hover { transform: translateY(-6px) rotate(-1.5deg); }
.gallery__note { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 1.3rem; }

.fox-emblem { display: inline-flex; color: var(--ember); width: 46%; filter: drop-shadow(0 0 14px rgba(255,154,77,0.45)); }
.fox-emblem svg, .fox-emblem img { width: 100%; height: auto; display: block; }
.gallery__tile--v .fox-emblem { color: var(--violet); filter: drop-shadow(0 0 14px rgba(167,139,250,0.5)); }
.gallery__tile--t .fox-emblem { color: var(--teal); filter: drop-shadow(0 0 14px rgba(94,234,212,0.5)); }
.fox-emblem--lg { width: 84px; }
@media (max-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- IMPACT / VALUES ---------- */
.values { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin: 3rem 0 0; }
.values li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.15rem;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.values li:hover { border-color: var(--teal); transform: translateY(-3px); }
.values__i { color: var(--teal); font-size: 0.9rem; }
@media (max-width: 820px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .values { grid-template-columns: 1fr; } }

.pledge {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); line-height: 1.25;
  letter-spacing: -0.02em; max-width: 24ch; margin: 3.4rem 0 0;
  padding-left: 1.5rem; border-left: 2px solid var(--ember);
}

/* ---------- COMMUNITY ---------- */
.community__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 3rem; }
.media {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem;
  min-height: 190px; padding: 1.7rem; border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--panel), var(--twilight-2));
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.media--wide { grid-column: 1 / -1; min-height: 240px; justify-content: flex-end; background: linear-gradient(120deg, rgba(255,122,46,0.16), var(--panel) 70%); }
a.media:hover { transform: translateY(-5px); border-color: var(--ember); }
.media__tag { color: var(--teal); }
.media__title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.media__meta { color: var(--muted); font-size: 0.95rem; }
.media__play { position: absolute; top: 1.5rem; right: 1.7rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,154,77,0.18); color: var(--ember); font-size: 0.9rem; }
.media--static { opacity: 0.92; }
@media (max-width: 720px) { .community__grid { grid-template-columns: 1fr; } }

/* ---------- CLOSING ---------- */
.closing { text-align: center; }
.closing__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.closing__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.025em; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: center;
}
.footer__brand { display: flex; align-items: center; gap: 0.8rem; }
.footer__word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.footer__tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.3rem; align-items: center; }
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--cream); }
.footer__soon { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(167,159,184,0.5); }
.footer__fine { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
@media (max-width: 720px) { .footer { grid-template-columns: 1fr; } }

/* =========================================================
   VIDEO / NFT ADDITIONS
   ========================================================= */
.btn { cursor: pointer; }
.btn--play { border: none; }
/* watch-the-promo sits in the hero as a ghost button — give it a slightly
   stronger edge than the default ghost line so it reads as a real button */
.btn--ghost.btn--play { border: 1px solid rgba(167, 159, 184, 0.32); }
.btn__ico { font-size: 0.72em; margin-right: 0.2rem; }

/* real NFT art fills each collection tile; emblem shows if it fails to load */
.gallery__tile { position: relative; overflow: hidden; }
.gallery__img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
a.gallery__tile:hover .gallery__img { transform: scale(1.06); }

/* playable community cards use their poster frame as the backdrop */
button.media {
  font: inherit; text-align: left; color: inherit;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.media--video {
  background-image:
    linear-gradient(155deg, rgba(12,8,24,0.66), rgba(10,7,20,0.9)),
    var(--poster);
  background-size: cover; background-position: center;
}
/* keep our overlay text legible over busy poster frames */
.media--video .media__title,
.media--video .media__meta { text-shadow: 0 1px 10px rgba(0,0,0,0.75); }
/* the recognition clip has burned-in text — dim it further */
.media--video[data-video="assets/recognition.mp4"] {
  background-image:
    linear-gradient(155deg, rgba(10,7,20,0.84), rgba(8,5,16,0.95)),
    var(--poster);
}
.media--video:hover .media__play { background: var(--ember); color: var(--twilight-2); transform: scale(1.08); }
.media__play { transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease; }

/* video lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 5vw, 4rem);
  opacity: 0; transition: opacity 0.28s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(6,4,12,0.88); backdrop-filter: blur(10px); }
.lightbox__frame {
  position: relative; z-index: 1; width: min(1040px, 100%);
  transform: scale(0.95); transition: transform 0.28s ease;
}
.lightbox.is-open .lightbox__frame { transform: scale(1); }
.lightbox__video {
  display: block; width: 100%; max-height: 82vh;
  border-radius: 16px; background: #000;
  box-shadow: 0 40px 90px -25px rgba(0,0,0,0.85);
}
.lightbox__close {
  position: absolute; top: -3.2rem; right: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--cream); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox__close:hover { border-color: var(--ember); color: var(--ember); }
@media (max-width: 620px) { .lightbox__close { top: -3rem; } }
