/* ===========================================
   main.css — Shared styles for weareren.org
   Covers: tokens, reset, utilities, nav,
           menu, footer, scroll-to-top, keyframes
=========================================== */

/* ===========================================
   TOKENS
=========================================== */
:root {
  --black:      #080808;
  --off-black:  #0f0f0f;
  --dark:       #161616;
  --mid:        #252525;
  --light:      #f0f0f0;
  --border:     rgba(255,255,255,0.07);
  --border-mid: rgba(255,255,255,0.14);
  --text:       #ffffff;
  --text-dim:   rgba(255,255,255,0.4);
  --text-mid:   rgba(255,255,255,0.65);
  --max-w:      1280px;
  --pad-x:      clamp(20px, 5vw, 64px);
  --pad-y:      clamp(80px, 10vw, 140px);
  --nav-h:      72px;
}

/* ===========================================
   RESET
=========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: 'League Gothic', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===========================================
   UTILITIES
=========================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dim { color: var(--text-dim); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, color 0.22s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--text);
  color: var(--black);
  border-color: var(--text);
}
.btn-fill {
  background: var(--text);
  color: var(--black);
  border-color: var(--text);
}
.btn-fill:hover {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.7);
}

/* ===========================================
   NAV
=========================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  height: var(--nav-h);
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
  transition: background 0.4s, box-shadow 0.4s;
}
/* Nav becomes invisible when menu is open so menu bleeds to top */
nav.menu-open {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

/* Desktop: start transparent, go solid on scroll */
@media (min-width: 769px) {
  nav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transition: background 0.4s, box-shadow 0.4s;
  }
  nav.scrolled {
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
  }
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img {
  height: 28px;
  width: auto;
}

/* ===========================================
   HAMBURGER
=========================================== */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: opacity 0.2s;
}
.hamburger:hover { opacity: 0.6; }
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===========================================
   MENU OVERLAY
=========================================== */
.menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  background-image: url('../img/menu-bg.jpg');
  background-size: cover;
  background-position: center top;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) var(--pad-x) 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.23,1,0.32,1);
  text-align: center;
}
.menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8,8,8,0.82);
  pointer-events: none;
}
.menu.open {
  opacity: 1;
  pointer-events: all;
}
.menu-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
  align-items: center;
}
.menu-links a {
  font-family: 'League Gothic', sans-serif;
  font-size: clamp(42px, 11vw, 60px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  line-height: 1.25;
  transform: translateY(16px);
  opacity: 0;
  transition: color 0.2s, transform 0.4s cubic-bezier(0.23,1,0.32,1), opacity 0.4s cubic-bezier(0.23,1,0.32,1);
}
.menu.open .menu-links a { transform: translateY(0); opacity: 1; }
.menu-links a:hover { color: var(--text); }
/* stagger delays */
.menu-links a:nth-child(1) { transition-delay: 0.05s; }
.menu-links a:nth-child(2) { transition-delay: 0.08s; }
.menu-links a:nth-child(3) { transition-delay: 0.11s; }
.menu-links a:nth-child(4) { transition-delay: 0.14s; }
.menu-links a:nth-child(5) { transition-delay: 0.17s; }
.menu-links a:nth-child(6) { transition-delay: 0.20s; }
.menu-links a:nth-child(7) { transition-delay: 0.23s; }
.menu-links a:nth-child(8) { transition-delay: 0.26s; }
.menu-links a:nth-child(9) { transition-delay: 0.29s; }
.menu-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: 100%;
  max-width: 400px;
}
.menu-social {
  display: flex;
  gap: 24px;
}
.menu-social a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.menu-social a:hover { color: var(--text); }
.menu-tagline {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ===========================================
   KEYFRAMES
=========================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sweep {
  0%   { left: -100%; }
  50%  { left: 100%; }
  100% { left: 100%; }
}

/* ===========================================
   SCROLL REVEAL
=========================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   FOOTER
=========================================== */
footer {
  padding: 72px 0 36px;
  background: var(--off-black);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.footer-logo img {
  height: 26px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.8;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 240px;
  margin-bottom: 24px;
}
.footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  transition: border-color 0.2s;
}
.footer-social a:hover { border-color: rgba(255,255,255,0.5); }
.footer-social a svg {
  width: 15px;
  height: 15px;
  fill: var(--text-mid);
  transition: fill 0.2s;
}
.footer-social a:hover svg { fill: var(--text); }
.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p,
.footer-bottom a {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.footer-bottom a:hover { color: var(--text); }

.simpli-credit {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.simpli-credit:hover { color: var(--text); }
.simpli-credit span {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ===========================================
   SCROLL-TO-TOP BUTTON
=========================================== */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 450;
  width: 44px;
  height: 44px;
  background: var(--dark);
  border: 1px solid var(--border-mid);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
  pointer-events: none;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.scroll-top:hover {
  background: var(--mid);
  border-color: rgba(255,255,255,0.3);
}
.scroll-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-mid);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}
.scroll-top:hover svg { stroke: var(--text); }

/* ===========================================
   MENU — desktop background swap
=========================================== */
@media (min-width: 768px) {
  .menu {
    background-image: url('../img/crew-group.jpg');
    background-position: center center;
  }
}

/* ===========================================
   RESPONSIVE — FOOTER
=========================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .footer-grid    { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom  { flex-direction: column; align-items: flex-start; gap: 10px; }
  .scroll-top     { bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); right: 20px; }
}

/* ===========================================
   LARGE SCREEN — 1440px+
=========================================== */
@media (min-width: 1440px) {
  :root {
    --max-w:  1500px;
    --pad-x:  80px;
    --pad-y:  160px;
  }
}

/* ===========================================
   LARGE SCREEN — 1920px+
=========================================== */
@media (min-width: 1920px) {
  :root {
    --max-w:  1760px;
    --pad-x:  100px;
    --pad-y:  200px;
  }
  /* Nav logo slightly larger */
  .nav-logo img { height: 34px; }
  /* Footer columns breathe more */
  .footer-grid  { gap: 80px; }
}
