/* Dog Ear Ensemble site styles. Purples match the app icon
   (assets/app-icon-book.svg in the app repo). System fonts only. */

:root {
  --purple: #673ab7;
  --purple-light: #b39ddb;
  --purple-deep: #4527a0;

  --bg: #fbf9ff;
  --surface: #ffffff;
  --surface-alt: #f1ecfa;
  --border: #e0d7f2;
  --text: #1d1a24;
  --text-muted: #5f5a6b;
  --accent: var(--purple);
  --accent-hover: var(--purple-deep);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121b;
    --surface: #1f1a29;
    --surface-alt: #2a2338;
    --border: #3a3050;
    --text: #ece8f4;
    --text-muted: #aaa3b8;
    --accent: var(--purple-light);
    --accent-hover: #d1c4e9;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
}

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

.wordmark img {
  border-radius: 6px;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--accent);
}

/* Hero */

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

.hero-icon {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: 0 8px 24px rgb(69 39 160 / 0.25);
}

.hero h1 {
  margin: 1.25rem 0 0.25rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.15;
}

.tagline {
  margin: 0;
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 600;
}

.lead {
  max-width: 38rem;
  margin: 1rem auto;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.badge {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Sections */

.section-heading {
  margin: 3rem 0 1rem;
  text-align: center;
  font-size: 1.6rem;
  scroll-margin-top: 1rem;
}

.section-body {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.card p {
  margin: 0.4rem 0;
}

.notice {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-alt);
}

.notice p {
  margin: 0.5rem 0;
}

/* Long-form pages */

.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding-top: 1.5rem;
}

.prose h2 {
  margin-top: 2rem;
}

.prose li {
  margin: 0.4rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
}

@media (max-width: 36rem) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
  }

  td {
    border: none;
    padding: 0.15rem 0;
  }

  td:first-child {
    font-weight: 700;
  }
}

/* Footer */

.site-footer {
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.4rem 0;
}

.site-footer .sep {
  margin: 0 0.4rem;
  color: var(--border);
}
