/* ══════════════════════════════════════════════════════════════
   Conscious Futures — "Through the Lens" homepage
   ══════════════════════════════════════════════════════════════ */

:root {
  --navy: #1A1F5B;
  --navy-deep: #11142d;
  --orange: #E75213;
  --purple: #800287;
  --gold: #C8A14D;
  --blue: #3B6FBF;
  --green: #4A7B62;
  --cream: #F5F1E8;
  --horizon: linear-gradient(160deg,
    rgba(231,82,19,0.85) 0%,
    rgba(177,71,31,0.85) 22%,
    rgba(90,42,74,0.82) 48%,
    rgba(36,26,74,0.85) 68%,
    rgba(17,20,41,0.94) 100%);
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--navy-deep);
  color: var(--cream);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── Top nav (matches live site: About · Our Lens · Projects · Ideas · Resource Library · Contact) ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 5%;
  transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}
.site-nav.scrolled {
  background: rgba(17,20,41,0.85);
  backdrop-filter: blur(14px);
  padding: 1rem 5%;
}
.nav-logo {
  display: flex; align-items: center;
  opacity: 0.9; transition: opacity 0.25s;
}
.nav-logo:hover { opacity: 1; }
.nav-logo img {
  height: 28px; width: auto; display: block;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(245,241,232,0.65); transition: color 0.25s;
}
.nav-links a:hover { color: var(--cream); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: block; background: none; border: none; color: var(--cream);
    font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; right: 5%; background: rgba(17,20,41,0.97);
    padding: 1.2rem 1.6rem; border-radius: 8px; gap: 1rem;
  }
}

/* ══════════════════════ PORTAL SEQUENCE ══════════════════════ */
.portal {
  position: relative;
  height: 600vh;
}
.portal.reduced-motion { height: auto; }

.portal-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.portal.reduced-motion .portal-sticky {
  position: static; height: auto; overflow: visible;
  display: flex; flex-direction: column;
}

/* Starfield */
.starfield {
  position: absolute; inset: 0; z-index: 1;
  background: var(--navy-deep);
}
.starfield canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.starfield::after {
  content: '';
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(128,2,135,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 75% 65%, rgba(231,82,19,0.06) 0%, transparent 60%);
  animation: driftGlow 24s ease-in-out infinite;
  pointer-events: none;
}
@keyframes driftGlow {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-2%,2%); }
}

/* Horizon reveal layer — masked to the two lens circles, grows on scroll */
.horizon-layer {
  position: absolute; inset: 0; z-index: 2;
  background: var(--horizon);
  opacity: 1;
}

/* Glasses graphic */
.glasses-wrap {
  position: absolute; top: 38%; left: 50%;
  width: min(48vw, 440px);
  transform: translate(-50%, -50%);
  z-index: 3;
  animation: glassesFloat 7s ease-in-out infinite;
  transition: opacity 0.6s ease;
}
.glasses-wrap svg { width: 100%; height: auto; display: block; }
@keyframes glassesFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .glasses-wrap { animation: none; }
}

