/* ============================================
   Viboplr — Static Showcase Website
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-bg-dark: #0d0d14;
  --color-text: #1a1a2e;
  --color-text-muted: #5a5a72;
  --color-text-light: #8888a0;
  --color-border: #e8e8f0;
  --color-accent-start: #FF6B6B;
  --color-accent-end: #E91E8A;
  --gradient-accent: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  --gradient-accent-hover: linear-gradient(135deg, #ff7e7e, #f02e9a);
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 4px 30px rgba(233,30,138,0.15);
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --container-max: 1120px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

p {
  color: var(--color-text-muted);
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: background var(--transition-base);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo svg {
  width: 34px;
  height: 34px;
  margin-right: -6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link--sponsor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-accent-start);
}

.nav-link--sponsor:hover {
  color: var(--color-accent-end);
}

.nav-link--sponsor::after {
  background: var(--color-accent-start);
}

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: 100px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 100px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(233,30,138,0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(233,30,138,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent-end);
  color: var(--color-accent-end);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  font-size: 0.9rem;
  padding: 10px 24px;
}

.btn-lg {
  font-size: 1.1rem;
  padding: 16px 40px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* --- Hero --- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,107,107,0.06) 0%, rgba(233,30,138,0.03) 40%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-end);
  background: rgba(233,30,138,0.06);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(233,30,138,0.12);
}

.hero h1 {
  max-width: 780px;
  margin: 0 auto var(--space-md);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-screenshot {
  margin: var(--space-2xl) auto 0;
  max-width: 900px;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.hero-screenshot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,107,107,0.03), rgba(233,30,138,0.03));
  pointer-events: none;
}

.hero-screenshot-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-screenshot-inner svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.hero-screenshot-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* --- Feature Cards (Home) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.section-cta {
  text-align: center;
  margin-top: var(--space-lg);
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233,30,138,0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(233,30,138,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: var(--space-xs);
  font-size: 1.15rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Story Page --- */
.story-body {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.story-body h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-xs);
}

.story-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.story-body p + p {
  margin-top: var(--space-sm);
}

.story-body a {
  color: var(--color-accent-end);
  font-weight: 600;
}

/* --- Bottom CTA --- */
.bottom-cta {
  text-align: center;
  padding: var(--space-3xl) 0;
  position: relative;
  /* The 600px ::before glow otherwise causes page-level horizontal scroll on phones */
  overflow: hidden;
}

.bottom-cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,107,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.bottom-cta h2 {
  margin-bottom: var(--space-sm);
}

.bottom-cta p {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
}

.cta-story-link {
  color: var(--color-accent-end);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(233,30,138,0.35);
  text-underline-offset: 3px;
}

.cta-story-link:hover {
  text-decoration-color: var(--color-accent-end);
}

.bottom-cta .hero-buttons {
  position: relative;
  z-index: 1;
}

/* --- Features Page — Alternating Sections --- */
.feature-section {
  padding: var(--space-2xl) 0;
}

.feature-section:nth-child(even) {
  background: var(--color-bg-alt);
}

/* Force a light background regardless of nth-child position (home-page spotlight) */
.feature-section.feature-section--light {
  background: var(--color-bg);
}

.feature-cta {
  margin-top: var(--space-sm);
}

/* Group header opening a titled cluster of feature sections */
.feature-group-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-xl);
}

.feature-group-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-xs);
}

.feature-group-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.feature-section:nth-child(even) .feature-row {
  direction: rtl;
}

.feature-section:nth-child(even) .feature-row > * {
  direction: ltr;
}

.feature-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-content h2 {
  margin-bottom: 0;
}

.feature-content p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-xs);
}

.feature-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.feature-list-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
}

/* "plugin" badge on feature bullets that are provided by a plugin, not core */
.feature-tag {
  flex-shrink: 0;
  padding: 1px 8px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.feature-image {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.feature-section:nth-child(even) .feature-image {
  background: var(--color-bg);
}

/* Very wide screenshots (mini player bar) keep their natural ratio */
.feature-image--wide,
.feature-section:nth-child(even) .feature-image--wide {
  aspect-ratio: auto;
  background: transparent;
  border: none;
}

.feature-image--wide img {
  height: auto;
  object-fit: contain;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.feature-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,107,107,0.02), rgba(233,30,138,0.02));
  pointer-events: none;
}

/* --- Download Page --- */
.download-hero {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  text-align: center;
}

.download-hero h1 {
  margin-bottom: var(--space-sm);
}

.download-hero p {
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto;
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
}

.platform-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233,30,138,0.2);
}

.platform-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-icon svg {
  width: 48px;
  height: 48px;
  color: var(--color-text);
}

