/* Matches Clavia iOS: AccentColor.colorset + grouped UI (Onboarding / Settings). */

:root {
  --accent: #10a2ff;
  --accent-hover: #0d8fe6;
  --bg: #f2f2f7;
  --elevated: #ffffff;
  --text: #000000;
  --muted: rgba(60, 60, 67, 0.6);
  --border: rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 6px 12px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
  --max: 42rem;
  --header-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #10a2ff;
    --accent-hover: #4db8ff;
    --bg: #1c1c1e;
    --elevated: #2c2c2e;
    --text: #ffffff;
    --muted: rgba(235, 235, 245, 0.6);
    --border: rgba(255, 255, 255, 0.12);
    --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.47;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* —— Header (toolbar-style, like Settings) —— */
.site-header {
  flex-shrink: 0;
  background: var(--elevated);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-header__inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
  color: var(--text);
  opacity: 0.85;
}

.site-brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  .site-brand__mark {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav a[aria-current="page"] {
  color: var(--accent);
}

/* —— Main —— */
main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

/* —— Home hero (Onboarding-style) —— */
.hero {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.hero__mark {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-soft);
}

.hero__title {
  font-size: clamp(1.375rem, 3.5vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.hero p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 22rem;
  font-size: 1.0625rem;
}

/* —— Cards (secondarySystemBackground panels) —— */
.card {
  background: var(--elevated);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  padding: 1.25rem 1.25rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card > h1 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.35rem 0 0.45rem;
  letter-spacing: -0.01em;
}

.card h2:first-of-type {
  margin-top: 0;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.15rem 0 0.35rem;
}

.card p,
.card li {
  color: var(--text);
  margin: 0.5rem 0;
}

.card li {
  color: var(--text);
}

.card ul,
.card ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.card__lede {
  color: var(--muted);
  margin-top: 0.25rem;
}

/* —— Link list (app-style) —— */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.link-list li {
  margin: 0;
  border-top: 0.5px solid var(--border);
}

.link-list li:first-child {
  border-top: none;
}

.link-list a {
  display: block;
  padding: 0.65rem 0;
  font-weight: 500;
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* —— Footer —— */
.site-footer {
  flex-shrink: 0;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.site-footer a {
  color: var(--accent);
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: none;
  opacity: 0.85;
}
