/* Tappia — legal & support site
   Static, self-contained: no remote fonts, no remote images, no scripts. */

:root {
  --canvas:        #faf7f2;  /* warm off-white */
  --surface:       #fffdfa;
  --surface-alt:   #f3eee7;
  --border:        #e4dcd1;
  --text:          #2a2632;  /* dark, warm-leaning */
  --text-secondary:#544c60;
  --text-tertiary: #6d6478;
  --accent:        #5d4e7c;  /* muted purple, 6.9:1 on canvas */
  --accent-soft:   #ede8f3;
  --accent-border: #cdc2dd;
  --focus:         #4a3d66;
  --maxw:          46rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 0;
}

.brand {
  display: block;
  text-decoration: none;
  color: inherit;
}

.brand h1,
.brand .app-name {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.brand .developer {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

/* ---------- Navigation ---------- */

.site-nav {
  margin-top: 1.5rem;
}

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

.site-nav a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9688rem;
  border-bottom: 2px solid transparent;
}

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

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

/* ---------- Main ---------- */

main { padding: 2.5rem 0 3rem; }

h1.page-title {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.effective {
  margin: 0 0 2rem;
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

.lede {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

h2 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.5rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--focus); }

strong { font-weight: 600; }

/* ---------- Cards / callouts ---------- */

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

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  margin: 1.5rem 0;
}

.callout p:last-child,
.card p:last-child,
.callout ul:last-child,
.card ul:last-child { margin-bottom: 0; }

.callout h2, .card h2 { margin-top: 0; }

/* Home page link grid */

.link-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.link-grid a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
}

.link-grid a:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.link-grid .label {
  display: block;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.link-grid .desc {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 2rem 0 2.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.site-footer p { margin: 0 0 0.5rem; }
.site-footer p:last-child { margin-bottom: 0; }

.site-footer .footer-app {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  color: var(--text);
}

.footer-nav {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.footer-nav a { font-size: 0.9375rem; }

/* ---------- Focus visibility ---------- */

a:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

@media (min-width: 40rem) {
  body { font-size: 1.09375rem; }
  h1.page-title { font-size: 2.35rem; }
  .site-header { padding-top: 2.5rem; }
  main { padding: 3rem 0 3.5rem; }
  .link-grid { grid-template-columns: 1fr 1fr; }
}

/* Long words / emails must never force horizontal scrolling */
p, li, h1, h2, h3 { overflow-wrap: break-word; }