.platform-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.platform-card .platform-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.platform-card .btn {
  width: 100%;
  justify-content: center;
}

/* System Requirements */
.requirements {
  max-width: 600px;
  margin: 0 auto;
}

.requirements h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.req-table {
  width: 100%;
  border-collapse: collapse;
}

.req-table tr {
  border-bottom: 1px solid var(--color-border);
}

.req-table td {
  padding: 14px 0;
  font-size: 0.95rem;
}

.req-table td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  width: 160px;
}

.req-table td:last-child {
  color: var(--color-text-muted);
}

/* What's New */
.whats-new {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.whats-new h2 {
  margin-bottom: var(--space-md);
}

.whats-new-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whats-new-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.whats-new-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
  margin-top: 8px;
}

/* Auto-update note */
.auto-update {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.auto-update-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(233,30,138,0.06);
  border: 1px solid rgba(233,30,138,0.12);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
}

.auto-update-badge svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent-end);
  flex-shrink: 0;
}

.auto-update-badge span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.auto-update p {
  font-size: 0.9rem;
}

.auto-update-history {
  margin-top: var(--space-md);
}

.auto-update-history a {
  color: var(--color-accent-end);
  font-weight: 600;
  font-family: var(--font-display);
}

/* --- History / Timeline --- */
.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-entry {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-entry:not(:first-child)::before {
  width: 10px;
  height: 10px;
  left: -29px;
  top: 8px;
  background: var(--color-border);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xs);
}

.timeline-version {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}

.timeline-entry:first-child .timeline-version {
  font-size: 1.5rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.timeline-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.timeline-body h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-top: var(--space-sm);
}

.timeline-body h4:first-child {
  margin-top: 0;
}

.timeline-body ul {
  margin-top: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-body li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.timeline-body li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
  margin-top: 9px;
}

.timeline-assets {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.timeline-asset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.timeline-asset-link:hover {
  border-color: var(--color-accent-end);
  color: var(--color-accent-end);
}

.timeline-asset-link svg {
  width: 14px;
  height: 14px;
}

.timeline-empty {
  text-align: center;
  padding: var(--space-xl) 0;
  color: var(--color-text-light);
  font-family: var(--font-display);
}

/* --- Skin Gallery --- */
.skin-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.skin-gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.skin-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.skin-gallery-caption {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
}

.skin-gallery-caption strong {
  color: var(--color-text);
}

@media (max-width: 768px) {
  .skin-gallery {
    grid-template-columns: 1fr;
  }
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-left {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-link {
  font-size: 0.85rem;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-text);
}

/* --- Animations --- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fade-up 0.6s ease both;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Page header (Features, Download) --- */
.page-header {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
    --space-3xl: 5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

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

  .feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .feature-section:nth-child(even) .feature-row {
    direction: ltr;
  }

  .feature-image {
    order: -1;
  }

  .platform-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons .btn {
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Gallery (plugins & skins browse pages) ===== */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto var(--space-lg);
  flex-wrap: wrap;
}

.gallery-search {
  flex: 1 1 320px;
  max-width: 480px;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.gallery-search:focus {
  outline: none;
  border-color: rgba(233, 30, 138, 0.4);
  box-shadow: var(--shadow-glow);
}

.gallery-count {
  font-size: 0.85rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

.gallery-status {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-2xl) var(--space-md);
  font-size: 1rem;
}

.gallery-status--error {
  color: var(--color-accent-end);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
}

.gallery-section {
  margin-bottom: var(--space-xl);
}

.gallery-section-title {
  max-width: var(--container-max);
  margin: 0 auto var(--space-md);
  font-size: 1.4rem;
}

.gallery-section-title[hidden] {
  display: none;
}

.gallery-card {
  display: flex;
  gap: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 30, 138, 0.2);
}

.gallery-card--rec {
  border-color: rgba(233, 30, 138, 0.35);
}

.gallery-card--skin {
  flex-direction: column;
  gap: var(--space-sm);
}

.gallery-card-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.gallery-card-icon svg {
  width: 30px;
  height: 30px;
}

.gallery-card-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-card-body {
  flex: 1;
  min-width: 0;
}

.gallery-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.gallery-card-head h3 {
  font-size: 1.1rem;
  margin: 0;
}

.gallery-card-id {
  display: inline-block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-light);
}

.gallery-card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0.4rem 0 0.6rem;
  line-height: 1.5;
}

.gallery-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.gallery-meta-pill {
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  text-transform: capitalize;
}

.gallery-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  background: var(--gradient-accent);
}

.gallery-badge--experimental {
  background: #a16207;
}

