/* ==========================================================================
   BareBones Dev — shared styles
   ========================================================================== */

:root {
  --bg: #f7f8fb;
  --bg-alt: #ffffff;
  --text: #171923;
  --text-muted: #5a6072;
  --border: #e6e8ef;
  --card-bg: #ffffff;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-contrast: #ffffff;
  --shadow: 0 10px 30px rgba(23, 25, 35, 0.08);
  --shadow-hover: 0 16px 40px rgba(23, 25, 35, 0.14);
  --radius: 16px;
  --max-width: 1100px;
  --notice-bg: #fff7ed;
  --notice-border: #f59e0b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-alt: #151823;
    --text: #f2f3f7;
    --text-muted: #a3a8bd;
    --border: #262b3b;
    --card-bg: #171b28;
    --accent: #818cf8;
    --accent-2: #22d3ee;
    --accent-contrast: #0f1117;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
    --notice-bg: #241d12;
    --notice-border: #f59e0b;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:not(.btn):hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

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

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

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

section {
  padding: 64px 0;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-heading p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- App cards ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.app-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.app-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.app-card .btn {
  align-self: flex-start;
  margin-top: 6px;
}

/* ---------- Feature grid (app detail pages) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 52px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Notice / disclaimer box ---------- */

.notice {
  background: var(--notice-bg);
  border-left: 4px solid var(--notice-border);
  border-radius: 10px;
  padding: 22px 26px;
}

.notice h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.notice p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* ---------- App detail hero ---------- */

.app-hero {
  padding: 64px 0 48px;
}

.app-hero-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.app-hero-top .app-icon {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}

.app-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.app-hero p.lead {
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.back-link:hover {
  color: var(--accent);
}

/* ---------- Prose (privacy policy etc.) ---------- */

.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.3rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -8px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Responsive nav ---------- */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 16px;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav .btn {
    width: 100%;
    text-align: center;
  }
}
