/* Landing-only sections. Shared public chrome lives in public.css. */
@import url("./public.css");

.lp {
  min-height: 100vh;
}

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lp-bobarrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ============ HERO ============ */
.lp-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 40px 0;
  text-align: center;
}

.lp-hero h1 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 26px auto 0;
  max-width: 15ch;
  animation: lp-rise 0.6s ease-out 0.06s both;
}

.lp-hero h1 .accent {
  color: var(--accent);
}

.lp-lede {
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.55;
  color: #5a5248;
  max-width: 56ch;
  margin: 28px auto 0;
  animation: lp-rise 0.6s ease-out 0.12s both;
}

.lp-hero-cta {
  display: flex;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
  animation: lp-rise 0.6s ease-out 0.18s both;
}

.lp-btn-primary {
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--cream);
  background: var(--accent);
  border: none;
  border-radius: var(--r-pill);
  padding: 17px 32px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent) 75%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lp-btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 34px -12px color-mix(in srgb, var(--accent) 65%, transparent);
}

.lp-btn-primary:active {
  transform: translateY(-1px) scale(1);
}

.lp-btn-secondary {
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #4a443a;
  background: #f1e7d4;
  border: 1px solid rgba(44, 40, 31, 0.07);
  border-radius: var(--r-pill);
  padding: 17px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lp-btn-secondary:hover {
  transform: translateY(-3px);
  background: #ecdfc8;
}

.lp-btn-secondary .arrow {
  display: inline-block;
  animation: lp-bobarrow 1.6s ease-in-out infinite;
}

.lp-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
}

.lp-stat-item a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lp-stat-item a:hover .lp-stat-label {
  color: var(--accent);
}

.lp-stat-item a:hover .lp-stat-num {
  color: var(--accent-deep);
}

.lp-stat-num {
  font-family: var(--font-mono);
  font-size: 1.15em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.lp-stat-label {
  color: var(--ink-soft);
}

/* ============ LIVE SCENE ============ */
.lp-scene {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0 40px;
  scroll-margin-top: 24px;
}

.lp-scene-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lp-scene-head h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  margin: 10px 0 0;
}

.lp-scene-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #4a443a;
  background: #f1e7d4;
  border: 1px solid rgba(44, 40, 31, 0.07);
  border-radius: var(--r-pill);
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.lp-scene-toggle:hover {
  transform: translateY(-2px);
  background: #ecdfc8;
}

.lp-scene-toggle:active {
  transform: translateY(0);
}

.lp-scene-toggle[aria-pressed="true"] {
  color: var(--accent, #c8641f);
  background: color-mix(in srgb, var(--accent, #c8641f) 10%, #fdf8f4);
  border-color: color-mix(in srgb, var(--accent, #c8641f) 25%, transparent);
}

.lp-scene-toggle[aria-pressed="true"]:hover {
  background: color-mix(in srgb, var(--accent, #c8641f) 16%, #fdf8f4);
}

.lp-scene-toggle-icon {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.65;
}

.lp-scene-toggle[aria-pressed="true"] .lp-scene-toggle-icon {
  transform: rotate(90deg);
  opacity: 1;
}

.lp-scene-card {
  border-radius: var(--r-card);
  overflow: hidden;
  background: linear-gradient(180deg, #fdf8ee 0%, #f4ead6 60%, #efe1c8 100%);
  box-shadow: 0 40px 80px -40px rgba(44, 40, 31, 0.4);
  border: 1px solid rgba(44, 40, 31, 0.06);
}

.lp-scene .townsquare-host {
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 420px;
  position: relative;
}

/* The empty-state needs room for its prompt; once mounted, let the widget set
   the demo's height instead of preserving that empty-state reserve. */
.lp-scene .townsquare-host.is-demo-active {
  min-height: 0;
}

.lp-scene-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.lp-scene-placeholder[hidden] {
  display: none;
}

.lp-scene-placeholder-text {
  display: block;
  max-width: 28ch;
}

.lp-scene-placeholder strong {
  color: var(--accent-deep);
}

#townsquare-root:empty {
  min-height: 420px;
}

#townsquare-root#townsquare-root {
  --scene: #fdf8ee;
  --page: #fdf8ee;
  --surface: #fdf8f4;
  --ink: #2a2926;
  --you: #c8641f;
  --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
  --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
  --other: #26241f;
  --ground: rgba(42, 41, 38, 0.16);
  --scene-edge: color-mix(in oklab, var(--scene) 88%, var(--page) 12%);
  --you-deep: var(--you);
  --text: var(--ink);
  --muted: var(--ink);
}

#townsquare-root#townsquare-root[data-townsquare-theme="dark"] {
  --scene: #100f0f;
  --page: transparent;
  --surface: #24231f;
  --ink: #f2eee6;
  --you: #df8a43;
  --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
  --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
  --other: #ddd7cc;
  --ground: rgba(242, 238, 230, 0.18);
  --scene-edge: color-mix(in oklab, var(--scene) 88%, var(--page) 12%);
  --you-deep: var(--you);
  --text: var(--ink);
  --muted: var(--ink);
}

@media (prefers-color-scheme: dark) {
  #townsquare-root#townsquare-root:is(:not([data-townsquare-theme]), [data-townsquare-theme="auto"]) {
    --scene: #100f0f;
    --page: transparent;
    --surface: #24231f;
    --ink: #f2eee6;
    --you: #df8a43;
    --tree-trunk: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --tree-canopy: color-mix(in oklab, var(--text) 58%, var(--muted) 42%);
    --other: #ddd7cc;
    --ground: rgba(242, 238, 230, 0.18);
    --scene-edge: color-mix(in oklab, var(--scene) 88%, var(--page) 12%);
    --you-deep: var(--you);
    --text: var(--ink);
    --muted: var(--ink);
  }
}

#townsquare-root#townsquare-root .townsquare__stage {
  background: linear-gradient(
    180deg,
    var(--scene) 0%,
    var(--scene) 72%,
    var(--scene-edge) 72%,
    var(--page) 72.4%,
    var(--page) 100%
  );
}

#townsquare-root#townsquare-root .townsquare__ground {
  background: var(--ground);
}

.lp-scene-hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.5;
  color: var(--ink-mute);
}

.lp-scene-key {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ============ HOW IT WORKS ============ */
.lp-how {
  max-width: 1100px;
  margin: 96px auto 0;
  padding: 0 40px;
}

.lp-how-head {
  text-align: center;
}

.lp-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #b07a4a;
  text-transform: uppercase;
}

.lp-how-head h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.05;
  margin: 12px 0 0;
}

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
}

