/* Rocket LAN community site
   --------------------------
   Single stylesheet, mobile-first, no build step. Brand palette echoes
   the app (dark base, cyan primary accent, magenta secondary) so people
   coming from the app feel like they're in the same place. */

:root {
  /* Palette, same OKLCH values the app uses in `src/app.css`. */
  --bg: oklch(0.155 0.008 250);
  --bg-tint: oklch(0.17 0.012 250);
  --surface: oklch(0.195 0.011 250);
  --surface-2: oklch(0.23 0.013 250);
  --surface-3: oklch(0.28 0.015 250);
  --border: oklch(0.30 0.015 250);
  --border-soft: oklch(0.25 0.013 250);
  --border-strong: oklch(0.40 0.018 250);
  --text: oklch(0.96 0.004 250);
  --text-muted: oklch(0.70 0.010 250);
  --text-dim: oklch(0.52 0.012 250);
  --accent: oklch(0.82 0.13 205);
  --accent-hover: oklch(0.88 0.13 205);
  --accent-ink: oklch(0.15 0.02 205);
  --accent-soft: oklch(0.82 0.13 205 / 0.14);
  --accent-30: oklch(0.82 0.13 205 / 0.30);
  --accent-2: oklch(0.72 0.22 340);
  --accent-2-soft: oklch(0.72 0.22 340 / 0.16);
  --warning: oklch(0.84 0.15 82);
  --warning-soft: oklch(0.84 0.15 82 / 0.16);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 36px;
  --space-7: 56px;

  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji";
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  --content-max: 920px;
  --content-wide: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.12s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2vw + 0.4rem, 1.875rem); font-weight: 600; margin-top: var(--space-6); }
h3 { font-size: 1.125rem; font-weight: 600; margin-top: var(--space-5); }

p { margin: 0 0 var(--space-3); }
p + p { margin-top: var(--space-3); }

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-3); }
li + li { margin-top: 4px; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

hr {
  border: 0;
  height: 1px;
  background: var(--border-soft);
  margin: var(--space-5) 0;
}

/* --- layout ----------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: oklch(0.155 0.008 250 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  max-width: var(--content-wide);
  margin: 0 auto;
  flex-wrap: wrap;
}
.site-nav-brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-right: auto;
}
.site-nav-brand .accent { color: var(--accent); }
.site-nav-brand:hover { text-decoration: none; color: var(--text); }
.site-nav-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.site-nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}
.site-nav-links a[aria-current="page"] {
  color: var(--accent);
}

/* --- status pill ----------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.pill-accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-30);
}
.pill-warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning);
}
.pill-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

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

.hero {
  padding: var(--space-7) 0 var(--space-6);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* Subtle accent glow behind the hero copy. Decorative only. */
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background:
    radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { margin: var(--space-3) 0 var(--space-4); }
.hero-lede {
  font-size: clamp(1.05rem, 1vw + 0.7rem, 1.25rem);
  color: var(--text-muted);
  max-width: 60ch;
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  border-color: transparent;
}

/* --- cards / feature grid ------------------------------------------- */

.feature-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: var(--space-5) 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.05rem;
}
.card p:last-child { margin-bottom: 0; }

/* --- callout panels -------------------------------------------------- */

.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-tint);
  margin: var(--space-5) 0;
}
.callout-accent {
  border-color: var(--accent-30);
  background: var(--accent-soft);
}
.callout strong { color: var(--text); }

/* --- prose page ------------------------------------------------------ */

.prose {
  padding: var(--space-6) 0;
}
.prose section + section { margin-top: var(--space-6); }

/* --- FAQ details/summary -------------------------------------------- */

.faq details {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0;
  margin: 0 0 var(--space-3);
}
.faq details[open] {
  border-color: var(--border);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4);
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq .faq-body {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--text-muted);
}
.faq .faq-body p:last-child { margin-bottom: 0; }

/* --- roadmap columns ------------------------------------------------- */

