/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Mitochondria';
  src: url('../assets/fonts/Mitochondria.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'VT323Local';
  src: url('../assets/fonts/VT323-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'ComputerSaysNo';
  src: url('../assets/fonts/computer-says-no.otf') format('opentype');
  font-display: swap;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-padding-top: 85px; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

a {
  color: inherit;
  text-decoration: none;
}
a:hover, a:active { color: var(--core); }

/* ---------- Root ---------- */
:root {
  --u: clamp(7px, 1.1vw, 24px);
  --bg: #000000;
  --fg: #ffffff;
  --casual: #8FB8F0;
  --core: #B98FF0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'ComputerSaysNo', ui-monospace, monospace;
  line-height: 1.4;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.35em 2vw;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: var(--u);
}
.logo-link { display: flex; align-items: center; }
.logo {
  width: calc(var(--u) * 2.6);
  height: calc(var(--u) * 2.6);
  object-fit: contain;
}
.site-nav {
  display: flex;
  gap: 4vw;
  font-size: calc(var(--u) * 1.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a.active {
  color: var(--core);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: calc(-5.3 * var(--u) - 1px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(8vh + 5.3 * var(--u)) 5vw 8vh;
  border-bottom: 1px solid #1a1a1a;
  overflow: hidden;
}
.hero-fallback,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-video { z-index: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 55% 45% at 50% 52%, rgba(0,0,0,0.25), rgba(0,0,0,0) 70%),
    rgba(0,0,0,0.55);
}
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
}
.wordmark {
  font-family: 'Mitochondria', sans-serif;
  font-size: calc(var(--u) * 3);
  line-height: 1.2;
  padding-bottom: 0.15em;
  letter-spacing: 0.02em;
  margin: 0;
  font-weight: normal;
}
.tagline {
  margin: 2em auto 0;
  max-width: min(60ch, 90vw);
  font-size: calc(var(--u) * 1.7);
  line-height: 1.25;
  color: #e6e6e6;
  text-wrap: pretty;
}
.tagline .br-mobile { display: none; }

/* ---------- Community + carousel ---------- */
.community {
  display: flex;
  flex-direction: column;
  padding-bottom: 5vh;
}
.community-text {
  min-height: calc(100svh - 5.3 * var(--u) - 1px - 9vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 7vw 6vh;
}
.lead-in, .follow-on {
  font-size: calc(var(--u) * 2.8);
  letter-spacing: 0.04em;
  color: #cfcfcf;
  margin: 0;
}
.word-list {
  font-size: calc(var(--u) * 3.6);
  line-height: 1.35;
  margin: 0.23em 0 0.29em;
  text-wrap: pretty;
  font-weight: normal;
}
.word-list .term { white-space: nowrap; }
.word-list .sep { opacity: 0.55; }

.font-creators { font-family: 'Shrikhand', cursive; font-size: 1em; }
.font-founders { font-family: 'DM Serif Display', serif; font-size: 1.02em; }
.font-dreamers { font-family: 'Pinyon Script', cursive; font-size: 1.1em; }
.font-learners { font-family: 'Schoolbell', cursive; font-size: 1.05em; }
.font-community { font-family: 'Bungee', sans-serif; font-size: 0.82em; }
.font-artists { font-family: 'Permanent Marker', cursive; font-size: 0.98em; }
.font-makers { font-family: 'Stardos Stencil', sans-serif; font-weight: 700; font-size: 1.05em; }
.font-engineers { font-family: 'Orbitron', sans-serif; font-weight: 600; font-size: 0.82em; }
.font-researchers { font-family: 'Special Elite', monospace; font-size: 0.98em; }
.font-designers { font-family: 'Bodoni Moda', serif; font-style: italic; font-weight: 500; font-size: 1.02em; }
.font-coders { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 0.95em; }

/* Button */
.btn {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: flex-start;
  gap: 0.3em 0.6em;
  padding: 0.4em 1em;
  border-radius: 999px;
  color: #000;
  font-family: 'ComputerSaysNo', ui-monospace, monospace;
  font-size: calc(var(--u) * 1.5);
  line-height: 1.25;
  letter-spacing: 0.04em;
  white-space: normal;
  max-width: 100%;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.08); color: #000; }
.btn .arrow { font-family: 'ComputerSaysNo', ui-monospace, monospace; font-size: 1em; line-height: 1; flex-shrink: 0; }
.btn-community { background: var(--casual); margin-top: 1.4em; align-self: flex-start; }
.btn-community:hover { transform: translateY(-1px); }
.btn-casual { background: var(--casual); }
.btn-core { background: var(--core); }

/* Carousel */
.carousel-viewport { width: 100%; }
.carousel-track {
  display: flex;
  width: 100%;
  height: 19vw;
  min-height: 120px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.dragging { cursor: grabbing; }
.carousel-inner {
  display: flex;
  align-items: center;
  gap: 1.4vw;
  flex-shrink: 0;
  padding-right: 1.4vw;
}
.c-photo {
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Tiers ---------- */
.tiers {
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(5.3 * var(--u) + 3vh) 5vw 4vh;
}
.tiers-heading {
  font-family: 'VT323Local', 'VT323', monospace;
  font-size: calc(var(--u) * 2.85);
  letter-spacing: 0.01em;
  margin: 0 0 4vh;
  font-weight: normal;
}
.tiers-list {
  border-top: 1px solid #8a8a8a;
}
.tier-row {
  display: grid;
  grid-template-columns: minmax(9em, 0.32fr) minmax(0, 1fr);
  gap: 3vw;
  padding: 3.6vh 0 4vh;
  border-bottom: 1px solid #8a8a8a;
}
.tier-name {
  font-family: 'Caveat', cursive;
  font-size: calc(var(--u) * 3.4);
  line-height: 1;
  font-weight: 700;
}
.tier-casual { color: var(--casual); }
.tier-core { color: var(--core); }
.tier-price {
  font-size: calc(var(--u) * 1.5);
  line-height: 1.25;
  color: #e2e2e2;
  margin-top: 0.5em;
}
.tier-note {
  font-size: calc(var(--u) * 1.5);
  line-height: 1.25;
  color: #e2e2e2;
  margin-top: 0.2em;
}
.tier-right {
  display: flex;
  flex-direction: column;
  gap: 3vh;
}
.tier-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: calc(var(--u) * 1.5);
  line-height: 1.05;
  color: #fff;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.tier-perks li {
  display: flex;
  gap: 0.6em;
  align-items: baseline;
}
.tier-perks .bullet { flex-shrink: 0; }
.sponsored-line {
  font-size: calc(var(--u) * 1.5);
  color: #e2e2e2;
  margin: -1.2vh 0 0;
}
.sponsored-link {
  color: var(--core);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.opening-hours {
  margin-top: auto;
  padding-top: 3vh;
  padding-bottom: 3vh;
  border-bottom: 1px solid #8a8a8a;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15em 2.5em;
  font-size: calc(var(--u) * 1.5);
  color: #e2e2e2;
}
.oh-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9a9a9a;
}

/* ---------- Quote + collage ---------- */
.quote-section {
  height: auto;
  display: flex;
  align-items: center;
  padding: 10vh 4vw;
  border-bottom: 1px solid #1a1a1a;
}
.quote-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 6vw;
  align-items: center;
}
.quote-text blockquote {
  margin: 0;
  font-size: calc(var(--u) * 2.3);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-wrap: pretty;
  font-style: normal;
}
.attribution {
  font-family: 'Caveat', cursive;
  font-size: calc(var(--u) * 1.65);
  color: #cfcfcf;
  margin: 1.2em 0 0;
}

.collage {
  position: relative;
  aspect-ratio: 504/616;
  width: min(100%, 440px);
  margin: 0 auto;
}
.collage-photo {
  position: absolute;
  background-size: cover;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  transform: rotate(var(--rot));
  transition: transform 0.45s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.45s ease;
  padding: 0;
  overflow: hidden;
  display: block;
}
.collage-photo.active {
  z-index: 10 !important;
  box-shadow: 0 24px 50px rgba(0,0,0,0.7);
}
/* dx < 0 rotates further negative, dx > 0 rotates further positive */
.collage-photo[style*="--dx:-"].active {
  transform: translate(var(--dx), -6%) rotate(calc(var(--rot) - 2deg)) scale(1.05);
}
.collage-photo:not([style*="--dx:-"]).active {
  transform: translate(var(--dx), -6%) rotate(calc(var(--rot) + 2deg)) scale(1.05);
}
.collage-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.7em 0.6em 0.6em;
  background: linear-gradient(transparent, rgba(0,0,0,0.85) 35%);
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.collage-photo.active .collage-caption {
  opacity: 1;
  transform: translateY(0);
}
.c-name {
  font-size: calc(var(--u) * 1.7);
  line-height: 1.15;
  color: #fff;
  font-family: 'ComputerSaysNo', ui-monospace, monospace;
}
.c-desc {
  font-size: calc(var(--u) * 1.3);
  line-height: 1.15;
  color: #e2e2e2;
  margin-top: 0.2em;
}
.collage-hint { display: none; }
.collage-hint-desktop {
  display: block;
  margin-top: 0.4em;
  font-size: calc(var(--u) * 1.3);
  color: #8a8a8a;
  text-align: center;
}

/* ---------- About page ---------- */
.about-section {
  padding: 12vh 5vw 10vh;
  border-bottom: 1px solid #1a1a1a;
}
.about-content {
  max-width: 100%;
  margin: 0 auto;
}
.about-heading {
  font-family: 'Mitochondria', sans-serif;
  font-size: calc(var(--u) * 2.4);
  line-height: 1.2;
  padding-bottom: 0.15em;
  letter-spacing: 0.02em;
  margin: 0 0 1.2em;
  font-weight: normal;
}
.about-content p {
  font-size: calc(var(--u) * 1.5);
  line-height: 1.5;
  color: #e2e2e2;
  text-wrap: pretty;
  margin: 0 0 1.4em;
}
.about-content strong {
  color: #fff;
  font-weight: normal;
}
.about-cta {
  margin-top: 2em;
  text-align: left;
}
.about-question {
  font-family: 'Caveat', cursive;
  font-size: calc(var(--u) * 3);
  color: var(--core);
  margin: 0 0 0.6em !important;
}

/* ---------- Footer ---------- */
footer#contact {
  border-top: 1px solid #1a1a1a;
  padding: 5vw 4vw 2vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1em;
}
.footer-wordmark {
  font-family: 'Mitochondria', sans-serif;
  font-size: calc(var(--u) * 2);
  line-height: 0.9;
  margin-bottom: 0.4em;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.02em;
  font-size: calc(var(--u) * 1.33);
  letter-spacing: 0.06em;
  color: #bdbdbd;
}
.footer-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.6em;
}
.footer-label {
  color: #9a9a9a;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* ===================================================================
   MOBILE  (< 768px)
   =================================================================== */
@media (max-width: 767px) {
  :root { --m: clamp(0.85px, calc(100vw / 390), 1.15px); }

  .site-header {
    height: 56px;
    padding: 0 18px;
    font-size: 1px;
  }
  .logo { width: clamp(22px, 7vw, 30px); height: clamp(22px, 7vw, 30px); }
  .site-nav {
    gap: 20px;
    font-size: 17pt;
    letter-spacing: 0.06em;
  }
  .site-nav a { display: inline-block; padding: 12px 0; }

  html { scroll-padding-top: 56px; }

  .hero {
    margin-top: -57px;
    min-height: 100svh;
    padding: 96px 24px 64px;
  }
  .hero-overlay {
    background:
      radial-gradient(ellipse 70% 40% at 50% 52%, rgba(0,0,0,0.25), rgba(0,0,0,0) 70%),
      rgba(0,0,0,0.55);
  }
  .wordmark { font-size: clamp(22px, 7vw, 34px); }
  .tagline {
    font-size: 17pt;
    line-height: 1.3;
    max-width: none;
    width: 100%;
    margin-top: 24px;
  }
  .tagline .br-mobile { display: inline; }
  .tagline .br-desktop { display: none; }

  .community { padding: 0; }
  .community-text {
    min-height: 0;
    padding: 72px 22px 48px;
  }
  .lead-in, .follow-on { font-size: 15pt; }
  .word-list {
    font-size: calc(var(--m) * 25);
    line-height: 1.4;
    margin: 14px 0 16px;
  }
  .btn-community { margin-top: 24px; }

  .carousel-track { height: 200px; }
  .carousel-inner { gap: 8px; padding-right: 8px; }

  .tiers {
    height: auto;
    min-height: 0;
    padding: 56px 22px;
  }
  .tiers-heading { font-size: calc(var(--m) * 24); margin-bottom: 32px; white-space: nowrap; }
  .tier-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 0 32px;
  }
  .tier-name { font-size: calc(var(--m) * 40); }
  .tier-price, .tier-note { font-size: 15pt; }
  .tier-right { gap: 18px; }
  .tier-perks { font-size: 15pt; line-height: 1.1; gap: 6px; }
  .sponsored-line { font-size: 15pt; margin-top: 0; }
  .opening-hours { flex-direction: column; gap: 2px; font-size: 15pt; }

  .quote-section {
    height: auto;
    min-height: 0;
    padding: 32px 22px 28px;
  }
  .quote-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .quote-text blockquote { font-size: 15pt; line-height: 1.3; }
  .attribution { font-size: calc(var(--m) * 24); }
  .collage { width: min(100%, 420px); margin: 0 auto; }
  .c-name { font-size: 12px; }
  .c-desc { font-size: 10px; }
  .collage-hint-mobile {
    display: block;
    font-size: 15pt;
    color: #8a8a8a;
    text-align: center;
    margin-top: 1px;
  }
  .collage-hint-desktop { display: none; }

  footer#contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 40px 22px 24px;
  }
  .footer-wordmark { font-size: clamp(16px, 5vw, 24px); }
  .footer-links {
    flex-direction: column;
    gap: 0;
    font-size: 15pt;
  }
  .footer-links a, .footer-links span { padding: 1px 0; }

  .btn {
    font-size: 15pt;
  }

  .about-section { padding: 80px 22px 64px; }
  .about-heading { font-size: 28px; margin-bottom: 20px; }
  .about-content p { font-size: 15pt; line-height: 1.5; margin-bottom: 20px; }
  .about-question { font-size: 32px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .collage-photo { transition: none; }
}
