/* Components. Each block is self-contained and uses only tokens; see web/DESIGN.md and /design. */

/* Nav: translucent bar, like a macOS toolbar. */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) max(var(--space-6), calc((100% - var(--width-page)) / 2));
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--text); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: var(--space-6); font-size: var(--text-sm); }
.nav-links a { color: var(--text-muted); transition: color var(--duration-fast) var(--ease-out); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 520px) { .nav-links { gap: var(--space-4); } }

/* Buttons: pill-shaped; one primary per view. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill); border: 0;
  font: 600 var(--text-md) / 1.2 var(--font-sans);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out), filter var(--duration-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn--primary { background: linear-gradient(135deg, var(--green-700), var(--green-500)); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.btn--large { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }
.btn[aria-disabled="true"] { opacity: 0.85; cursor: default; pointer-events: none; }

/* Card */
.card { padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: var(--space-2); }
.card p { margin: 0; color: var(--text-muted); }

/* Badge: small inline label, e.g. "Beta". */
.badge {
  display: inline-block; padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: var(--text-xs); font-weight: 600; vertical-align: middle;
}
.badge--goldfish { background: var(--goldfish-100); color: #b04a17; }

/* App icon with its glow. */
.app-icon { filter: drop-shadow(var(--shadow-icon)); }

/* Hero */
.hero { text-align: center; padding-block: var(--space-16) var(--space-12); display: grid; justify-items: center; gap: var(--space-4); }
.hero .cta { display: grid; justify-items: center; gap: var(--space-3); margin: var(--space-4) 0 var(--space-12); }

/* Media: a feature's screenshot or looping video, with a placeholder until it exists. */
.media {
  aspect-ratio: 16 / 10; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface-stage); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; color: var(--text-muted); font-size: var(--text-sm);
}
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.feature { margin: 0; display: grid; gap: var(--space-3); }
.feature figcaption { color: var(--text-muted); font-size: var(--text-sm); }
.feature figcaption strong { color: var(--text); }

/* Price card */
.price-card { max-width: 440px; margin-inline: auto; text-align: center; display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-8); }
.price { font-size: var(--text-xl); font-weight: 700; color: var(--text); letter-spacing: var(--tracking-heading); }

/* FAQ: native <details>. */
.faq { max-width: var(--width-text); margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); padding-block: var(--space-4); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-muted); font-weight: 400; transition: transform var(--duration-base) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: var(--space-3) 0 0; color: var(--text-muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: var(--space-8) var(--space-6) var(--space-12); text-align: center; display: grid; gap: var(--space-3); }
.footer-links { display: flex; justify-content: center; gap: var(--space-6); font-size: var(--text-sm); }
.footer-links a { color: var(--text-muted); }

/* Mac window illustration (stand-in until there is a real screenshot). Sizes scale with its font-size. */
.window {
  margin-inline: auto; width: 100%; max-width: 1040px; aspect-ratio: 16 / 10;
  display: grid; grid-template-columns: 22% 1fr 24%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-window);
  text-align: left; font-size: clamp(8px, 1.15vw, 13px);
}
.win-sidebar { background: var(--surface-sunken); padding: 1.2em 0.9em; border-right: 1px solid var(--border); }
.lights { display: flex; gap: 0.6em; margin-bottom: 2em; }
.lights i { width: 1em; height: 1em; border-radius: 50%; background: var(--mac-red); }
.lights i:nth-child(2) { background: var(--mac-yellow); }
.lights i:nth-child(3) { background: var(--mac-green); }
.win-group { margin: 1.2em 0 0.5em 0.4em; color: var(--text-muted); font-size: 0.85em; font-weight: 600; }
.win-row { display: flex; align-items: center; gap: 0.7em; padding: 0.5em 0.6em; border-radius: 0.6em; }
.win-row.selected { background: var(--accent-soft); }
.win-row span { display: flex; flex-direction: column; line-height: 1.25; }
.win-row small { color: var(--text-muted); font-size: 0.8em; }
.dot { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--gray-400); flex: none; }
.dot.on { background: var(--mac-green); }
.win-main { display: flex; flex-direction: column; min-width: 0; }
.win-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 1em 1.2em; border-bottom: 1px solid var(--border); font-weight: 600; }
.pills { display: flex; gap: 0.5em; }
.pills i { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.stage { flex: 1; display: grid; place-items: center; background: var(--surface-stage); min-height: 0; padding: 4% 0; }
.phone { height: 100%; aspect-ratio: 9 / 19.5; padding: 2.5%; border-radius: 12% / 5.5%; background: #1c1f1d; box-shadow: 0 1.5em 3em -1em rgb(0 0 0 / 0.45); }
.screen {
  height: 100%; border-radius: 10% / 4.6%;
  background: linear-gradient(160deg, var(--green-700), var(--green-300) 55%, var(--green-100));
  display: flex; flex-direction: column; align-items: center; padding: 18% 10% 8%; color: #fff;
}
.clock { font-size: 2.6em; font-weight: 300; letter-spacing: -0.02em; }
.apps, .dock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9em; width: 100%; }
.apps { margin-top: auto; }
.dock { margin-top: 1.4em; padding: 0.6em; border-radius: 1.2em; background: rgb(255 255 255 / 0.25); }
.apps i, .dock i { aspect-ratio: 1; border-radius: 30%; background: rgb(255 255 255 / 0.85); }
.win-inspector { background: var(--surface-sunken); border-left: 1px solid var(--border); padding: 3.5em 0.9em 1em; }
.win-field { display: flex; align-items: center; justify-content: space-between; padding: 0.7em 0.8em; margin-bottom: 0.25em; border-radius: 0.6em; background: var(--surface); }
.win-field em { font-style: normal; color: var(--text-muted); }
.toggle { width: 2.4em; height: 1.4em; border-radius: 1em; background: var(--gray-400); position: relative; }
.toggle::after { content: ""; position: absolute; top: 0.15em; left: 0.15em; width: 1.1em; height: 1.1em; border-radius: 50%; background: #fff; }
.toggle.on { background: var(--mac-green); }
.toggle.on::after { left: auto; right: 0.15em; }
@media (max-width: 720px) {
  .window { grid-template-columns: 1fr; aspect-ratio: 3 / 4; }
  .win-sidebar, .win-inspector { display: none; }
}

/* A badge next to display text scales with it. */
.display .badge { font-size: max(var(--text-xs), 0.2em); letter-spacing: 0; vertical-align: middle; }
