:root {
  --bg-color: #0c0d0e;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --accent: #2997ff;
  --accent-hover: #147ce5;
  --accent-green: #30d158;
  --code-bg: #1c1c1e;
  --max-width: 780px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #ffffff;
    --card-bg: rgba(0, 0, 0, 0.02);
    --card-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-green: #28cd41;
    --code-bg: #f2f2f7;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 20px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 0 80px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
}

.brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Animated Menu Bar Waveform Glyph */
.waveform-glyph {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 4px;
}

.waveform-bar {
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(135deg, #ff3b30, #ff9500, #ffcc00, #34c759, #007aff, #af52de, #ff3b30);
  background-size: 400% 400%;
  animation: cycleGradient 6s linear infinite, bounceBar 1.8s ease-in-out infinite alternate;
}

.waveform-bar:nth-child(1) { height: 7px; animation-delay: 0s, 0.1s; }
.waveform-bar:nth-child(2) { height: 13px; animation-delay: -1s, 0.3s; }
.waveform-bar:nth-child(3) { height: 18px; animation-delay: -2s, 0s; }
.waveform-bar:nth-child(4) { height: 11px; animation-delay: -3s, 0.4s; }
.waveform-bar:nth-child(5) { height: 6px; animation-delay: -4s, 0.2s; }

@keyframes cycleGradient {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes bounceBar {
  0% { transform: scaleY(0.7); }
  100% { transform: scaleY(1.15); }
}

/* Menu Bar Mockup Showcase */
.mockup-container {
  margin: 40px 0 50px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.macos-menubar {
  height: 34px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-size: 0.82rem;
  color: #ffffff;
}

.menubar-left {
  display: flex;
  gap: 16px;
  align-items: center;
  font-weight: 500;
}

.menubar-right {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.82rem;
}

.pipedown-status-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  cursor: default;
}

.mockup-content {
  padding: 30px;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, rgba(41, 151, 255, 0.08), transparent 70%);
}

/* PipeDown Popover Window Mockup */
.popover-mockup {
  width: 360px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  color: #f5f5f7;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

.popover-header .btn-small {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
}

.call-banner-card {
  margin: 0 12px 12px;
  background: rgba(48, 209, 88, 0.15);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
}

.call-banner-title {
  color: #30d158;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.call-banner-desc {
  font-size: 0.78rem;
  color: #a1a1a6;
}

.popover-section-title {
  padding: 8px 14px 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #86868b;
  font-weight: 600;
}

.popover-row {
  display: flex;
  align-items: center;
  padding: 7px 14px;
  gap: 10px;
  transition: background 0.15s ease;
}

.popover-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.app-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
}

.app-details {
  flex: 1;
  min-width: 0;
}

.app-name {
  font-weight: 500;
  color: #f5f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-subtitle {
  font-size: 0.72rem;
  color: #86868b;
}

/* Pulsing Level Meter */
.meter-bar {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  border-radius: 2px;
  background: #30d158;
  animation: meterPulse 1.2s ease-in-out infinite alternate;
}

.meter-fill.muted {
  background: #86868b;
  width: 25% !important;
  animation: none;
}

@keyframes meterPulse {
  0% { width: 30%; }
  50% { width: 85%; }
  100% { width: 45%; }
}

.row-action-btn {
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 4px;
}

.row-action-btn.active-mute {
  color: #ff453a;
}

.popover-footer {
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #86868b;
  font-size: 0.8rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

p strong {
  color: var(--text-primary);
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
}

li strong {
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0 20px;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: 0.9rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
  margin-top: 12px;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}

.cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background-color: var(--code-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.2);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
  margin-top: 12px;
}

.form-status.success {
  display: block;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.3);
  color: var(--accent-green);
}

.form-status.error {
  display: block;
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff453a;
}

footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

footer a {
  color: var(--text-secondary);
}

footer a:hover {
  color: var(--text-primary);
}
