/* Mirai download site — design tokens mirror the app (src/theme.js). */

:root {
  --bg: #0C0E12;
  --surface: #12151C;
  --surface-hi: #1A2029;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #F3F6FA;
  --text-dim: #96A0B0;
  --text-faint: #5C6575;
  --accent: #FF6B3D;
  --accent-ink: #0C0E12;

  --radius: 14px;
  --radius-sm: 10px;
  --content-max: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 20px; }

.section { padding: 72px 0; }

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 28px; font-weight: 800; }
.section-sub { margin: 12px 0 0; color: var(--text-dim); max-width: 34em; }

/* Focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 14, 18, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 8px; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}
.header-links a:not(.header-download):hover { color: var(--text); }

.header-download {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
}
.header-download:hover { background: var(--accent); color: var(--accent-ink); }

/* Hero */
.hero { padding: 72px 0 24px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.hero-tagline { margin: 6px 0 0; font-size: 20px; font-weight: 600; color: var(--text-dim); }
.hero-description { margin: 20px 0 0; color: var(--text-dim); max-width: 34em; }

.hero-actions { margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 14px 26px;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: #ff7f58; color: var(--accent-ink); }
.btn-primary:active { background: #f25a2a; }

.btn-lg { padding: 16px 30px; font-size: 17px; }

.btn .ic { width: 18px; height: 18px; }

.btn-version {
  font-weight: 600;
  opacity: 0.72;
  margin-left: 4px;
}

.ic { width: 18px; height: 18px; }
.ic-sm { width: 15px; height: 15px; }

.hero-meta { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.meta-chip strong { color: var(--text); font-weight: 700; }

.hero-app { display: flex; justify-content: center; align-items: center; }

.app-tile {
  width: min(230px, 62vw);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.8);
}
.app-tile img { width: 100%; height: auto; }

/* Features */
.features { border-top: 1px solid var(--line-soft); }

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

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

.feature-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 107, 61, 0.12);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature h3 { font-size: 16px; font-weight: 700; }
.feature p { margin: 8px 0 0; font-size: 14.5px; color: var(--text-dim); }

/* Preview */
.preview { border-top: 1px solid var(--line-soft); }

.screenshot-gallery {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.screenshot-gallery li { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.screenshot-gallery img { width: 100%; height: auto; }

.device-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.device {
  width: 220px;
  margin: 0 auto;
  padding: 12px 10px 22px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface-hi);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.8);
}

.device-screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  aspect-ratio: 9 / 19;
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-screen img { width: min(120px, 60%); height: auto; }

.device-caption p { margin: 0; color: var(--text-dim); }
.device-note { margin-top: 10px !important; font-size: 13px; color: var(--text-faint); }

/* Download */
.download { border-top: 1px solid var(--line-soft); }

.download-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 24px;
}

.download-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.download-mark { border-radius: 14px; }
.download-title h2 { font-size: 24px; font-weight: 800; }
.download-title p { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }

.download-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 0 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.download-specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.download-specs > div:last-child { border-bottom: 0; }
.download-specs dt { color: var(--text-faint); font-size: 13px; }
.download-specs dd { margin: 0; color: var(--text); font-weight: 600; font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }

.hidden { display: none !important; }

.changelog { margin-top: 28px; border-top: 1px solid var(--line-soft); padding-top: 22px; }
.changelog h3, .changelog-sub {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.changelog-sub { margin: 18px 0 8px; color: var(--accent); }

.changelog-entry { display: flex; gap: 14px; }
.changelog-version { font-weight: 800; font-size: 15px; color: var(--text); min-width: 66px; }
.changelog-date { color: var(--text-faint); font-size: 12.5px; display: block; font-weight: 600; margin-top: 2px; }
.changelog ul { margin: 2px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; }
.changelog ul li { margin: 4px 0; }

/* Install */
.install { border-top: 1px solid var(--line-soft); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.steps li:last-child { border-bottom: 0; }
.steps strong { color: var(--text); font-weight: 700; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-hi);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  transform: translateY(2px);
}

/* Trust */
.trust { border-top: 1px solid var(--line-soft); }

.trust-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 107, 61, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 107, 61, 0.06);
}

.trust-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 107, 61, 0.16);
  color: var(--accent);
  align-items: center;
  justify-content: center;
}
.trust-icon svg { width: 22px; height: 22px; }

.trust-box h2 { font-size: 19px; font-weight: 800; }
.trust-box p { margin: 10px 0 0; font-size: 14.5px; color: var(--text-dim); }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); padding: 36px 0; }

.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-line { margin: 0; font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* Desktop */
@media (min-width: 720px) {
  .section { padding: 96px 0; }

  .hero { padding: 104px 0 32px; }
  .hero-grid { grid-template-columns: 1fr 300px; align-items: center; gap: 40px; }
  .hero-app { order: 2; }
  .hero h1 { font-size: 52px; }

  .feature-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .screenshot-gallery { grid-template-columns: repeat(3, 1fr); }
  .device-preview { grid-template-columns: 300px 1fr; }
  .device { margin: 0; }

  .download-panel { padding: 40px 44px; }
  .download-specs { grid-template-columns: 1fr 1fr; }
  .download-specs > div { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 14px 18px; }
  .download-specs > div:nth-child(even) { border-right: 0; }
  .download-specs > div:nth-last-child(-n+2) { border-bottom: 0; }

  .trust-box { grid-template-columns: 44px 1fr; align-items: start; padding: 32px; }

  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary { transition: none; }
}