/* Pawsitions website. Flat and quiet, like the app: solid paper, ink, hairlines, one accent.
   No gradients, shadows, glows or glass. Colors are the app's own tokens (Loaf/DesignSystem/LoafColor.swift). */

:root {
  color-scheme: light dark;

  --canvas: #F6F2EA;
  --surface: #FCFAF5;
  --ink: #1C1915;
  --ink-soft: #5E574C;
  --hairline: rgba(28, 25, 21, 0.10);
  --hairline-strong: rgba(28, 25, 21, 0.22);
  --accent: #C8402A;       /* fills: buttons */
  --accent-ink: #B53823;   /* accent as text on paper, 5.3:1 */
  --on-accent: #FFFFFF;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 680px;
  --gutter: 20px;
  --radius-card: 16px;
  --radius-chip: 10px;
  --radius-button: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #15130F;
    --surface: #1D1A15;
    --ink: #F3EEE4;
    --ink-soft: #B5ADA0;
    --hairline: rgba(243, 238, 228, 0.12);
    --hairline-strong: rgba(243, 238, 228, 0.26);
    --accent: #F0735B;
    --accent-ink: #F58B76;
    --on-accent: #15130F;
  }
}

/* Mirrors the app's Increase Contrast tokens. */
@media (prefers-contrast: more) {
  :root {
    --ink-soft: #4A443B;
    --hairline: rgba(28, 25, 21, 0.50);
    --hairline-strong: rgba(28, 25, 21, 0.65);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --ink-soft: #CFC8BB;
    --hairline: rgba(243, 238, 228, 0.45);
    --hairline-strong: rgba(243, 238, 228, 0.60);
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body {
    font-size: 1.125rem; /* 18px */
  }
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  font-weight: 700;
}

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* A path through Settings, e.g. "Settings › Reset progress". */
.path {
  font-weight: 600;
}

/* Skip link: hidden until focused. */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-chip);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 360px) {
  :root {
    --gutter: 16px;
  }
}

main {
  flex: 1 0 auto;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Header */

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
}

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

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  display: inline-block;
  padding: 0.35rem 0;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
}

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

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  color: var(--ink-soft);
}

/* Landing */

.hero {
  padding-top: 1rem;
}

.app-icon {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 29px; /* about the iOS icon curve at this size */
  border: 1px solid var(--hairline);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: 2.75rem;
}

.subtitle {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 0.35rem;
  margin-bottom: 1.75rem;
}

.lede {
  max-width: 36em;
}

.availability {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-chip);
  font-weight: 600;
  font-size: 0.9375rem;
}

.button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.8rem 1.25rem;
  min-height: 44px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-button);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  filter: brightness(0.94);
}

.button:active {
  transform: scale(0.97);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 3rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.cards li + li {
  margin-top: 0;
}

.card {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  color: var(--ink);
  text-decoration: none;
}

.card:hover {
  border-color: var(--hairline-strong);
  text-decoration: none;
}

.card-title {
  display: block;
  font-weight: 700;
  color: var(--accent-ink);
  margin-bottom: 0.2rem;
}

.card-body {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Document pages (privacy, support) */

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

.page-head p {
  color: var(--ink-soft);
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.35rem 0.4rem;
  margin-bottom: 2.5rem;
}

.summary h2,
.toc h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.summary-lead {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.4;
}

.toc {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 0 0.35rem;
  margin-bottom: 1rem;
}

.toc ol {
  columns: 2 15em;
  column-gap: 2rem;
  font-size: 0.9375rem;
}

.toc li {
  break-inside: avoid;
}

.toc li + li {
  margin-top: 0.25rem;
}

.rule-list li::marker {
  font-weight: 700;
}

dl.facts {
  margin: 0 0 1rem;
}

dl.facts dt {
  font-weight: 700;
  margin-top: 1rem;
}

dl.facts dd {
  margin: 0.15rem 0 0;
}

/* Section anchors: keep headings clear of the top edge when jumped to. */
[id] {
  scroll-margin-top: 1.5rem;
}

/* 404 */

.not-found {
  padding-top: 2rem;
}

.not-found .code {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
  }
}

@media print {
  .site-header nav,
  .skip-link,
  .toc {
    display: none;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }
}
