/* Pokachine
   Mobile-first. Base styles are the phone experience; >=920px layers on desktop.
   Brand: dark galaxy purple, matches the machine wrap.
   Shape system: cards and media 16px radius, buttons full pill.
   One accent: violet. One theme: dark. */

:root {
  --bg: #100b18;
  --surface: #191128;
  --surface-2: #221636;
  --line: #2c2140;
  --ink: #f2eef9;
  --ink-soft: #a89dc2;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --violet-btn: #6d28d9;
  --violet-btn-hover: #5b21b6;
  --radius: 16px;
  --font: "Archivo", system-ui, sans-serif;
  --pad: clamp(1rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

html { background: var(--bg); }

body {
  font-family: var(--font);
  background: transparent;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* room for the fixed bottom bar on phones */
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

img { max-width: 100%; height: auto; display: block; }

/* faint starfield behind everything, like the machine wrap */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 25px 35px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 95px 120px, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(1.5px 1.5px at 150px 55px, rgba(167, 139, 250, 0.45), transparent),
    radial-gradient(1px 1px at 60px 170px, rgba(255, 255, 255, 0.25), transparent);
  background-size: 190px 190px;
}

::selection { background: var(--violet-btn); color: #fff; }

h1, h2, h3 {
  font-stretch: 118%;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

/* Title Case on every UI label; body copy stays sentence case */
.nav-links a,
.sheet-links a,
.btn,
h3,
.faq summary,
.stat span,
.machine-specs li,
.host-stats li,
.footer-links a:not(.email),
.loc-dir {
  text-transform: capitalize;
}

h1 {
  font-size: clamp(2.3rem, 9.5vw, 6rem);
  font-weight: 850;
  font-style: italic;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 0.95;
  padding-bottom: 0.08em; /* italic overhang reserve */
}
h2 {
  font-size: clamp(1.7rem, 5.5vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  font-stretch: 122%;
}
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 48px;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-red { background: var(--violet-btn); color: #fff; }
.btn-red:hover { background: var(--violet-btn-hover); }

.btn-ghost { color: var(--ink); border: 1.5px solid var(--ink-soft); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }

.btn-paper { background: #fff; color: #4c1d95; }
.btn-paper:hover { background: #ede9fe; }

.desktop-only { display: none; }
.phone-only { display: inline-flex; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 1200; /* above Leaflet controls (1000) */
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
  padding: 0 var(--pad);
  background: rgba(16, 11, 24, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.mark { width: 26px; height: 26px; flex-shrink: 0; }

.nav-links { display: none; }
.nav-cta { display: none; }

.menu-btn {
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
}
.menu-btn:active { transform: scale(0.97); }

/* ---------- phone menu sheet ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad) calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(-102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}
.sheet.open { transform: translateY(0); visibility: visible; }

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.sheet-brand {
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  font-size: 1.1rem;
}
.sheet-top .menu-btn { margin-left: 0; }

.sheet-links {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}
.sheet-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 800;
  font-stretch: 118%;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.sheet-links a:active { color: var(--violet-soft); }

.sheet-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sheet-mail {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}

/* ---------- hero ---------- */

.hero { position: relative; }

.hero-img {
  width: 100%;
  /* viewport minus nav and the fixed bottom bar */
  height: calc(100dvh - 64px - 92px - env(safe-area-inset-bottom));
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(16, 11, 24, 0.98) 10%, rgba(16, 11, 24, 0.62) 34%, rgba(16, 11, 24, 0) 62%);
}

.hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0 var(--pad) 1.6rem;
}

.hero-sub {
  margin: 0.9rem 0 1.4rem;
  font-size: 1.08rem;
  color: #d6cdec;
  max-width: 34ch;
}

.hero-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-ctas .btn { flex: 1 1 auto; }

/* ---------- ticker ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--violet-btn);
  border-bottom: 1px solid var(--violet-btn);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.22);
  background: var(--bg);
  padding: 0.7rem 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: ticker 22s linear infinite;
}
.marquee-track span {
  font-weight: 800;
  font-stretch: 122%;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--violet-soft);
  white-space: nowrap;
}
.dot-ball {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--violet);
  flex-shrink: 0;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 1.6rem var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 118%;
  color: var(--violet-soft);
}
.stat span { color: var(--ink-soft); font-size: 0.82rem; }

/* ---------- locations ---------- */

.locations { padding: 3rem var(--pad); }

.locations-head { max-width: 56ch; margin-bottom: 1.6rem; }
.locations-head p { color: var(--ink-soft); margin-top: 0.7rem; }

.near-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.btn-near { min-height: 44px; padding: 0.6rem 1.3rem; font-size: 0.95rem; }
.near-status { color: var(--violet-soft); font-size: 0.9rem; font-weight: 600; }

.locations-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.loc-map-wrap { order: -1; }

section[id] { scroll-margin-top: 76px; }

#map {
  height: 380px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.loc-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.loc-card {
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.loc-card:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.loc-card.active { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }

.loc-card .loc-mall { font-weight: 700; font-size: 1.02rem; }
.loc-card .loc-city { color: var(--ink-soft); font-size: 0.88rem; margin-top: 0.15rem; }
.loc-card .loc-meta { font-size: 0.85rem; margin-top: 0.45rem; color: var(--ink-soft); }

.loc-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.7rem;
}
.loc-dir {
  color: var(--violet-soft);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.loc-dir:active { opacity: 0.7; }
.loc-dist {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--violet-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  display: none;
}
.loc-dist.show { display: inline-block; }

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  font-family: var(--font);
  background: var(--surface-2);
  color: var(--ink);
}
.leaflet-popup-tip { background: var(--surface-2); }
.leaflet-popup-content { margin: 14px 18px; line-height: 1.45; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); }
.popup-mall { font-weight: 700; }
.popup-note { color: var(--ink-soft); font-size: 0.86rem; }
.popup-dir {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--violet-soft) !important;
  font-weight: 700;
  font-size: 0.9rem;
}

.pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--violet);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.pin-you {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--violet);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* ---------- products ---------- */

.inside {
  padding: 3rem var(--pad);
  border-top: 1px solid var(--line);
}

.inside-head { margin-bottom: 1.6rem; }

.inside-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.drop {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.drop img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: #fff;
}

.drop-body { padding: 1.2rem 1.3rem 1.4rem; }
.drop-body p { color: var(--ink-soft); margin-top: 0.45rem; font-size: 0.98rem; max-width: 46ch; }

/* ---------- the machine ---------- */

.machine {
  padding: 3rem var(--pad);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

.machine-media img {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.machine-copy p { color: var(--ink-soft); margin-top: 0.8rem; max-width: 48ch; }

.machine-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1.4rem;
  list-style: none;
}
.machine-specs li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- how ---------- */

.how {
  padding: 3rem var(--pad);
  border-top: 1px solid var(--line);
}

.how-rows {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}
.how-row { border-top: 3px solid var(--line); padding-top: 1rem; }
.how-row:first-child { border-top-color: var(--violet); }
.how-row p { color: var(--ink-soft); margin-top: 0.5rem; font-size: 0.98rem; }

/* ---------- host ---------- */

.host {
  background: var(--violet-btn);
  color: #fff;
}
.host-inner {
  margin: 0 auto;
  padding: 3.5rem var(--pad);
  max-width: 900px;
  text-align: center;
}
.host-inner p {
  margin: 1.2rem auto 1.8rem;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

.host-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0 auto 2rem;
  max-width: 340px;
  list-style: none;
}
.host-stats li {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 0.85rem 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- faq ---------- */

.faq {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem var(--pad);
}

.faq-list { margin-top: 1.6rem; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.05rem 0;
}
.faq details:first-child { border-top: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--violet-soft);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0.8rem; color: var(--ink-soft); max-width: 65ch; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem var(--pad) 1.8rem;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--ink); }

.footer-legal {
  margin-top: 1.8rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* ---------- bottom action bar (phone) ---------- */

.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  padding: 0.7rem var(--pad) calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(16, 11, 24, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottombar .btn { width: 100%; }

/* ---------- reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .loc-card, .sheet { transition: none; }
  .marquee-track { animation: none; }
}

/* ==================== DESKTOP (>=920px) ==================== */

@media (min-width: 920px) {
  body { padding-bottom: 0; }
  .bottombar { display: none; }
  .menu-btn { display: none; }
  .sheet { display: none; }

  .desktop-only { display: inline-flex; }
  .phone-only { display: none; }

  .nav { height: 68px; gap: 2rem; }
  .nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
  .nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
  }
  .nav-links a:hover { color: var(--ink); }
  .nav-cta { display: inline-flex; padding: 0.6rem 1.3rem; font-size: 0.92rem; min-height: 0; }

  .hero-img { height: min(94dvh, 900px); }
  .hero-copy {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    padding: 0 var(--pad) 3.5rem;
  }
  .hero-ctas .btn { flex: 0 0 auto; }

  .stats {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.2rem var(--pad);
    gap: 1rem;
  }
  .stat strong { font-size: 2rem; }
  .stat span { font-size: 0.95rem; }

  .locations {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(3.5rem, 8vh, 6rem) var(--pad);
  }
  .locations-grid {
    grid-template-columns: minmax(300px, 2fr) 5fr;
    gap: 1.2rem;
    align-items: stretch;
  }
  .loc-list {
    order: 0;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 0.3rem;
  }
  .loc-map-wrap { order: 1; }
  #map { height: 560px; }

  .inside {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(3.5rem, 8vh, 6rem) var(--pad);
  }
  .inside-head { margin-bottom: 2.2rem; }
  .inside-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .drop img { aspect-ratio: 4 / 3; }
  .drop-body { padding: 1.4rem 1.6rem 1.6rem; }

  .machine {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(3.5rem, 8vh, 6rem) var(--pad);
    grid-template-columns: 2fr 3fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
  .machine-media img { max-width: 380px; margin: 0; }
  .machine-specs { grid-template-columns: repeat(3, 1fr); }

  .how {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(3.5rem, 8vh, 6rem) var(--pad);
  }
  .how-rows { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: 2.2rem; }

  .host-inner { padding: clamp(3.5rem, 9vh, 6.5rem) var(--pad); }
  .host-stats { grid-template-columns: repeat(3, 1fr); max-width: 640px; }

  .faq { padding: clamp(3.5rem, 8vh, 6rem) var(--pad); }

  .footer { max-width: 1400px; margin: 0 auto; padding: 2.5rem var(--pad) 2rem; }
}
