/* ==========================================================================
   RozMobile — site stylesheet
   Neutral, Apple-like look. Light and dark mode follow the visitor's system.
   Each app page sets its own accent color via --accent on <body>.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #d2d2d7;
  --accent: #0071e3;          /* RozMobile default accent (links, buttons) */
  --accent-contrast: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.78);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1080px;
  --max-text: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --surface: #1d1d1f;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --border: #424245;
    --accent: #2997ff;
    --header-bg: rgba(22, 22, 23, 0.78);
  }
}

/* App accents — swap these for each app's real brand color */
/* CarJournal: lilac from the app icon (#c390cf), darkened in light mode for readable links */
body.app-carjournal { --accent: #7e3f93; }
@media (prefers-color-scheme: dark) {
  body.app-carjournal { --accent: #c390cf; --accent-contrast: #000000; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

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

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

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

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-contrast);
  padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.wordmark {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 1.05rem; color: var(--text);
  letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 22px; font-size: 0.9rem; }
.site-nav a { color: var(--text); opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: none; }
.site-nav a[aria-current="page"] { opacity: 1; font-weight: 600; }

/* App sub-navigation (Overview / Support / Privacy / Terms) */
.app-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.app-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; gap: 16px; flex-wrap: wrap;
}
.app-nav-title { font-weight: 600; font-size: 1.15rem; color: var(--text); }
.app-nav-title:hover { text-decoration: none; }
.app-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; font-size: 0.85rem; }
.app-nav ul a { color: var(--text-muted); }
.app-nav ul a:hover { color: var(--text); text-decoration: none; }
.app-nav ul a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 56px 0; }
.eyebrow {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px;
}
.lead { font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--text-muted); line-height: 1.35; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; max-width: 680px; }

/* ---------- Hero ---------- */

.hero { padding: 104px 0 88px; text-align: center; }
.hero h1 { margin-bottom: 0.3em; }
.hero .lead { max-width: 700px; margin: 0 auto 28px; }

.app-hero { padding: 80px 0 72px; text-align: center; }
.app-hero .app-icon { margin: 0 auto 24px; width: 128px; height: 128px; }
.app-hero h1 { margin-bottom: 0.2em; }
.app-hero .tagline { font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 600; line-height: 1.2; margin: 0 auto 16px; max-width: 760px; }
.app-hero .lead { max-width: 640px; margin: 0 auto 28px; }

.app-icon { border-radius: 22.5%; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 980px;
  background: var(--accent); color: var(--accent-contrast);
  font-weight: 500; font-size: 1rem;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.pill {
  display: inline-block; padding: 6px 14px; border-radius: 980px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.platforms { margin-top: 14px; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- App cards (home page) ---------- */

.app-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 360px)); justify-content: center; margin-top: 40px; text-align: left; }
.prose .app-grid { justify-content: start; }
.app-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); }
.app-card .app-icon { width: 72px; height: 72px; }
.app-card h3 { margin: 0; }
.app-card p { margin: 0; color: var(--text-muted); }
.app-card .card-platforms { font-size: 0.85rem; }
.app-card .more { color: var(--accent); font-weight: 500; margin-top: auto; }

/* ---------- Feature grid ---------- */

.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 44px; text-align: left; }
.feature {
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.section-alt .feature { border-color: transparent; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-muted); margin: 0; }
.feature ul { color: var(--text-muted); margin: 10px 0 0; padding-left: 1.1em; }
.feature li { margin-bottom: 4px; }

.principles { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 40px; text-align: left; }
.principles h3 { font-size: 1.1rem; }
.principles p { color: var(--text-muted); margin: 0; }

/* ---------- Spec table ---------- */

.spec { width: 100%; max-width: var(--max-text); margin: 32px auto 0; border-collapse: collapse; text-align: left; }
.spec th, .spec td { padding: 14px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec th { width: 40%; font-weight: 600; }
.spec td { color: var(--text-muted); }

/* ---------- Long-form text (policies, support) ---------- */

.prose { padding: 64px 0 96px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose .meta { color: var(--text-muted); font-size: 0.95rem; }
.prose .summary {
  background: var(--bg-alt); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0;
}
.prose .summary p:last-child, .prose .summary ul:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }

/* FAQ disclosure items */
.faq { margin-top: 24px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 1.5rem; font-weight: 300; color: var(--text-muted);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 16px; color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

.contact-card {
  margin-top: 40px; padding: 28px; border-radius: var(--radius);
  background: var(--bg-alt); text-align: center;
}
.contact-card h2 { margin-top: 0; font-size: 1.4rem; }
.contact-card p { color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 0.8rem; padding: 32px 0 40px; border-top: 1px solid var(--border);
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .app-hero { padding: 56px 0 56px; }
  .app-hero .app-icon { width: 104px; height: 104px; }
  .site-nav { gap: 16px; }
  .app-nav ul { gap: 14px; }
  .spec th { width: 45%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card { transition: none; }
}
