:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.75);
  --action: #0f172a;
  --action-text: #ffffff;
  --xp-blue: #0a58d8;
  --xp-blue-light: #3d8af7;
  --xp-green: #3c9b2e;
  --footer-link-border: rgba(148, 163, 184, 0.6);
  --divider: rgba(148, 163, 184, 0.8);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --surface: #0f172a;
    --surface-elevated: #111827;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.25);
    --glass: rgba(15, 23, 42, 0.72);
    --action: #e2e8f0;
    --action-text: #0f172a;
    --footer-link-border: rgba(148, 163, 184, 0.35);
    --divider: rgba(148, 163, 184, 0.55);
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--surface), var(--bg));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--xp-blue-light);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

main {
  flex: 1 0 auto;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 44px;
  height: 44px;
  display: block;
}

.nav-buttons {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

header.show-nav-buttons .nav-buttons {
  opacity: 1;
  pointer-events: auto;
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--action);
  color: var(--action-text);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--xp-blue), var(--xp-blue-light), #7fb8ff, var(--xp-green), #7fb8ff, var(--xp-blue-light));
  background-size: 300% 300%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn:hover {
  transform: scale(1.05);
  background: transparent;
  color: #ffffff;
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition: none; animation: none; }
  .btn:hover { transform: none; }
}

/* Hero */

section {
  padding: 32px 0;
}

@media (min-width: 1024px) {
  section {
    padding: 64px 0;
  }
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

h1 {
  font-size: clamp(2.2em, 6vw, 3em);
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
}

.heading-emoticon {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
}

.lead {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cta-row .btn {
  flex: 1 1 40%;
}

.requirements {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* An XP-style window around the screenshot. */

.visuals {
  display: flex;
  justify-content: center;
}

.window {
  width: 100%;
  max-width: 640px;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  background: var(--xp-blue);
  padding: 0 3px 3px;
  box-shadow: 0 24px 60px rgba(10, 40, 100, 0.25);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 4px 0 8px;
  background: linear-gradient(180deg, #3d8af7 0%, #0a58d8 12%, #0054e3 50%, #0a58d8 88%, #003dbb 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-controls i {
  width: 21px;
  height: 21px;
  border-radius: 3px;
  border: 1px solid #ffffff;
  background: linear-gradient(180deg, #5a9cff, #1c62e0);
}

.window-controls i.close {
  background: linear-gradient(180deg, #e9876b, #c43a1a);
}

.window-body {
  background: #ece9d8;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-icon {
  display: none;
  width: 45%;
}

.window-body.no-shot .placeholder-icon {
  display: block;
}

/* Features */

.features {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.feature-emoji {
  width: 32px;
  height: 32px;
  display: block;
}

.feature h3 {
  margin: 10px 0 6px;
  font-size: 17px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Pricing */

.pricing {
  display: flex;
  justify-content: center;
}

.price-card {
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.price-title {
  font-weight: 700;
  font-size: 18px;
}

.price-tag {
  color: var(--muted);
  font-size: 14px;
}

.price-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.emoticon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.price-card .btn {
  width: 100%;
  box-sizing: border-box;
}

.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: 28px auto 0;
}

/* FAQ */

.faq-section {
  background: var(--surface);
}

.faq-container {
  max-width: 720px;
}

.faq-heading {
  text-align: center;
  font-size: clamp(28px, 4vw, 32px);
  margin: 0;
}

.faq-grid {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.faq-card {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  font-weight: 600;
  list-style: none;
  line-height: 1.6;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: "\25BC";
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-card[open] summary::after {
  transform: rotate(-180deg);
}

.faq-card summary:focus-visible {
  outline: 2px solid var(--xp-blue-light);
  outline-offset: 4px;
}

.faq-answer {
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.faq-answer p {
  margin: 0 0 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Privacy policy and other text pages */

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.legal-content h1 {
  font-size: clamp(32px, 5vw, 44px);
  margin: 0 0 24px;
}

.legal-content h2 {
  margin: 32px 0 12px;
  font-size: 22px;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 32px 16px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    gap: 8px;
  }

  footer > .footer-divider {
    display: none;
  }
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--footer-link-border);
  padding-bottom: 2px;
}

footer a:hover,
footer a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.footer-divider {
  color: var(--divider);
  font-size: 18px;
  line-height: 1;
}
