/* Aphys LLC site styles. Palette C "Linen and Ink", from BRAND.md. */
/* Layout: one quiet column. Header, content sections, footer. Light and dark follow the viewer's system setting. */

:root {
  color-scheme: light;
  --surface: #F4F0E9;
  --surface-raised: #FFFFFF;
  --text: #1C2230;
  --text-muted: #6B665F;
  --brand: #2C3E5C;
  --on-brand: #FFFFFF;
  --border: #D9D2C5;
  --border-strong: #8A8580;
  --font-serif: "IBM Plex Serif", Georgia, Cambria, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface: #1C2230;
    --surface-raised: #252C3D;
    --text: #F4F0E9;
    --text-muted: #A9A39C;
    --brand: #8FA3C4;
    --on-brand: #1C2230;
    --border: #3A4254;
    --border-strong: #8A8580;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}
.mark {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding-block: 64px 48px; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.25;
  margin: 0 0 16px;
  max-width: 20ch;
  text-wrap: balance;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 32px;
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font: 500 14px var(--font-sans);
  text-decoration: none;
  color: var(--text);
  background: transparent;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

/* Sections */
section.block {
  border-top: 1px solid var(--border);
  padding-block: 48px;
}
section.block h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
  text-wrap: balance;
}
section.block .lead {
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 60ch;
}
section.block p { max-width: 60ch; }

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.points h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
}
.points p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Contact address */
.address {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 15px;
  color: var(--text);
  user-select: all;
}

/* Legal pages */
.legal { padding-block: 48px; max-width: 70ch; }
.legal h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 8px;
  text-wrap: balance;
}
.legal .effective {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.legal h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  margin: 32px 0 8px;
}
.legal p,
.legal li { font-size: 15px; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 4px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 24px 32px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.site-footer a { color: var(--text-muted); }
