/* Dibby — shared styles */
:root {
  --brand: #FF6B6B;
  --brand-dark: #E85555;
  --brand-soft: #FFE5E5;
  --bg: #FFFFFF;
  --bg-alt: #FAFAFB;
  --fg: #1A1A1F;
  --fg-muted: #5A5A66;
  --border: #E8E8EE;
  --max: 1100px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 6px 24px rgba(20, 20, 30, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F12;
    --bg-alt: #16161B;
    --fg: #F5F5F7;
    --fg-muted: #A0A0AD;
    --border: #2A2A33;
    --brand-soft: #3A1F1F;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 28px; height: 28px; }
.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav a {
  color: var(--fg-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  background: radial-gradient(circle at top, var(--brand-soft) 0%, transparent 60%);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero h1 .accent { color: var(--brand); }
.hero p.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--fg-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--fg);
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; opacity: 0.92; transform: translateY(-1px); }
.btn--brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn .store-icon { width: 22px; height: 22px; }

/* Sections */
section { padding: 72px 0; }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto 56px;
  font-size: 17px;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius);
}
.feature .icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.feature h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 600;
}
.feature p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
}

/* Privacy callout */
.privacy-band {
  background: var(--brand-soft);
  text-align: center;
  border-radius: var(--radius);
  padding: 56px 32px;
  margin: 0 24px;
}
@media (prefers-color-scheme: dark) {
  .privacy-band { background: var(--bg-alt); border: 1px solid var(--border); }
}
.privacy-band h2 { margin-top: 0; }
.privacy-band p {
  max-width: 640px;
  margin: 0 auto 16px;
  color: var(--fg);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 32px;
  color: var(--fg-muted);
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.site-footer .links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer .links a { color: var(--fg-muted); }
.site-footer .links a:hover { color: var(--fg); text-decoration: none; }
.site-footer .copy { color: var(--fg-muted); }

/* Article (legal/FAQ pages) */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.article h1 {
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 800;
}
.article .effective {
  color: var(--fg-muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.article h2 {
  font-size: 22px;
  margin: 36px 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.article h3 {
  font-size: 17px;
  margin: 24px 0 8px;
  font-weight: 600;
}
.article p, .article li { font-size: 16px; color: var(--fg); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.article blockquote {
  border-left: 3px solid var(--brand);
  margin: 16px 0;
  padding: 8px 16px;
  color: var(--fg-muted);
  background: var(--bg-alt);
  border-radius: 0 6px 6px 0;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
.article th, .article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.article th { font-weight: 600; background: var(--bg-alt); }
.article hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--brand); text-decoration: none; }

/* Redirect page */
.redirect {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.redirect .card {
  max-width: 420px;
}
.redirect .logo-lg {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}
.spinner {
  width: 36px;
  height: 36px;
  margin: 24px auto;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Print + accessibility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