.lp-step {
  background: var(--cream);
  border: 1px solid rgba(44, 40, 31, 0.07);
  border-radius: var(--r-card);
  padding: 32px 28px;
  box-shadow: 0 14px 30px -22px rgba(44, 40, 31, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -22px rgba(44, 40, 31, 0.4);
}

.lp-step-num {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-soft);
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
}

.lp-step h3 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 23px;
  margin: 20px 0 0;
}

.lp-step p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.lp-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--accent);
}

.lp-code.alt {
  color: #b07a4a;
}

/* ============ TESTIMONIALS ============ */
.lp-saying {
  max-width: 1100px;
  margin: 96px auto 0;
  padding: 0 40px;
}

.lp-saying-head {
  text-align: center;
}

.lp-saying-head h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.05;
  margin: 12px 0 0;
}

.lp-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 34px;
  margin-top: 56px;
}

.lp-shot-wrap {
  transform: rotate(var(--tilt, 0deg)) translateY(var(--shift, 0)) scale(var(--scale, 1));
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.lp-shot-wrap:nth-child(1) { --tilt: -3deg; --shift: 26px; --scale: 1.08; }
.lp-shot-wrap:nth-child(2) { --tilt: 1.5deg; --shift: -8px; --scale: 1; }
.lp-shot-wrap:nth-child(3) { --tilt: -1.5deg; --shift: 14px; --scale: 0.95; }

.lp-shot-wrap:hover {
  --tilt: 0deg;
  --scale: 1.12;
  z-index: 2;
}

.lp-shot {
  position: relative;
  margin: 0;
  background: #fffdfa;
  border-radius: 18px;
  padding: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 34px -20px rgba(44, 40, 31, 0.5),
    0 6px 12px -8px rgba(44, 40, 31, 0.25);
  transition: box-shadow 0.28s ease;
}

.lp-shot-wrap:hover .lp-shot {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 30px 50px -22px rgba(44, 40, 31, 0.55),
    0 10px 18px -10px rgba(44, 40, 31, 0.3);
}

.lp-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(44, 40, 31, 0.06);
}

.lp-shot-quote {
  margin: 16px 8px 0;
  font-size: 15px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

/* ============ MAP WORLD ============ */
.lp-world {
  max-width: 1100px;
  margin: 96px auto 0;
  padding: 0 40px;
}

.lp-world-head {
  text-align: center;
}

.lp-world-head h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.05;
  margin: 0;
}

.lp-map-block {
  max-width: 620px;
  margin: 32px auto 0;
}

