/* DriverOS public site — black + gold dark theme */
:root {
  --bg: #080808;
  --surface: #121210;
  --gold: #ddb652;
  --gold-highlight: #f2d27a;
  --gold-dark: #8a6a25;
  --text-primary: #f5f3ed;
  --text-secondary: #99978f;
  --border: rgba(138, 106, 37, 0.45);
  --max-width: 720px;
  --policy-max-width: min(920px, 100%);
  --page-padding: clamp(20px, 4vw, 32px);
  --radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
}

a {
  color: var(--gold-highlight);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  padding: calc(var(--page-padding) + 8px) var(--page-padding) 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: block;
  margin: 0 auto 12px;
  height: clamp(36px, 6vw, 48px);
  width: auto;
  max-width: min(280px, 80vw);
}

.site-tagline {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 2.5vw, 15px);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 40px) var(--page-padding) 48px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: clamp(15px, 2.8vw, 17px);
}

.card-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
}

.card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--gold-highlight);
  text-decoration: none;
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-highlight);
  text-decoration: none;
}

.btn-muted {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.72;
}

.download-page .site-main {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card {
  width: 100%;
  text-align: center;
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.download-lead {
  margin: 0 0 16px;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.6;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.download-store-btn {
  width: 100%;
}

@media (min-width: 520px) {
  .download-actions {
    flex-direction: row;
    justify-content: center;
  }

  .download-store-btn {
    width: auto;
    min-width: 180px;
  }
}

/* Privacy policy */
.policy-meta {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.policy-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.policy-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.policy-section h2 {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gold);
}

.policy-section h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.policy-section p + p {
  margin-top: 10px;
}

.policy-section p,
.policy-section li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.policy-todo {
  color: var(--gold-highlight);
  font-size: 0.9375rem;
}

.site-main.policy-document {
  max-width: var(--policy-max-width);
}

.policy-section ul {
  margin: 8px 0 0;
  padding-left: 1.25rem;
}

.policy-section li + li {
  margin-top: 6px;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--page-padding) 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid .card:first-child {
    grid-column: 1 / -1;
  }
}
