/* ==========================================================================
   Components — reusable pieces referenced from more than one section:
   buttons, header/nav, the logo mark, the overlay-mock (the product itself,
   rendered in CSS), feature cards, the OS toggle, modal, and footer.
   ========================================================================== */

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.35s var(--ease);
  position: relative;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(76, 187, 23, 0.55);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.6em 1.1em;
  font-size: 0.82rem;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ---------------- header / nav ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}
header.is-scrolled {
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
/* The actual app icon — LyricPlayer/resources/icon.png, the same file
   packaged into the Windows installer and used for the taskbar/tray. */
.logo-mark {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  padding-block: 0.3em;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: right 0.3s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  right: 0;
}
.nav-links a[aria-current="page"] {
  color: var(--text);
}
.nav-links a[aria-current="page"]::after {
  right: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---------------- overlay-mock: the product, rendered in CSS ---------------- */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.stage-backdrop {
  position: absolute;
  inset: 6%;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%), var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
}
.stage-backdrop.gaming {
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.35) 40%, transparent 41%),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255, 255, 255, 0.25) 40%, transparent 41%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255, 255, 255, 0.3) 40%, transparent 41%),
    linear-gradient(160deg, rgba(76, 187, 23, 0.12), rgba(0, 0, 0, 0) 45%), var(--surface);
}
.stage-backdrop.work {
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 92px), var(--surface);
}
.stage-backdrop.code {
  background-image: linear-gradient(160deg, rgba(76, 187, 23, 0.1), rgba(0, 0, 0, 0) 45%), var(--surface);
}
.stage-backdrop.study {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%), var(--surface);
}

.scene {
  position: absolute;
  inset: 6%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.scene i {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}
.scene.gaming i.crosshair {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  top: 38%;
  left: 46%;
}
.scene.gaming i.bar1 {
  width: 120px;
  height: 8px;
  top: 14%;
  left: 8%;
  background: linear-gradient(90deg, var(--brand), transparent);
}
.scene.gaming i.bar2 {
  width: 80px;
  height: 8px;
  top: 24%;
  left: 8%;
  opacity: 0.5;
}
.scene.gaming i.ammo {
  width: 46px;
  height: 46px;
  bottom: 12%;
  right: 8%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.scene.work i.doc {
  width: 58%;
  height: 70%;
  top: 12%;
  left: 6%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.scene.work i.line {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.scene.code i.gutter {
  width: 26px;
  height: 76%;
  top: 10%;
  left: 6%;
  background: rgba(255, 255, 255, 0.04);
}
.scene.code i.cl {
  height: 7px;
  border-radius: 3px;
  left: 44px;
}
.scene.study i.page {
  width: 64%;
  height: 78%;
  top: 8%;
  left: 18%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.scene.study i.tl {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.13);
  left: 26%;
}

/* The real overlay window is transparent, frameless, and has no shadow —
   see LyricPlayer/src/main/window/OverlayManager.ts (transparent: true,
   frame: false, hasShadow: false) and src/renderer/src/index.css (background:
   transparent, no box anywhere). So this mockup deliberately has no card,
   border, or blur behind it either — it's genuinely just floating text. The
   soft ::before vignette exists only so the demo reads on a busy backdrop;
   the real overlay has no such background layer. */
.overlay-mock {
  position: relative;
  z-index: 2;
  width: min(88%, 420px);
  padding: 0.4rem 1rem;
  animation: float 6s ease-in-out infinite;
}
.overlay-mock::before {
  content: "";
  position: absolute;
  inset: -14% -10%;
  z-index: -1;
  background: radial-gradient(60% 70% at 50% 50%, rgba(0, 0, 0, 0.35), transparent 75%);
  filter: blur(6px);
}

.overlay-mock .row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.now-playing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(76, 187, 23, 0.2);
}
.wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.wave span {
  width: 2.5px;
  border-radius: 1px;
  background: var(--gradient);
  animation: bars 1s ease-in-out infinite;
}
.wave span:nth-child(1) {
  height: 35%;
  animation-delay: -0.8s;
}
.wave span:nth-child(2) {
  height: 90%;
  animation-delay: -0.4s;
}
.wave span:nth-child(3) {
  height: 55%;
  animation-delay: -0.6s;
}
.wave span:nth-child(4) {
  height: 100%;
  animation-delay: -0.1s;
}

/* The three-line karaoke window — mirrors LyricsScroller.tsx's default
   lineCount:3 behavior exactly: neighbors dim to 60% opacity, the active
   line renders bold at full brightness. No card, no divider, no chrome. */
.oline {
  font-family: var(--font-display);
  line-height: 1.35;
  text-align: center;
  transition: opacity 0.4s ease;
  max-width: 100%;
}
.oline.prev,
.oline.next {
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1rem);
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.6;
}
.oline.prev {
  margin-bottom: 0.5em;
}
.oline.next {
  margin-top: 0.5em;
}
.oline.active {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  opacity: 1;
}

.usecase-visual .oline.prev,
.usecase-visual .oline.next {
  font-size: 0.82rem;
}
.usecase-visual .oline.active {
  font-size: clamp(1.02rem, 0.9rem + 0.5vw, 1.25rem);
}

/* ---------------- feature cards ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* No card chrome — icon, heading, and text separated by grid gap alone. */
.feature-card {
  padding-right: 1rem;
}
.feature-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.35s var(--ease);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
}
.feature-card:hover .feature-icon {
  transform: translateY(-2px);
}
.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Asides — a colored rule instead of a boxed callout. */
.lang-note,
.platform-note {
  display: flex;
  gap: 1em;
  align-items: flex-start;
  margin-top: 1.6rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brand);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.lang-note .eyebrow,
.platform-note .eyebrow {
  flex: none;
  margin-top: 0.15em;
}

.compat-footnote {
  margin-top: 1rem;
  margin-bottom: 2.2rem;
  max-width: 68ch;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.stage-caption-outer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.download-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
  display: flex;
  gap: 1.4em;
  flex-wrap: wrap;
}

.download-alt-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.download-alt-link:hover {
  color: var(--brand-from);
}

/* ---------------- footer ---------------- */
footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem 3rem;
  margin-bottom: 2.6rem;
}
@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.9rem;
  max-width: 32ch;
}
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.25s ease;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
/* ---------------- modal ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  width: min(440px, 100%);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 40px);
  box-shadow: var(--shadow-lift);
  transform: scale(0.92) translateY(14px);
  transition: transform 0.4s var(--ease);
  position: relative;
}
.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.25s ease;
}
.modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.modal-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.3rem;
}
.modal-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.modal-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}
.modal-file {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
}
.modal-file b {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}
.modal-file span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.modal-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 0.7rem;
}
.modal-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gradient);
}
.modal-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.6rem;
}
.modal-actions .btn {
  flex: 1;
}