.lp-map-preview {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(44, 40, 31, 0.05);
  box-shadow: 0 12px 28px -24px rgba(44, 40, 31, 0.22);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.92;
}

.lp-map-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -22px rgba(44, 40, 31, 0.28);
  opacity: 1;
}

.lp-map-preview-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.lp-map-stats {
  font-family: var(--font-body);
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.lp-world-copy {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.55;
  color: #5a5248;
  max-width: 54ch;
  margin: 28px auto 0;
  text-align: center;
}

.lp-world-copy span {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--ink);
}

.lp-world-cta {
  display: flex;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ============ CTA BAND ============ */
.lp-cta {
  max-width: 1100px;
  margin: 52px auto 0;
  padding: 0 40px;
}

.lp-cta-band {
  background: var(--ink);
  border-radius: var(--r-card);
  padding: 60px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 70px -36px rgba(38, 34, 28, 0.6);
}

.lp-cta-band::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%);
}

.lp-cta-band h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
  color: var(--cream);
  margin: 0 auto;
  max-width: 18ch;
  position: relative;
}

.lp-cta-band p {
  font-size: 19px;
  color: #b8afa0;
  margin: 18px auto 0;
  max-width: 48ch;
  position: relative;
}

.lp-cta-link {
  display: inline-block;
  margin-top: 30px;
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  border-radius: var(--r-pill);
  padding: 17px 34px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.lp-cta-link:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 30px -14px rgba(0, 0, 0, 0.4);
}

.lp-closing {
  margin: 28px auto 0;
  max-width: 36ch;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-mute);
}

.lp-github-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lp-github-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lp-footer-credit {
  flex-basis: 100%;
  align-self: center;
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
}

.lp-footer-credit a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.lp-footer-credit a:hover {
  text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .lp-scene-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lp-scene-toggle {
    width: 100%;
    justify-content: center;
  }

  .lp-hero {
    padding: 28px 20px 0;
  }
  .lp-steps,
  .lp-shots {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .lp-shot-wrap,
  .lp-shot-wrap:nth-child(1),
  .lp-shot-wrap:nth-child(2),
  .lp-shot-wrap:nth-child(3) {
    transform: none;
    --tilt: 0deg;
    --shift: 0;
    --scale: 1;
  }
  .lp-how,
  .lp-saying,
  .lp-world,
  .lp-cta,
  .lp-scene {
    padding: 0 20px;
  }
  .lp-cta-band {
    padding: 44px 28px;
  }
  .lp-map-stats {
    gap: 10px 16px;
    padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp-hero h1,
  .lp-lede,
  .lp-hero-cta,
  .lp-btn-secondary .arrow {
    animation: none;
  }
  .lp-map-preview:hover {
    transform: none;
  }
}

/* ============ DEMO NOTICE MODAL ============ */
@keyframes lp-notice-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.lp-demo-notice {
  border: none;
  border-radius: var(--r, 20px);
  background: var(--surface, #fdf8f4);
  box-shadow: 0 24px 48px -16px rgba(60, 40, 20, 0.28), 0 4px 12px -4px rgba(60, 40, 20, 0.14);
  padding: 0;
  max-width: min(500px, calc(100vw - 40px));
  width: 100%;
  color: var(--ink, #2a2926);
  font-family: var(--font, system-ui, sans-serif);
}

.lp-demo-notice[open] {
  animation: lp-notice-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lp-demo-notice::backdrop {
  background: rgba(42, 41, 38, 0.45);
  backdrop-filter: blur(3px);
  animation: lp-notice-in 0.22s ease both;
}

.lp-demo-notice-inner {
  padding: 36px 34px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-demo-notice-emoji {
  font-size: 36px;
  line-height: 1;
  margin: 0 0 4px;
}

.lp-demo-notice h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--ink, #2a2926);
}

.lp-demo-notice p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft, #7c766c);
  margin: 0;
}

.lp-demo-notice-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.lp-demo-notice-actions .lp-btn-primary {
  font-size: 16px;
  padding: 13px 26px;
}

.lp-demo-notice-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft, #7c766c);
  font-family: var(--font, system-ui, sans-serif);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.lp-demo-notice-cancel:hover {
  color: var(--ink, #2a2926);
}

@media (prefers-color-scheme: dark) {
  .lp-demo-notice {
    background: #24231f;
    color: #f2eee6;
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
  }

  .lp-demo-notice h2 {
    color: #f2eee6;
  }

  .lp-demo-notice p {
    color: #beb7aa;
  }

  .lp-demo-notice::backdrop {
    background: rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 480px) {
  .lp-demo-notice-inner {
    padding: 28px 24px 26px;
  }

  .lp-demo-notice-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
