/*
  Shared across every page: design tokens, base reset, the logo mark,
  the dropdown nav, the Sign Up CTA, the mobile hamburger menu, and the
  footer. Each page still defines its own `.site-header` positioning
  rule locally (the homepage needs position:fixed + pointer-events
  trickery to sit over the WebGL canvas; inner pages just want a plain
  sticky white bar) — that part is genuinely page-specific.
*/

:root {
  --red: #e2231a;
  --black: #111111;
  --white: #ffffff;
  --grey: #6b6b6b;
  --font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; color: var(--black); flex-shrink: 0; }
.logo-mark { flex-shrink: 0; }
.logo-word {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Main nav (conventional dropdowns) ---------- */
.main-nav { display: flex; align-items: center; gap: 26px; }
.nav-item { position: relative; }
.nav-item-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  padding: 8px 0;
}
a.nav-item-trigger { display: inline-flex; }
.nav-caret {
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s ease, margin-top 0.2s ease;
}
.nav-item:hover .nav-caret { transform: rotate(-135deg); margin-top: 3px; }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-inner {
  min-width: 190px;
  padding: 2px 0 2px 16px;
  border-left: 1.5px solid var(--black);
}
.nav-dropdown a {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: var(--black);
  white-space: nowrap;
}
.nav-dropdown a:hover { color: var(--red); }

.cta-signup {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.cta-signup:hover { background: #c31d15; }

/* ---------- Mobile menu (hamburger + fullscreen overlay) ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  border: 1px solid var(--black);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle .bars { display: flex; flex-direction: column; gap: 4px; }
.menu-toggle .bar {
  width: 16px; height: 1.5px; background: var(--black);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle.is-open .bars .bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle.is-open .bars .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .bars .bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--white);
  padding: 110px 32px 40px;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.mobile-nav-overlay.is-open { transform: translateY(0); }
.mobile-nav-group { margin-bottom: 30px; }
.mobile-nav-group-title {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 12px;
}
.mobile-nav-group a, .mobile-nav-top {
  display: block;
  font-size: 21px;
  font-weight: 600;
  padding: 7px 0;
  color: var(--black);
}
.mobile-nav-group a:hover, .mobile-nav-top:hover { color: var(--red); }

@media (max-width: 980px) {
  .main-nav { display: none; }
  /* The header's own gap (44px, set per-page since the homepage/inner
     pages need different positioning) is too wide once main-nav drops
     out and it's just the CTA + hamburger left in the row. Pull the
     hamburger in to ~18px from the button instead. */
  .menu-toggle { display: flex; margin-left: -26px; }
}
@media (min-width: 981px) {
  .mobile-nav-overlay { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  background: #131210;
  color: #9c9a94;
  padding: 48px 32px 40px;
  font-size: 12.5px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.site-footer address { font-style: normal; line-height: 1.6; }
.site-footer a:hover { color: var(--white); }
.footer-links, .footer-social, .footer-nav {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6862;
  margin-bottom: 14px;
}

/* ---------- Artwork card (used by Browse — Grid and Profile) ---------- */
.artwork-card { display: block; }
.artwork-card.is-filtered-out,
.artwork-card.is-paginated-hidden { display: none; }
.artwork-card-image {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 14px;
  background: #f2f0ec;
}
.artwork-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}
.artwork-card:hover .artwork-card-image img { transform: scale(1.05); filter: grayscale(0); }
.artwork-card-title { font-size: 14px; font-weight: 600; margin: 0 0 3px; }
.artwork-card-artist { font-size: 12.5px; color: var(--grey); margin: 0; }

/* ---------- Scroll-reveal (used across all inner pages) ---------- */
[data-reveal], .artwork-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible, .artwork-card.is-visible { opacity: 1; transform: translateY(0); }
