/* Shared stylesheet for New Tab Dashboard public pages
   (home, terms, privacy). */

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

:root {
  --c-bg: #f7f9fc;
  --c-surface: #ffffff;
  --c-text: #1f2937;
  --c-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-primary: #4f46e5;
  --c-primary-hover: #4338ca;
  --c-accent: #ec4899;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --radius: 10px;
  --max-w: 1100px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 15px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.05s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-primary-hover);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(1px);
}

/* ---------- Hero (home page) ---------- */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
  background: linear-gradient(180deg, #eef2ff 0%, var(--c-bg) 100%);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero p.lede {
  font-size: 19px;
  color: var(--c-muted);
  margin: 0 0 32px;
}

/* ---------- Feature grid ---------- */
.section {
  padding: 64px 24px;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  font-size: 30px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section .section-sub {
  text-align: center;
  color: var(--c-muted);
  margin: 0 0 40px;
}

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

.feature {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  color: var(--c-text);
  display: block;
}

.feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--c-primary);
}

a.feature h3 {
  color: var(--c-text);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.feature p {
  margin: 0;
  color: var(--c-muted);
  font-size: 14.5px;
}

/* ---------- Legal pages (terms / privacy) ---------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  background: var(--c-surface);
}

.legal h1 {
  font-size: 36px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.legal .updated {
  color: var(--c-muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 22px;
  margin: 36px 0 12px;
  letter-spacing: -0.005em;
}

.legal h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.legal p,
.legal li {
  color: #374151;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 32px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--c-muted);
  font-size: 14px;
}

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

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

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

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero {
    padding: 56px 20px 48px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero p.lede {
    font-size: 17px;
  }
  .section {
    padding: 48px 20px;
  }
  .section h2 {
    font-size: 24px;
  }
  .legal h1 {
    font-size: 28px;
  }
  .nav {
    padding: 14px 20px;
  }
  .nav-links {
    gap: 14px;
  }
}
