/* ==========================================================================
   apethreedee* — Shared Stylesheet
   Applies to: index.html, work.html, work/character-*.html
   Do NOT add page-specific rules here. Do NOT hardcode hex values — use tokens.
   ========================================================================== */


/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* ── DESIGN TOKENS ── */
:root {
  --bg:             #fafafa;
  --surface:        #ffffff;
  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #999999;
  --border:         #e5e5e5;
  --border-light:   #f0f0f0;
  --accent:         #111111;
  --accent-hover:   #333333;
  --placeholder-bg: #e8e8e8;
  --nav-bg:         rgba(250, 250, 250, 0.69);
  --radius-btn:     12px;
  --radius-img:     10px;
}


/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 2rem 1rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-logo {
  font-family: "avory-i-pe-variable", "Inter", sans-serif;
  font-variation-settings: 'wght' 700;
  font-size: 1.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  position: relative;
}

/* Gradient shimmer overlay — always animating, fades in on hover */
.nav-logo::before {
  content: 'apethreedee*';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #FF00CC  0%,
    #CC00FF  20%,
    #8800FF  40%,
    #4400FF  60%,
    #0066FF  80%,
    #FF0099  100%,
    #FF00CC  120%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: logo-gradient-flow 1.8s linear infinite;
  pointer-events: none;
  white-space: nowrap;
  /* Inherit exact font rendering */
  font-family: inherit;
  font-variation-settings: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.nav-logo:hover::before { opacity: 1; }

@keyframes logo-gradient-flow {
  from { background-position: 0% center; }
  to   { background-position: -200% center; }
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--text-primary);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }


/* ── HAMBURGER ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }


/* ── BUTTON SYSTEM ── */
.btn-primary,
.btn-outline,
.btn-submit,
.filter-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary,
.btn-submit {
  padding: 0.58rem 1.6rem;
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}

.btn-primary:hover,
.btn-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  padding: 0.58rem 1.6rem;
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--text-primary);
}

.btn-outline:hover {
  background: var(--text-primary);
  color: #fff;
}

.filter-pill {
  padding: 0.58rem 1.6rem;
  border: 1.5px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ── UTILITY ── */
.placeholder-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
}


/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 40px;
}


/* ── BACK LINK ── */
.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

.back-link:hover { color: var(--text-primary); }


/* ── FOOTER ── */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.25s;
}

.footer-socials a:hover { color: var(--text-primary); }
.footer-socials svg { width: 20px; height: 20px; }

.footer-back-top {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

.footer-back-top:hover { color: var(--text-primary); }


/* ── ANIMATIONS & REVEAL ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible { opacity: 1; transform: none; }


/* ── RESPONSIVE — 900px ── */
@media (max-width: 900px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.9rem 1.5rem;
  }

  .nav-logo { margin-bottom: 0; }

  .hamburger {
    display: flex;
    position: static;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    padding: 0.8rem 0 0.6rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.6rem;
  }

  .nav-links.open { display: flex; }

  .section-header { margin-bottom: 2rem; }
  .section-title  { letter-spacing: 0.10em; }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
  }
}

/* ── RESPONSIVE — 600px ── */
@media (max-width: 600px) {
  .section-title { letter-spacing: 0.08em; }
}