/* Hero text */
.hero-text {
  position: absolute; z-index: 4;
  top: 56%; left: 6%; right: 6%;
  max-width: 900px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-text h1 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  line-height: 1.35;
  color: rgba(245,241,232,0.92);
}
.hero-text .word-reframe,
.hero-text .word-imagine {
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero-text .word-reframe {
  background-image: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
}
.hero-text .word-imagine {
  background-image: linear-gradient(135deg, #c98fd6 0%, var(--purple) 100%);
}
.scroll-cue {
  margin-top: 1.6rem;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,241,232,0.5);
  display: flex; align-items: center; gap: 0.6rem;
  transition: color 0.25s;
}
.scroll-cue:hover { color: rgba(245,241,232,0.85); }
.scroll-cue::after {
  content: '↓'; display: inline-block;
  animation: cueBounce 1.8s ease-in-out infinite;
}
@keyframes cueBounce {
  0%,100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* Quote layer */
.quote-layer {
  position: absolute; z-index: 5; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 8%;
  opacity: 0; pointer-events: none;
}
.quote-layer blockquote {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  line-height: 1.3; max-width: 900px;
  color: var(--cream);
}
.quote-layer cite {
  display: block; margin-top: 1.6rem;
  font-family: var(--font-mono); font-style: normal;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245,241,232,0.6);
}

/* Bridge line */
.bridge-layer {
  position: absolute; z-index: 5; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 10%;
  opacity: 0; pointer-events: none;
}
.bridge-layer p {
  font-family: var(--font-sans); font-weight: 300;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  line-height: 1.5; max-width: 640px;
  color: rgba(245,241,232,0.85);
}

/* Landmarks */
.landmarks {
  position: absolute; z-index: 5; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5%;
  opacity: 0; pointer-events: none;
}
.landmarks.interactive { pointer-events: auto; }
.landmark-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1rem; width: 100%; max-width: 1200px;
}
.landmark-tile {
  padding: 1.6rem 1.2rem; border-radius: 12px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  border: 1px solid rgba(245,241,232,0.12);
}
.landmark-tile.in { opacity: 1; transform: translateY(0); }
.landmark-tile h3 {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400;
  margin-bottom: 0.5rem;
}
.landmark-tile p {
  font-size: 0.82rem; line-height: 1.5; color: rgba(245,241,232,0.75);
}
.lt-about   { background: linear-gradient(160deg, rgba(200,161,77,0.28), rgba(23,26,60,0.4)); }
.lt-lens    { background: linear-gradient(160deg, rgba(59,111,191,0.28), rgba(23,26,60,0.4)); }
.lt-projects{ background: linear-gradient(160deg, rgba(26,31,91,0.5), rgba(23,26,60,0.4)); }
.lt-ideas   { background: linear-gradient(160deg, rgba(128,2,135,0.32), rgba(23,26,60,0.4)); }
.lt-library { background: linear-gradient(160deg, rgba(74,123,98,0.32), rgba(23,26,60,0.4)); }

@media (max-width: 900px) {
  .landmark-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .landmark-grid { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ── Reduced-motion normal-flow sections ── */
.portal.reduced-motion .rm-section {
  position: relative; min-height: 100vh; z-index: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 6%; opacity: 0;
  transition: opacity 0.8s ease;
}
.portal.reduced-motion .rm-section.revealed { opacity: 1; }
.portal.reduced-motion .rm-hero { background: var(--navy-deep); }
.portal.reduced-motion .horizon-layer { opacity: 0; }
.portal.reduced-motion .quote-layer,
.portal.reduced-motion .bridge-layer { background: var(--horizon); }
.portal.reduced-motion .quote-layer,
.portal.reduced-motion .bridge-layer,
.portal.reduced-motion .landmarks { position: relative; pointer-events: auto; }
.portal.reduced-motion .hero-text,
.portal.reduced-motion .glasses-wrap {
  position: relative; top: auto; left: auto; right: auto;
  transform: none; margin: 0 auto 2rem;
}
.portal.reduced-motion .landmark-tile { opacity: 1; transform: none; }

/* ══════════════════════ MARQUEE ══════════════════════ */
.marquee-section {
  background: var(--navy-deep);
  padding: 3rem 0;
  border-top: 1px solid rgba(245,241,232,0.08);
  border-bottom: 1px solid rgba(245,241,232,0.08);
  overflow: hidden;
}
.marquee-label {
  text-align: center; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,241,232,0.4); margin-bottom: 1.6rem;
}
.marquee-track {
  display: flex; gap: 3.5rem; white-space: nowrap;
  animation: marqueeScroll 32s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 300;
  color: rgba(245,241,232,0.55);
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* ══════════════════════ FOOTER ══════════════════════ */
.site-footer {
  background: var(--navy-deep);
  padding: 5rem 6% 3rem;
  text-align: center;
}
.site-footer h2 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-bottom: 2rem;
}
.footer-cta {
  display: inline-block; padding: 0.9rem 2.4rem;
  border: 1px solid rgba(245,241,232,0.35); border-radius: 60px;
  font-size: 0.85rem; letter-spacing: 0.04em;
  transition: background 0.3s, border-color 0.3s;
}
.footer-cta:hover { background: rgba(245,241,232,0.08); border-color: var(--gold); }
.footer-fine {
  margin-top: 3rem; font-size: 0.72rem;
  color: rgba(245,241,232,0.4);
}
