/* ==========================================================================
   Nice Barometer — site-wide stylesheet
   Referenced by every page:
     root pages:      <link rel="stylesheet" href="styles.css">
     /project pages:  <link rel="stylesheet" href="../styles.css">

   Per-page differences are scoped by a class on the <html> tag:
     .home     → index.html (film-strip landing page)
     .about    → about.html
     .contact  → contact.php
     .projects → project/index.html (project list)
     .project  → project detail / EPK pages (also project-template.html)
     .tsi      → project/tsi.html extras (2-column gallery)
   ========================================================================== */

@font-face {
  font-family: "Cherry Cream Soda";
  src: url("CherryCreamSoda-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #451f82;
  --fg: #f2efe9;
  --accent: #c8b89a;
  --muted: rgba(242, 239, 233, 0.82);
  --line: rgba(242, 239, 233, 0.14);
}

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

html, body {
  min-height: 100%;
  background: radial-gradient(circle at center, #451f82 0%, #162259 60%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Home page locks scrolling (everything is fixed-position) */
html.home, html.home body {
  height: 100%;
  overflow: hidden;
}

/* ---------- Page chrome ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2.5rem;
  z-index: 45;
  pointer-events: none;
}
header a { pointer-events: auto; }

.logo { text-decoration: none; color: var(--fg); }
.logo h1 {
  font-family: "Cherry Cream Soda", cursive;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.logo p {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

nav { display: flex; align-items: center; gap: 2rem; }
nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.95;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
nav a:hover { opacity: 1; }
nav a.active { color: var(--accent); }

.social { display: flex; align-items: center; gap: 1.1rem; }
.social a {
  display: inline-flex;
  color: #ffffff;
  opacity: 0.95;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.social a:hover { opacity: 1; }
.social svg { width: 1.4rem; height: 1.4rem; fill: currentColor; display: block; }

/* ---------- Mobile nav ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 50;
}
.nav-toggle span {
  display: block;
  width: 27px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  background: radial-gradient(circle at center, rgba(69, 31, 130, 0.5) 0%, rgba(22, 34, 89, 0.97) 70%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a.m-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.95;
}
.mobile-menu .social { margin-top: 0.75rem; gap: 1.6rem; }
.mobile-menu .social svg { width: 1.8rem; height: 1.8rem; }

footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
  padding: 1.5rem 2.5rem;
  z-index: 30;
  pointer-events: none;
}
footer a {
  pointer-events: auto;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.95;
  cursor: pointer;
  transition: color 0.25s ease, opacity 0.25s ease;
}
footer a:hover { color: var(--accent); opacity: 1; }

/* ---------- Edge fades (heights vary per page) ---------- */
.fade { position: fixed; z-index: 20; pointer-events: none; }

html.home .fade.top    { top: 0; left: 0; right: 0; height: 13rem; background: linear-gradient(to bottom, #162259 18%, transparent); }
html.home .fade.bottom { bottom: 0; left: 0; right: 0; height: 13rem; background: linear-gradient(to top, #162259 18%, transparent); }
html.home .fade.left   { top: 0; bottom: 0; left: 0; width: 7rem;  background: linear-gradient(to right, #162259, transparent); }
html.home .fade.right  { top: 0; bottom: 0; right: 0; width: 7rem; background: linear-gradient(to left, #162259, transparent); }

html.about .fade.top,
html.contact .fade.top,
html.projects .fade.top    { top: 0; left: 0; right: 0; height: 19rem; background: linear-gradient(to bottom, #162259 38%, transparent); }
html.about .fade.bottom,
html.contact .fade.bottom,
html.projects .fade.bottom { bottom: 0; left: 0; right: 0; height: 13rem; background: linear-gradient(to top, #162259 18%, transparent); }

html.project .fade.top    { top: 0; left: 0; right: 0; height: 14rem; background: linear-gradient(to bottom, #162259 30%, transparent); }
html.project .fade.bottom { bottom: 0; left: 0; right: 0; height: 12rem; background: linear-gradient(to top, #162259 22%, transparent); }

/* ==========================================================================
   Home page (index.html) — film strips
   ========================================================================== */
.hint {
  position: fixed;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 30;
  pointer-events: none;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  cursor: default;
  touch-action: none;
  overflow: hidden;
}
.scene.dragging { cursor: default; }

/* band center: strips are vertical stacks inside, rotated 45deg as a group */
.band {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(45deg);
}

.card {
  position: absolute;
  top: 0; left: 0;
  will-change: transform;
  background: #1a1a1a;
  overflow: hidden;
}
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ==========================================================================
   Shared content elements (about + projects pages)
   ========================================================================== */
.page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9rem 2.5rem 8rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
html.project .eyebrow { margin-bottom: 1.2rem; }

.headline {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
html.projects .headline,
html.contact .headline { margin-bottom: 1.6rem; }
/* word-by-word reveal */
.headline .word { display: inline-block; overflow: hidden; vertical-align: top; }
.headline .word > span { display: inline-block; }

.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.6;
  color: var(--fg);
  margin-bottom: 1.6rem;
  max-width: 60ch;
}
html.projects .lead { margin-bottom: 1rem; }
html.contact .lead { margin-bottom: 2.5rem; max-width: 52ch; }

/* animation start states (revealed by GSAP; visible if JS fails) */
.reveal { opacity: 1; }

/* ==========================================================================
   About page (about.html)
   ========================================================================== */
body .about { max-width: 760px; width: 100%; }

.body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.1rem;
  max-width: 64ch;
}
.body p strong { color: var(--fg); font-weight: 600; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(242, 239, 233, 0.14);
}
.pillar h3 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.pillar p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   Projects list (project/index.html)
   ========================================================================== */
body .projects { max-width: 820px; width: 100%; }

.project-list {
  margin-top: 2.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(242, 239, 233, 0.14);
}
body .project {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 2.75rem 0;
  border-bottom: 1px solid rgba(242, 239, 233, 0.14);
}
.project-banner {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(242, 239, 233, 0.12);
  margin-bottom: 1.6rem;
  background: rgba(242, 239, 233, 0.04);
}
.project-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* transform-only transition lives on the image, so it never fights the
     GSAP opacity/y reveal on the .project card itself */
  transition: transform 0.6s ease;
}
body .project:hover .project-banner img { transform: scale(1.045); }

.p-cat {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.p-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
  transition: color 0.25s ease;
}
body .project:hover .p-title { color: var(--accent); }
.p-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 60ch;
}
.p-more {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.85;
}
.p-more span {
  display: inline-block;
  transition: transform 0.25s ease;
}
body .project:hover .p-more span { transform: translateX(4px); }

/* ==========================================================================
   Project detail / EPK pages (project/*.html, project-template.html)
   ========================================================================== */
.wrap {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
  padding: 11rem 2.5rem 9rem;
}
.section { margin-top: 5.5rem; }

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

/* Hero */
.title {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.title .word { display: inline-block; overflow: hidden; vertical-align: top; }
.title .word > span { display: inline-block; }

.tagline {
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  line-height: 1.5;
  color: var(--fg);
  max-width: 62ch;
  margin-bottom: 1.8rem;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta span { white-space: nowrap; }
.meta span + span::before { content: "•"; margin-right: 1.4rem; color: var(--accent); }

.hero-img {
  margin-top: 2.5rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
/* Square show logo used as the hero graphic — show it whole, centered */
.hero-img.hero-logo {
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

/* Overview + facts */
.overview {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 3rem;
  align-items: start;
}
.prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1.1rem;
  max-width: 60ch;
}
.prose p strong { color: var(--fg); font-weight: 600; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(200, 184, 154, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.prose a:hover { color: var(--fg); text-decoration-color: var(--fg); }

.facts { display: grid; gap: 1.1rem; }
.fact { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.fact dt {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.fact dd { font-size: 0.98rem; color: var(--fg); }

/* Quotes */
.quotes { display: grid; gap: 2.2rem; }
.quote p {
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  font-weight: 300;
  color: var(--fg);
}
.quote cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
html.tsi .gallery { grid-template-columns: repeat(2, 1fr); }
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.gallery img.wide { grid-column: span 2; aspect-ratio: 2 / 1; }

/* Downloads (EPK) */
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.dl:hover { border-color: var(--accent); background: rgba(242, 239, 233, 0.04); }
.dl .name { font-size: 0.95rem; }
.dl .type { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Contact */
.contact-line {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--fg);
}
.contact-line a { color: var(--accent); text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

/* reveal fallback (visible if JS/GSAP unavailable) */
.fade-up { opacity: 1; }

/* ==========================================================================
   Contact page (contact.php)
   ========================================================================== */
body .contact { max-width: 620px; width: 100%; }

form { width: 100%; }
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.field input,
.field textarea {
  width: 100%;
  background: rgba(242, 239, 233, 0.06);
  border: 1px solid rgba(242, 239, 233, 0.18);
  border-radius: 8px;
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(242, 239, 233, 0.35); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(242, 239, 233, 0.1);
}
.field textarea { resize: vertical; min-height: 150px; }

/* honeypot: hidden from humans, present for bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

button.submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: #162259;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  border-radius: 8px;
  margin-top: 0.4rem;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
button.submit:hover { opacity: 0.9; transform: translateY(-1px); }

.note {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.note.ok {
  background: rgba(120, 200, 140, 0.12);
  border: 1px solid rgba(120, 200, 140, 0.4);
  color: #d6f0dc;
}
.note.error {
  background: rgba(220, 110, 110, 0.12);
  border: 1px solid rgba(220, 110, 110, 0.4);
  color: #f2d6d6;
}
.note ul { margin: 0.4rem 0 0 1.1rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  header { padding: 1.5rem 1.5rem; }
  nav > a, nav > .social { display: none; }
  .nav-toggle { display: flex; }
  .page { padding: 8rem 1.5rem 7rem; }
}

@media (max-width: 760px) {
  .wrap { padding: 9rem 1.5rem 8rem; }
  .overview { grid-template-columns: 1fr; gap: 2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img.wide { grid-column: span 2; }
  .downloads { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav { gap: 1.25rem; }
  .pillars { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-banner { aspect-ratio: 16 / 9; }
}
