/* ───────────────────────────────────────────
   Deneb — Shared Styles
   ─────────────────────────────────────────── */

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

:root {
  --bg-deep: #101626;
  --bg-mid: #182038;
  --panel: rgba(26, 34, 58, 0.70);
  --border: rgba(255, 255, 255, 0.12);
  --cyan: #00DCFF;
  --magenta: #FF3787;
  --amber: #ffab40;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.45);
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--cyan);
}

/* ── Page-specific body ── */

.page-home,
.page-home * {
  cursor: default !important;
}

.page-home {
  height: 100%;
  overflow: hidden;
}

.page-docs {
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Ambient background glows ── */

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  width: 600px;
  height: 600px;
  top: -180px;
  left: -120px;
  background: #0064FF;
  animation: drift-1 12s ease-in-out infinite alternate;
}

.glow-2 {
  width: 500px;
  height: 500px;
  bottom: -160px;
  right: -100px;
  background: #B43CFF;
  animation: drift-2 14s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.30; }
  100% { transform: translate(60px, 40px) scale(1.1); opacity: 0.45; }
}

@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.25; }
  100% { transform: translate(-50px, -30px) scale(1.15); opacity: 0.40; }
}

/* ── Nav button (shared between doc-link & back-link) ── */

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 220, 255, 0.3);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover {
  background: rgba(0, 220, 255, 0.1);
  border-color: rgba(0, 220, 255, 0.5);
}

/* ── Top bar (home) ── */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 32px;
}

/* ── Hero section (home) ── */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  height: 100vh;
  padding: 60px 60px 40px;
}

.hero-content {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-image {
  flex: 0 1 55%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
  line-height: 1.1;
}

.hero .subtitle {
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 10px;
}

.tagline {
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--text-tertiary);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── Screenshot (home) ── */

.screenshot-frame {
  position: relative;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(0, 220, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: 100%;
}

.screenshot-frame::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(0, 220, 255, 0.4);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  z-index: 0;
  transition: opacity 0.3s;
}

.screenshot-frame.loaded::after {
  opacity: 0;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.screenshot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border-radius: 8px;
}

/* ── CTA button (home) ── */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #0090AA;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer !important;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(0);
}

.apple-icon {
  flex-shrink: 0;
  margin-top: -1px;
}

.formats {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

/* ── Footer (home) ── */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  padding: 12px 12px 24px;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  opacity: 0.3;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer !important;
}

/* ── Docs layout ── */

.container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.container .nav-btn {
  margin-bottom: 32px;
}

/* ── Docs typography ── */

.container h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.highlight {
  color: var(--cyan);
}

.container .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--cyan);
  letter-spacing: 0.02em;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

p {
  margin-bottom: 14px;
  color: var(--text-primary);
}

ul {
  margin-bottom: 14px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

/* ── Glass panel (cards, use-cases, toc) ── */

.card,
.use-case,
.toc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card h3 {
  margin-top: 0;
}

.toc {
  margin-bottom: 40px;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 6px;
}

.toc a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.toc a:hover {
  color: var(--cyan);
}

.use-case h3 {
  margin-top: 0;
  color: var(--magenta);
}

.use-case .modes {
  margin-bottom: 10px;
}

/* ── Parameters ── */

.param-name {
  font-weight: 600;
  color: var(--cyan);
}

.param-range {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-deep);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-family: "SF Mono", "Menlo", monospace;
}

.param-default {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Mode tags ── */

.mode-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 4px;
}

.mode-delay {
  background: rgba(0, 220, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 220, 255, 0.25);
}

.mode-freeze {
  background: rgba(255, 55, 135, 0.12);
  color: var(--magenta);
  border: 1px solid rgba(255, 55, 135, 0.25);
}

.mode-scatter {
  background: rgba(255, 171, 64, 0.12);
  color: var(--amber);
  border: 1px solid rgba(255, 171, 64, 0.25);
}

/* ── Tips ── */

.tip {
  background: rgba(0, 220, 255, 0.05);
  border-left: 3px solid var(--cyan);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}

.tip-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan);
  margin-bottom: 4px;
}

/* ── Controls diagram ── */

.controls-diagram {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 6px;
}

.group-box {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}

.knob-list {
  font-size: 13px;
  color: var(--text-secondary);
  list-style: none;
  padding: 0;
}

.knob-list li {
  margin-bottom: 4px;
}

/* ── Docs footer ── */

.docs-footer {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0.6;
  padding-bottom: 24px;
}

.docs-footer p {
  color: var(--text-tertiary);
}

.docs-footer a {
  color: var(--text-tertiary);
  text-decoration: none;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    padding: 60px 24px 40px;
  }
  .hero-image {
    flex: 0 1 auto;
    width: 90%;
    max-width: 520px;
  }
  .cta-button {
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .top-bar {
    padding: 12px 16px;
  }
  .hero {
    gap: 20px;
    padding: 56px 16px 32px;
  }
  .hero-image {
    width: 95%;
  }
  .cta-button {
    padding: 10px 22px;
    font-size: 14px;
  }
  .container {
    padding: 24px 16px 60px;
  }
  .container h1 {
    font-size: 28px;
  }
  .controls-diagram {
    grid-template-columns: repeat(2, 1fr);
  }
}
