/* ==========================================================================
   EIGHT COUNT PROJECTS — BRAND CSS
   Shared across all pages. Update once, applies everywhere.
   ========================================================================== */

:root {
  --ink: #0d0d0d;
  --ink-soft: #161616;
  --cream: #f4ede2;
  --bone: #ebe3d4;
  --red: #ff3b1f;
  --rust: #8a2d1c;
  --dim: #6b6b6b;
  --dim-text: #c8c2b5;
  --line: rgba(244, 237, 226, 0.12);
  --line-strong: rgba(244, 237, 226, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* GRAIN OVERLAY — gives the site a film/zine texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   LOADER (home only — uses .loader-active class on body)
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.done {
  opacity: 0;
  visibility: hidden;
}
.loader-count {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 14vw, 200px);
  line-height: 1;
  letter-spacing: 0.04em;
}
.loader-num {
  color: var(--dim);
  transition: color 0.15s ease, transform 0.2s ease;
  display: inline-block;
}
.loader-num.active {
  color: var(--red);
  transform: translateY(-6px);
}
.loader-dot {
  color: var(--dim);
  font-size: 0.55em;
  line-height: 1;
  align-self: center;
  transform: translateY(-0.18em);
  transition: color 0.15s ease;
}
.loader-dot.active { color: var(--red); }
.loader-period {
  color: var(--dim);
  transition: color 0.15s ease;
}
.loader-period.active { color: var(--red); }

.site-content {
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}
.site-content.revealed,
.site-content.no-loader {
  opacity: 1;
  transition: none;
}

/* ==========================================================================
   TOP BAR + NAV
   ========================================================================== */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.top-mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
}
.top-mark .eight {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--cream);
  position: relative;
}
.top-mark .eight::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -3px;
  right: -3px;
  height: 1.5px;
  background: var(--red);
  transform: translateY(-50%) rotate(-12deg);
}
.top-mark .name {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--cream);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width 0.3s;
}
.nav a:hover { color: var(--red); }
.nav a:hover::after { width: 100%; }
.nav a.active { color: var(--red); }
.nav a.active::after { width: 100%; }

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.top-status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cream);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */
main {
  flex: 1;
  padding: 60px 40px;
  position: relative;
}

.section {
  padding: 80px 40px;
  border-top: 1px solid var(--line);
  position: relative;
}
.section:first-child { border-top: none; }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 28px;
}
.section-eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--red);
}

.section-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.section-title .red {
  color: var(--red);
  display: inline-block;
}

/* Subhead under section titles */
.section-sub {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  color: var(--dim-text);
  max-width: 760px;
  margin-bottom: 56px;
}
.section-sub em {
  color: var(--red);
  font-weight: 600;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dim);
  flex-wrap: wrap;
  gap: 16px;
}
footer .signature em {
  color: var(--red);
  font-style: normal;
}
footer .dedication {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dim);
  font-size: 13px;
}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

/* Big red CTA pill */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--red);
  color: var(--ink);
  padding: 18px 28px;
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}
.cta-button:hover {
  background: var(--cream);
  transform: translateY(-2px);
}
.cta-button .arrow { transition: transform 0.3s; }
.cta-button:hover .arrow { transform: translateX(4px); }

/* Outline pill button */
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--cream);
  color: var(--cream);
  padding: 16px 26px;
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}
.cta-secondary:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ==========================================================================
   ENTRANCE ANIMATIONS
   ========================================================================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rise {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .top { padding: 16px 20px; }
  .top-left { gap: 16px; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--ink);
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    z-index: 49;
  }
  .menu-toggle { display: inline-block; }
  .top-status { display: none; }
  main { padding: 40px 20px; }
  .section { padding: 60px 20px; }
  footer { padding: 18px 20px; flex-direction: column; gap: 10px; align-items: flex-start; }
}
