:root {
  color-scheme: dark;
  --bg: #07070c;
  --panel: rgba(18, 18, 28, 0.92);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.68);
  --accent: #fffc00;
  --accent-dim: rgba(255, 252, 0, 0.14);
  --border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mac-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.14), transparent 40%),
    radial-gradient(circle at 82% 18%, rgba(255, 252, 0, 0.1), transparent 36%),
    linear-gradient(180deg, #050508 0%, #0a0a12 55%, #07070c 100%);
}

.mac-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,0.45), transparent);
}

.mac-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
}

.mac-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.mac-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.88rem;
}

.mac-nav a {
  color: var(--muted);
  text-decoration: none;
}

.mac-nav a:hover {
  color: var(--text);
}

.mac-main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem;
}

.mac-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1rem, 4vw, 3rem) 0 4rem;
}

.mac-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mac-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.mac-lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.6;
}

.mac-lead strong {
  color: var(--text);
  font-weight: 600;
}

.mac-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.mac-price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mac-price-note {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.mac-buy-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  background: var(--accent);
  color: #111;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(255, 252, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mac-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(255, 252, 0, 0.28);
}

.mac-buy-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.mac-buy-btn-large {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.mac-status {
  min-height: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.88rem;
}

.mac-status.is-error {
  color: #ffb4b4;
}

.mac-status.is-success {
  color: #b8ffb8;
}

.mac-download-panel[hidden],
.mac-landing[hidden],
.mac-download-page[hidden],
.mac-nav[hidden] {
  display: none !important;
}

.mac-download-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) 0 2rem;
}

.mac-download-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.mac-download-ghost {
  width: 96px;
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 24px rgba(255, 252, 0, 0.35));
}

.mac-download-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.mac-download-lead {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.mac-download-btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.mac-download-meta {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.mac-install {
  padding: 1.35rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.mac-install h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.mac-install-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.mac-install-steps li {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mac-install-steps strong {
  font-size: 0.95rem;
}

.mac-install-steps span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.mac-install-steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  color: var(--text);
}

.mac-download-footer-note {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.mac-download-footer-note p {
  margin: 0 0 0.5rem;
}

.mac-download-footer-note a {
  color: var(--accent);
  text-decoration: none;
}

.mac-download-footer-note a:hover {
  text-decoration: underline;
}

.mac-page.is-purchased {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mac-page.is-purchased .mac-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.mac-page.is-purchased .mac-download-page {
  padding: 0;
  margin: 0 auto;
  width: 100%;
}

.mac-page.is-purchased .mac-download-hero {
  margin-bottom: 0;
}

.mac-page.is-purchased .mac-footer {
  flex-shrink: 0;
}

.mac-fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mac-hero-visual {
  display: flex;
  justify-content: center;
}

.mac-window {
  width: min(100%, 420px);
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(8, 8, 14, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.mac-window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.mac-window-bar span:nth-child(1) { background: #ff5f57; }
.mac-window-bar span:nth-child(2) { background: #febc2e; }
.mac-window-bar span:nth-child(3) { background: #28c840; }

.mac-window-bar span:nth-child(-n+3) {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.mac-window-title {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.mac-window-body {
  position: relative;
  min-height: 320px;
  padding: 2rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.mac-ghost-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
  transition: transform 0.15s ease;
}

.mac-ghost-btn:hover .mac-ghost {
  filter: drop-shadow(0 0 30px rgba(255, 252, 0, 0.5));
}

.mac-ghost-btn:active {
  transform: scale(0.96);
}

.mac-ghost-btn.is-talking .mac-ghost {
  animation: macGhostPop 0.35s ease-out;
}

.mac-ghost-btn.is-speaking .mac-ghost {
  filter: drop-shadow(0 0 32px rgba(255, 252, 0, 0.55));
}

.mac-ghost {
  width: min(48vw, 180px);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(255, 252, 0, 0.35));
  animation: macFloat 3.2s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.mac-window-bubble.is-swapping {
  animation: macBubbleIn 0.2s ease-out;
}

.mac-window-bubble {
  max-width: 18rem;
  padding: 0.75rem 0.95rem;
  border-radius: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.mac-window-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.mac-window-chips span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mac-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.mac-feature {
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.mac-feature h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.mac-feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.mac-privacy {
  margin-bottom: 2.5rem;
  padding: 1.5rem 1.35rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 252, 0, 0.18);
  background: linear-gradient(135deg, rgba(255, 252, 0, 0.08), rgba(255, 255, 255, 0.02));
}

.mac-privacy h2 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
}

.mac-privacy ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.mac-cta {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.mac-cta h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.mac-cta p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.mac-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.mac-footer a {
  color: var(--muted);
  text-decoration: none;
}

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

@keyframes macFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes macGhostPop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-6px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes macBubbleIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .mac-hero {
    grid-template-columns: 1fr;
  }

  .mac-hero-visual {
    order: -1;
  }

  .mac-features {
    grid-template-columns: 1fr;
  }

  .mac-nav-landing {
    display: none;
  }

  .mac-nav-download:not([hidden]) {
    display: flex;
  }
}