.roadmap-cols {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: var(--space-5) 0;
}
.roadmap-col h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.roadmap-col ul { list-style: none; padding-left: 0; }
.roadmap-col li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}
.roadmap-col li:last-child { border-bottom: 0; }
.roadmap-col li strong { color: var(--text); display: block; margin-bottom: 2px; }

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

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: baseline;
  justify-content: space-between;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.site-footer .footer-links a { color: var(--text-muted); }
.site-footer-trademark {
  margin-top: var(--space-4);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- slideshow (coverflow-style, JS-driven active state) ------------
   Cross-browser implementation: the JS in index.html toggles
   `is-active` on the centered slide and `is-adjacent` on its immediate
   neighbors, so the spotlight/peek effect works in every modern browser
   (not just ones with `animation-timeline: view()`).

   Auto-advances every 6 seconds. Hovering, focusing, or interacting
   with prev/next/dots pauses it. */

.slideshow {
  position: relative;
  margin: var(--space-5) 0;
}

.slideshow-viewport {
  position: relative;
  overflow: hidden;
  padding: var(--space-5) 0;
}

.slideshow-track {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  /* Translated by JS to bring the active slide to center. */
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 65%;
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  /* Default: far-away slides fade and shrink. */
  opacity: 0.25;
  transform: scale(0.82);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease;
  pointer-events: none;
}
.slide.is-adjacent {
  opacity: 0.6;
  transform: scale(0.88);
}
.slide.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 24px 60px -20px oklch(0 0 0 / 0.6),
    0 0 0 1px var(--accent-30);
  pointer-events: auto;
  cursor: zoom-in;
}
.slide.is-active img { cursor: zoom-in; }

.slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.slide figcaption {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  /* White glyphs, with a subtle dark drop-shadow so they stay legible
     against the bright cyan disc no matter the background behind. */
  color: #fff;
  text-shadow: 0 1px 2px oklch(0.15 0.02 205 / 0.55);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow:
    0 10px 28px -8px oklch(0 0 0 / 0.55),
    0 0 0 1px oklch(1 0 0 / 0.08) inset;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.slideshow-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-50%) scale(1.08);
  box-shadow:
    0 14px 32px -8px oklch(0 0 0 / 0.65),
    0 0 0 1px oklch(1 0 0 / 0.12) inset;
}
.slideshow-btn:active { transform: translateY(-50%) scale(0.96); }
.slideshow-prev { left: 12px; }
.slideshow-next { right: 12px; }

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-3);
}
.slideshow-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.slideshow-dot:hover { background: var(--border-strong); }
.slideshow-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

@media (max-width: 760px) {
  .slide { flex: 0 0 86%; }
  .slide:not(.is-active) { opacity: 0.4; transform: scale(0.92); }
  .slide.is-adjacent { opacity: 0.6; transform: scale(0.94); }
  .slideshow-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .slideshow-prev { left: 4px; }
  .slideshow-next { right: 4px; }
}

/* --- lightbox ------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
  background: oklch(0 0 0 / 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox-img {
  /* Whichever of 90vw / 90vh is more limiting wins via aspect-ratio +
     object-fit, so the image always fits without ever overflowing the
     viewport, regardless of orientation. */
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px -20px oklch(0 0 0 / 0.9);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px -8px oklch(0 0 0 / 0.6);
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-close:hover {
  background: var(--accent-hover);
  transform: scale(1.08);
}
.lightbox-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: oklch(0.155 0.008 250 / 0.7);
  color: var(--text);
  font-size: 0.9rem;
  text-align: center;
}

/* --- small viewports ------------------------------------------------- */

@media (max-width: 640px) {
  .site-nav-inner { gap: var(--space-3); padding: var(--space-3) var(--space-4); }
  .site-nav-links { gap: var(--space-3); width: 100%; }
  .site-nav-brand { margin-right: 0; }
  .hero { padding: var(--space-6) 0 var(--space-5); }
}

/* --- print ---------------------------------------------------------- */

@media print {
  .site-nav, .site-footer, .hero::before { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
