/* ===================================================
   ECHOSCAPE — Shared Stylesheet
   Dark theme · Space Grotesk · Amber + Teal accents
   =================================================== */

/* === VARIABLES === */
:root {
  --bg:       #141414;
  --surface:  #1E2235;
  --amber:    #F5A623;
  --teal:     #4ECDC4;
  --text:     #F0EDE6;
  --muted:    #9B9B9B;
  --border:   rgba(240, 237, 230, 0.08);

  --max-w: 1100px;
  --section-pad: 6rem 2rem;
  --radius: 6px;
  --transition: 0.25s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-logo span { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), color var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover { color: var(--amber); }

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 8rem 2rem 6rem;
}

.hero-sub-brand { color: var(--amber); }

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245, 166, 35, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 50%, rgba(78, 205, 196, 0.04) 0%, transparent 80%);
}

/* Concentric rings suggesting sound waves */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 52%, transparent 15%, rgba(240, 237, 230, 0.015) 15.5%, transparent 16%),
    radial-gradient(circle at 50% 52%, transparent 25%, rgba(240, 237, 230, 0.015) 25.5%, transparent 26%),
    radial-gradient(circle at 50% 52%, transparent 37%, rgba(240, 237, 230, 0.012) 37.5%, transparent 38%),
    radial-gradient(circle at 50% 52%, transparent 51%, rgba(240, 237, 230, 0.01) 51.5%, transparent 52%),
    radial-gradient(circle at 50% 52%, transparent 67%, rgba(240, 237, 230, 0.008) 67.5%, transparent 68%),
    radial-gradient(circle at 50% 52%, transparent 86%, rgba(240, 237, 230, 0.005) 86.5%, transparent 87%);
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--amber);
  color: #141414;
}

.btn-primary:hover {
  background: #ffc04a;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--muted);
  background: rgba(240, 237, 230, 0.04);
}

/* === SECTION SHARED === */
section {
  padding: var(--section-pad);
}

.section-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
  display: block;
}

a.section-label:hover { opacity: 0.75; }

.play-intro {
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === ABOUT === */
#about {
  padding-top: 7rem;
}

.about-grid {
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.about-text p:not(.section-label) {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  text-align: justify;
}

.about-text p:last-child { margin-bottom: 0; }

.about-img {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

/* Concept pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}

.pillar-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.pillar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.pillar p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* === PLAY SECTION === */
#play {
  padding-top: 7rem;
}

/* Leaflet map */
.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
  position: relative;
  z-index: 0; /* creates stacking context so Leaflet internals stay below fixed nav */
}

#map {
  height: 440px;
  width: 100%;
}

/* Override Leaflet popup style */
.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
  border: 1px solid var(--border) !important;
  font-family: 'Space Grotesk', sans-serif !important;
}

.leaflet-popup-tip { background: var(--surface) !important; }

.leaflet-popup-content {
  margin: 1rem 1.25rem !important;
  min-width: 180px;
}

.map-popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.map-popup-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.map-popup-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
  transition: opacity var(--transition);
}

.map-popup-link:hover { opacity: 0.75; }

/* Project cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: rgba(245, 166, 35, 0.35);
  transform: translateY(-2px);
}

.card-img {
  aspect-ratio: 16/9;
  background: #2a2a2a;
  position: relative;
  overflow: hidden;
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.card-location-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(20,20,20,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  transition: gap var(--transition), opacity var(--transition);
}

.card-link:hover { gap: 0.7rem; opacity: 0.8; }

/* === NEWS === */
#news {
  padding-top: 7rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

.news-card:hover {
  border-color: rgba(245, 166, 35, 0.3);
  transform: translateY(-2px);
}

.news-card-img-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #2a2a2a;
}

.news-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
  transition: filter var(--transition);
}

.news-card:hover .news-card-img-wrap img { filter: brightness(0.9); }

.news-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.news-card-excerpt {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
  transition: gap var(--transition), opacity var(--transition);
}

.news-card-link:hover { gap: 0.55rem; opacity: 0.75; }

/* === CONTACT === */
#contact {
  padding-top: 7rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-text p:not(.section-label) {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-top: 1rem;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber);
  border-bottom: 1px solid rgba(245, 166, 35, 0.3);
  padding-bottom: 2px;
  transition: opacity var(--transition);
}

.contact-email-link:hover { opacity: 0.75; }

/* Simple form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--amber);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

/* === FOOTER === */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-brand span { color: var(--amber); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-email a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-email a:hover { color: var(--amber); }


/* ===================================================
   PROJECT INTRO PAGE
   =================================================== */

body.project-page {
  padding-top: 0;
}

.project-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}

.topbar-back:hover { color: var(--text); }

.topbar-logo {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-logo span { color: var(--amber); }

/* Project hero image */
.project-cover {
  width: 100%;
  height: 55vh;
  min-height: 320px;
  max-height: 520px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  margin-top: 57px; /* topbar height */
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
}

.project-cover-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(20, 20, 20, 0.85));
}

.project-cover-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.project-cover-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Project content */
.project-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.project-section {
  margin-bottom: 3.5rem;
}

.project-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.project-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.project-section p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.97rem;
}

.project-section p + p { margin-top: 0.75rem; }

/* Tutorial steps */
.tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tutorial-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--transition);
}

.tutorial-step:last-child { border-bottom: none; }

.step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  margin-top: 2px;
}

.step-body h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.step-body p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.step-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* CTA button */
.project-cta {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.project-cta p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  background: var(--amber);
  color: #141414;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
  font-family: inherit;
}

.btn-start:hover {
  background: #ffc04a;
  transform: translateY(-2px);
}

/* Project footer */
.project-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-footer-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  transition: color var(--transition);
}

.project-footer-back:hover { color: var(--text); }

.project-footer-copy {
  font-size: 0.8rem;
  color: rgba(155,155,155,0.5);
}


/* ===================================================
   PLAY LAUNCHER PAGE  (play.echoscape.work)
   =================================================== */

body.launcher-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.launcher-header {
  padding: 1.75rem 2rem 0;
  text-align: center;
}

.launcher-brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.launcher-brand span { color: var(--amber); }

.launcher-title {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.launcher-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 2rem;
}

.launcher-card {
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.launcher-card:hover { background: var(--surface); }

.launcher-card-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: brightness(0.4);
  transition: filter var(--transition);
}

.launcher-card:hover .launcher-card-img { filter: brightness(0.5); }

.launcher-card-content {
  position: relative;
}

.launcher-card-location {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.35rem;
}

.launcher-card-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.launcher-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  transition: gap var(--transition);
}

.launcher-card:hover .launcher-card-cta { gap: 0.6rem; }

.launcher-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.launcher-footer a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.launcher-footer a:hover { color: var(--text); }


/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img { order: -1; }
  .pillars { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .launcher-cards { grid-template-columns: 1fr; }
  .launcher-card { min-height: 180px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  :root { --section-pad: 4rem 1.25rem; }
  .news-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 57px; left: 0; right: 0;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(12px);
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-hamburger { display: flex; }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .project-footer {
    flex-direction: column;
    text-align: center;
  }
}
