/* Shared styles for Cyber Safe Families website */

/* Light mode (default) */
:root {
  --bg: #fdfaf7;
  --bg-alt: #fcf7f3;
  --card: #ffffff;
  --border: #e4e0e4;
  --accent: #f2a36b;          /* coral accent (softened) */
  --accent-soft: rgba(242, 163, 107, 0.12);
  --accent-strong: #e07a4f;
  --text: #1f2933;
  --text-muted: #6b7280;
  --shadow-soft: 0 18px 40px rgba(148, 163, 184, 0.16);
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-pill: 999px;
  --max-width: 1120px;
  --body-gradient: radial-gradient(circle at top, #e0dde4 0, #fdfaf7 32%, #7cc3cf 100%);
}

/* Dark mode */
body.dark-mode {
  --bg: #050816;
  --bg-alt: #0c1020;
  --card: #111827;
  --border: #1f2937;
  --accent: #4ade80;          /* green accent */
  --accent-soft: rgba(74, 222, 128, 0.1);
  --accent-strong: #22c55e;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.55);
  --body-gradient: radial-gradient(circle at top, #111827 0, #020617 42%, #020617 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--body-gradient);
  background-attachment: fixed;
  background-size: 100% 100vh;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom,
    rgba(254, 252, 251, 0.96),
    rgba(254, 252, 251, 0.92),
    rgba(254, 252, 251, 0.75)
  );
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

body.dark-mode header {
  background: linear-gradient(to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.92),
    rgba(2, 6, 23, 0.75)
  );
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, #ffe0c2, #89d7e5 85%);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111827;
}

body.dark-mode .brand-logo {
  background: radial-gradient(circle at 30% 0%, rgba(34, 197, 94, 0.4), #020617 65%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
  color: #f9fafb;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

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

.btn-primary,
.btn-outline {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 12px 22px rgba(244, 162, 97, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(244, 162, 97, 0.4);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--card);
}

.btn-outline:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--card);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 4rem;
}

section { padding: 1.2rem 0; }

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 1.25rem 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
}

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

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  main { padding-top: 0.5rem; }
  section { padding: 1.2rem 0; }
}

