/* =========================================================================
   Pixelmoor - Website Showcase shell (v2)
   A curated gallery: each template is a framed exhibit on a warm gallery wall.
   The chrome is a refined frame, not browser furniture. One elegant CTA.
   ========================================================================= */

:root {
  /* gallery wall + chrome - "The Console" (live pixelmoor.com house style) */
  --wall: #0d0d10;
  --wall-deep: #08080a;
  --chrome: #0a0a0c;
  --chrome-glass: rgba(10, 10, 12, 0.78);

  --on-dark: #f5f3ee;
  --on-dark-muted: #b6b3ab;
  --on-dark-faint: #7c7a72;

  --hair: rgba(234, 165, 63, 0.28);          /* fine amber rule */
  --line-soft: rgba(255, 255, 255, 0.07);

  /* the one amber (Console accent, #eaa53f) - kept under --brass so the
     whole shell retunes from these four values */
  --brass: #eaa53f;
  --brass-bright: #f5c272;
  --brass-soft: #f5c272;
  --on-brass: #120b02;

  --font-disp: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --bar-top: 60px;
  --bar-bottom: 66px;
  --gutter: 18px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --d-switch: 420ms;
}

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

html, body { height: 100%; overflow: hidden; background: var(--wall-deep); }

body {
  font-family: var(--font-sans);
  color: var(--on-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* =====================================================================
   TOP BAR - the refined Pixelmoor frame + single CTA
   ===================================================================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--bar-top);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(16px, 2.6vw, 26px);
  padding-top: env(safe-area-inset-top, 0);
  background: var(--chrome-glass);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--hair);
}

/* brand: gold diamond + serif wordmark + fine eyebrow */
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand__mark { display: block; filter: drop-shadow(0 1px 5px rgba(201, 162, 75, 0.4)); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__word {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--on-dark);
}
.brand__eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 4px;
}

.topbar__spacer { flex: 1; }

/* discreet text links + single CTA, grouped on the right */
.actions { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.tlink {
  display: inline-flex; align-items: center;
  height: 38px; padding: 0 13px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-dark-muted);
  transition: color 0.18s ease;
}
.tlink:hover { color: var(--on-dark); }
.actions__sep {
  width: 1px; height: 18px; margin: 0 10px;
  background: var(--line-soft); flex: none;
}

.cta {
  display: inline-flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 19px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--on-brass);
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset,
              0 8px 22px -8px rgba(201, 162, 75, 0.55);
  white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s ease, filter 0.2s ease;
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.04);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 12px 28px -8px rgba(201, 162, 75, 0.7); }
.cta:active { transform: translateY(0); }
.cta__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--on-brass); opacity: 0.55; flex: none; }
.cta:focus-visible, .tlink:focus-visible { outline: 3px solid rgba(201, 162, 75, 0.6); outline-offset: 3px; }

/* =====================================================================
   STAGE - framed exhibit on the gallery wall
   ===================================================================== */
.stage {
  position: fixed;
  top: var(--bar-top);
  bottom: var(--bar-bottom);
  left: 0; right: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--wall) 0%, var(--wall-deep) 100%);
}
.stage__rail {
  position: absolute;
  inset: var(--gutter);
  border-radius: 14px;
  overflow: hidden;
  background: #0c0c0d;
  box-shadow:
    0 0 0 1px var(--line-soft),
    0 1px 0 0 rgba(255, 255, 255, 0.05) inset,
    0 34px 70px -26px rgba(0, 0, 0, 0.78);
}

.frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  transform: translateX(2.4%) scale(0.994);
  transition: opacity var(--d-switch) var(--ease), transform var(--d-switch) var(--ease);
  pointer-events: none;
  background: #fff;
  will-change: opacity, transform;
}
.frame.is-active { opacity: 1; transform: none; pointer-events: auto; }
.frame.is-prev { transform: translateX(-2.4%) scale(0.994); }

/* loader */
.loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0c0c0d;
  opacity: 1; transition: opacity 0.45s ease;
  pointer-events: none;
}
.loader.is-hidden { opacity: 0; }
.loader__spin {
  width: 30px; height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   BOTTOM NAVIGATOR - refined gallery caption + flick controls
   ===================================================================== */
.navbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--bar-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 clamp(12px, 2.6vw, 22px);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--chrome-glass);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-top: 1px solid var(--hair);
}

.navbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  color: var(--on-dark-muted);
  border: 1px solid var(--line-soft);
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
  flex: none;
}
.navbtn:hover { color: var(--on-dark); border-color: var(--brass); }
.navbtn:active { transform: scale(0.93); }
.navbtn:focus-visible, .pill:focus-visible { outline: 3px solid rgba(201, 162, 75, 0.6); outline-offset: 2px; }

.index {
  display: flex; align-items: center; gap: 8px;
  max-width: min(70vw, 880px);
  overflow-x: auto; overflow-y: hidden;
  flex-wrap: nowrap; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 3px 2px;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.index::-webkit-scrollbar { display: none; }
.index > .pill { flex: 0 0 auto; }
.pill {
  display: inline-flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  height: 42px; padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--on-dark-muted);
  line-height: 1.1;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.pill__name { font-family: var(--font-disp); font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.pill__kind { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-faint); margin-top: 3px; }
.pill:hover { color: var(--on-dark); border-color: var(--hair); }
.pill.is-active {
  color: var(--on-brass);
  background: linear-gradient(180deg, var(--brass-soft), var(--brass));
  border-color: var(--brass);
}
.pill.is-active .pill__kind { color: rgba(26, 20, 7, 0.62); }

.counter {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--on-dark-faint);
  margin: 0 6px; flex: none;
}
.counter__sep { color: var(--line-soft); }
#counterNum { color: var(--on-dark); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .pill__kind { display: none; }
  .pill { height: 40px; padding: 0 13px; }
}

@media (max-width: 640px) {
  :root { --bar-top: 56px; --bar-bottom: 98px; --gutter: 0px; }
  .stage__rail { border-radius: 0; box-shadow: none; }

  .brand__eyebrow { display: none; }
  .topbar { gap: 12px; }
  .actions .tlink, .actions__sep { display: none; }   /* prices/faq move to bottom bar */
  .cta { height: 38px; padding: 0 16px; font-size: 12.5px; }

  .navbar {
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 10px;
    padding-top: 8px;
  }
  .actions--mobile {
    display: inline-flex; order: 3; width: 100%;
    justify-content: center; gap: 26px;
  }
  .actions--mobile .tlink { height: 30px; padding: 0 4px; }
  .counter { display: none; }
  .index { gap: 7px; max-width: 64vw; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px; scrollbar-width: none; }
  .index::-webkit-scrollbar { display: none; }
  .pill { height: 38px; padding: 0 13px; }
  .pill__name { font-size: 12.5px; }
  .navbtn { width: 38px; height: 38px; }
}

/* desktop hides the mobile-only action group */
.actions--mobile { display: none; }

@media (prefers-reduced-motion: reduce) {
  .frame { transition: opacity 0.01ms; transform: none; }
  .loader__spin { animation: none; }
  .cta, .navbtn, .pill, .tlink { transition: none; }
}
