/* ==========================================================================
   Next Meeting — product + legal pages (/elgato/next-meeting/…)
   Built on top of css/style.css. Every color, font, radius and glow here
   is pulled from the tokens in style.css :root — nothing new is invented.
   Component classes are namespaced `nm-` to avoid colliding with the
   single-page site's classes.
   ========================================================================== */

/* ---- Skip link (net-new a11y affordance; the single-page site has none) --- */
.nm-skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  box-shadow: 0 0 20px var(--glow);
  transition: top 0.2s ease;
}

.nm-skip-link:focus {
  top: 12px;
}

/* ---- Small back-link used in legal-page sidebars ---- */
.nm-back-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nm-back-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---- Eyebrow label ---- */
.nm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-alt);
  margin-bottom: 16px;
}

.nm-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-alt);
  box-shadow: 0 0 8px var(--pulse);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.nm-hero {
  position: relative;
  padding-top: 56px;
}

.nm-hero-bg {
  position: absolute;
  inset: -32px 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 60% at 20% 40%, #000 25%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 20% 40%, #000 25%, transparent 72%);
  animation: nm-drift 90s linear infinite;
  pointer-events: none;
}

@keyframes nm-drift {
  to { background-position: 340px 170px; }
}

.nm-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.nm-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

.nm-subtitle {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.nm-hero .rule {
  margin: 24px 0 0;
}

/* ---- Stream Deck mockup (CSS-drawn placeholder) ---- */
/* TODO(design): replace this CSS mockup with a real product photo / render
   of the plugin running on a physical Stream Deck once available. */
.nm-deck-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.nm-deck-wrap::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  pointer-events: none;
}

.nm-deck {
  position: relative;
  width: min(380px, 100%);
  padding: 22px;
  background: linear-gradient(155deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 32px var(--glow);
}

.nm-deck-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nm-deck-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-alt);
  animation: pulse 2.4s ease-out infinite;
}

.nm-deck-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.nm-key {
  position: relative;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.nm-key svg {
  width: 40%;
  height: 40%;
  color: var(--text-secondary);
  opacity: 0.5;
}

.nm-key--active {
  grid-column: span 2;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  background: linear-gradient(155deg, var(--accent-soft), var(--bg-hover));
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--glow);
}

.nm-key-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-alt);
}

.nm-key-title {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nm-key-timer {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--accent);
}

.nm-deck-cable {
  width: 40px;
  height: 10px;
  margin: 16px auto 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

/* ==========================================================================
   Features
   ========================================================================== */
.nm-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.nm-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 4px;
}

.nm-feature-icon svg {
  width: 20px;
  height: 20px;
}

.nm-feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nm-feature-head h3 {
  font-size: 1.02rem;
}

/* ==========================================================================
   How it works
   ========================================================================== */
.nm-steps {
  counter-reset: nm-step;
  max-width: 560px;
}

.nm-step {
  position: relative;
  display: flex;
  gap: 20px;
  padding-bottom: 36px;
}

.nm-step:last-child {
  padding-bottom: 0;
}

.nm-step::before {
  counter-increment: nm-step;
  content: counter(nm-step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  z-index: 1;
}

.nm-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 34px;
  left: 17px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
}

.nm-step-body h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  padding-top: 6px;
}

.nm-step-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Screenshot gallery (placeholders)
   ========================================================================== */
.nm-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.nm-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 240px;
  max-width: 320px;
  aspect-ratio: 16 / 10;
  padding: 20px;
  text-align: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
}

.nm-gallery-item svg {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.nm-gallery-item--photo {
  position: relative;
  padding: 0;
  border-style: solid;
  overflow: hidden;
}

.nm-gallery-item--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.nm-gallery-item--photo .nm-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  color: #fff;
}

.nm-gallery-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ==========================================================================
   Permissions
   ========================================================================== */
.nm-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 32px;
  background: var(--warn-soft);
  border: 1px solid var(--accent-warn);
  border-radius: 10px;
  color: var(--text-primary);
}

.nm-notice svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-warn);
}

.nm-notice strong {
  color: var(--accent-warn);
}

.nm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 28px;
}

.nm-perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}

.nm-perm-table th,
.nm-perm-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.nm-perm-table thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.nm-perm-table tbody th {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-alt);
  white-space: nowrap;
}

.nm-perm-table td {
  color: var(--text-secondary);
}

.nm-perm-table tbody tr:last-child th,
.nm-perm-table tbody tr:last-child td {
  border-bottom: none;
}

.nm-scope-list {
  margin-bottom: 32px;
}

.nm-scope-list li {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Privacy summary cards
   ========================================================================== */
.nm-privacy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.nm-privacy-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nm-privacy-card:hover {
  border-color: var(--accent-alt);
  box-shadow: 0 0 20px var(--alt-soft);
}

.nm-privacy-card svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-alt);
}

/* ==========================================================================
   FAQ (native <details>/<summary> — fully keyboard operable, no JS needed)
   ========================================================================== */
.nm-faq-item {
  border-bottom: 1px solid var(--border);
}

.nm-faq-item:first-child {
  border-top: 1px solid var(--border);
}

.nm-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.nm-faq-item summary::-webkit-details-marker {
  display: none;
}

.nm-faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.nm-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.nm-faq-item summary:hover {
  color: var(--accent);
}

.nm-faq-item p {
  padding: 0 4px 20px;
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer link row (Privacy / Terms / Main site / GitHub)
   ========================================================================== */
.nm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

/* ==========================================================================
   Legal document typography (Privacy Policy / Terms)
   ========================================================================== */
.nm-legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.nm-legal-meta span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.nm-legal h2 {
  font-size: 1.15rem;
  margin-top: 44px;
  margin-bottom: 14px;
}

.nm-legal h2:first-of-type {
  margin-top: 0;
}

.nm-legal h3 {
  font-size: 1rem;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.nm-legal p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 14px;
  max-width: 72ch;
}

.nm-legal ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 14px;
  max-width: 72ch;
}

.nm-legal li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.nm-legal strong {
  color: var(--text-primary);
  font-weight: 600;
}

.nm-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nm-hero-grid {
    grid-template-columns: 1fr;
  }

  .nm-deck-wrap {
    order: -1;
    margin-bottom: 8px;
  }

  .nm-deck {
    width: min(320px, 100%);
  }
}

@media (max-width: 767px) {
  .nm-features {
    grid-template-columns: 1fr 1fr;
  }

  .nm-privacy-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nm-features {
    grid-template-columns: 1fr;
  }

  .nm-gallery-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-hero-bg {
    animation: none;
  }
}
