/* QuietNights — Shared Styles */

:root {
  --color-bg:         #0D1B2A;
  --color-surface:    #132233;
  --color-accent:     #4CAF50;
  --color-text:       #E8F0F7;
  --color-text-muted: #8FAABF;
  --color-border:     #1E3450;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Layout ─────────────────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

/* ── Typography ─────────────────────────────────────────── */

h1 { font-size: 2rem;   line-height: 1.2; margin-bottom: 0.75rem; }
h2 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 0.5rem;  }
h3 { font-size: 1.2rem; line-height: 1.4; margin-bottom: 0.4rem;  }

h1, h2, h3 {
  color: var(--color-accent);
  font-weight: 700;
}

p  { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.25rem; }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover, a:focus {
  opacity: 0.85;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.header-brand:hover, .header-brand:focus {
  opacity: 0.85;
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

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

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.header-nav a:hover,
.header-nav a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  outline: none;
}

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

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

/* ── Language toggle ─────────────────────────────────────── */

.lang-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.lang-toggle a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}

.lang-toggle a:hover,
.lang-toggle a:focus {
  color: var(--color-accent);
  border-color: var(--color-accent);
  outline: none;
}

.lang-toggle a[aria-current="true"] {
  background-color: var(--color-accent);
  color: #000;
  border-color: var(--color-accent);
  font-weight: 600;
}

/* ── Content card ────────────────────────────────────────── */

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

/* ── Summary banner ──────────────────────────────────────── */

.banner {
  background-color: #1A3320;
  border: 1px solid var(--color-accent);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ── Section dividers ────────────────────────────────────── */

.content-section {
  margin-bottom: 2.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* ── Page header (inside main) ───────────────────────────── */

.page-header {
  margin-bottom: 2rem;
}

.page-header .last-updated {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* ── FAQ (details / summary) ─────────────────────────────── */

details {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

details + details {
  margin-top: 0;
}

summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}

details[open] > summary::after {
  content: '−';
}

details[open] > summary {
  border-bottom: 1px solid var(--color-border);
  color: var(--color-accent);
}

.details-content {
  padding: 1rem;
  background-color: var(--color-bg);
  font-size: 0.95rem;
}

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

/* ── FAQ group heading ───────────────────────────────────── */

.faq-group {
  margin-bottom: 2rem;
}

.faq-group h3 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}

/* ── Hero section ────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.hero .hero-tagline {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.hero .hero-sub {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0;
}

/* ── Contact box ─────────────────────────────────────────── */

.contact-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-box p { margin-bottom: 0.5rem; }
.contact-box p:last-child { margin-bottom: 0; }

/* ── App Store button ────────────────────────────────────── */

.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.appstore-btn:hover,
.appstore-btn:focus {
  opacity: 0.85;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  color: #000;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .card {
    padding: 1rem 1.25rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    gap: 1rem;
  }
}