.gallery-section-note {
  max-width: var(--container-max);
  margin: 0 auto var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.gallery-card-actions {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.gallery-install {
  white-space: nowrap;
}

.gallery-install .btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.gallery-card-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
}

.gallery-card-links:empty {
  display: none;
}

.gallery-source {
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.gallery-source:hover {
  color: var(--color-accent-end);
}

/* skin-specific */
.gallery-skin-preview {
  height: 84px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.gallery-skin-bar {
  position: absolute;
  left: 14px;
  right: 40px;
  bottom: 16px;
  height: 10px;
  border-radius: 5px;
  opacity: 0.85;
}

.gallery-skin-dot {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.gallery-swatches {
  display: flex;
  gap: 6px;
  margin: 0.5rem 0 0.6rem;
}

.gallery-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

/* ===== "How submission works" steps strip ===== */
.gallery-steps {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.gallery-steps h2 {
  margin-bottom: var(--space-xs);
}

.gallery-steps-intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.gallery-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  text-align: left;
}

.gallery-step {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.gallery-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--gradient-accent);
  margin-bottom: var(--space-sm);
}

.gallery-step h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.gallery-step p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.gallery-step code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--color-bg-alt);
  padding: 1px 5px;
  border-radius: 4px;
}

.gallery-steps-note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.gallery-steps-note a {
  color: var(--color-accent-end);
  font-weight: 600;
}

@media (max-width: 768px) {
  .gallery-steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Plugin developer docs (plugin-dev.html) ===== */
.docs-body {
  max-width: 880px;
  margin: 0 auto;
}

.docs-body h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.docs-body h2 + p,
.docs-body .docs-lead {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.docs-body p {
  line-height: 1.65;
}

.docs-body p code,
.docs-body li code,
.docs-body td code,
.docs-body th code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-word;
}

.docs-code {
  background: var(--color-bg-dark);
  color: #e8e8f0;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-sm) 0 var(--space-md);
  overflow-x: auto;
}

.docs-code pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.6;
  white-space: pre;
}

.docs-code-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

.docs-list {
  margin: 0 0 var(--space-md) 1.25rem;
}

ul.docs-list {
  list-style: disc;
}

ol.docs-list {
  list-style: decimal;
}

.docs-list li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
  padding-left: 4px;
}

.docs-list li::marker {
  color: var(--color-accent-end);
  font-weight: 600;
}

/* Anchor TOC chips for the API reference */
.api-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--space-sm) 0 var(--space-lg);
}

.api-toc a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 12px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.api-toc a:hover {
  color: var(--color-accent-end);
  border-color: var(--color-accent-end);
}

/* One namespace = one group */
.api-group {
  margin-bottom: var(--space-lg);
  scroll-margin-top: calc(var(--nav-height) + var(--space-sm));
}

.api-group h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.api-group h3 .api-ns {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.api-group-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.api-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.api-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  padding: 10px 14px;
}

.api-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.api-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text);
  white-space: nowrap;
}

.docs-note {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent-end);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: var(--space-sm) 0 var(--space-md);
}

.docs-note code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

@media (max-width: 768px) {
  .api-table td:first-child {
    white-space: normal;
    word-break: break-word;
  }
}

/* ===== Install pages (install-mac.html / install-windows.html) ===== */

/* Auto-download status card in the hero */
.install-download {
  max-width: 560px;
  margin: var(--space-lg) auto 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.install-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-accent-end);
  animation: install-spin 0.8s linear infinite;
}

@keyframes install-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .install-spinner { animation: none; }
}

.install-download__status {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 6px;
}

.install-download__file {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-light);
  word-break: break-all;
  margin-bottom: var(--space-sm);
}

.install-download__manual {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.install-download__manual a {
  color: var(--color-accent-end);
  font-weight: 600;
}

/* Numbered install steps */
.install-steps {
  list-style: none;
  counter-reset: install-step;
  margin: var(--space-md) 0;
  padding: 0;
}

.install-step {
  position: relative;
  counter-increment: install-step;
  padding: 0 0 var(--space-md) 3.25rem;
}

.install-step::before {
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(233,30,138,0.25);
}

/* Vertical connector between steps */
.install-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(1.125rem - 1px);
  top: 2.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: var(--color-border);
}

.install-step h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.2rem 0 0.4rem;
}

.install-step p {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

.install-step p:last-child {
  margin-bottom: 0;
}

/* Copy-able command box */
.copy-cmd {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--color-bg-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.5rem 0;
}

.copy-cmd code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e8e8f0;
  padding: 0.7rem 0.9rem;
  overflow-x: auto;
  white-space: nowrap;
  background: none;
  border: none;
}

.copy-cmd button {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: none;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding: 0 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.copy-cmd button:hover {
  background: rgba(255,255,255,0.2);
}

.copy-cmd button.copied {
  background: var(--gradient-accent);
}
