/* Kidd Coding LLC — site styles. No build step, no external requests. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-band: #f4f5f7;
  --surface: #ffffff;
  --text: #16181d;
  --text-muted: #555b66;
  --border: #e2e5ea;
  --accent: #0a62d0;
  --accent-text: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.86);
  --logo-filter: invert(1);
  --radius: 1rem;
  --max: 64rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-band: #171a20;
    --surface: #1b1f26;
    --text: #eceef2;
    --text-muted: #a3a9b4;
    --border: #2b3039;
    --accent: #5aa2ff;
    --accent-text: #0f1115;
    --header-bg: rgba(15, 17, 21, 0.86);
    --logo-filter: none;
  }
}

/* Size type from the reader's settings. On Apple devices Safari maps
   -apple-system-body to the Text Size slider (Dynamic Type), so every
   rem on the page follows it. */
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 0.25rem; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); margin: 1.6em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
/* Limit line length for reading without moving the column off the header's left edge. */
.prose > * { max-width: 44rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--accent); color: var(--accent-text);
  padding: 0.5rem 1rem; border-radius: 0.5rem; z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-block: 0.75rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem;
}
.brand img { width: 2.25rem; height: 2.25rem; filter: var(--logo-filter); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-nav a { color: var(--text-muted); text-decoration: none; padding-block: 0.25rem; display: inline-block; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* Sections */
.page { padding-block: clamp(2rem, 6vw, 4rem); }
.band { background: var(--bg-band); padding-block: clamp(2.5rem, 8vw, 5rem); }
.hero h1 { margin-bottom: 0.25em; }
.hero .lede { font-size: 1.25rem; color: var(--text-muted); margin: 0 0 1em; }
.hero p { max-width: 40rem; }

.button {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  text-decoration: none; font-weight: 600; padding: 0.7em 1.3em; border-radius: 999px;
}
.button:hover { filter: brightness(1.08); }

/* Applications */
.app-grid {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.app-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.app-card header { display: flex; align-items: center; gap: 1rem; }
.app-card img {
  width: 4.5rem; height: 4.5rem; flex-shrink: 0;
  border-radius: 22.5%; border: 1px solid var(--border);
}
.app-card h2 { margin: 0; font-size: 1.3rem; }
.app-card h2 a { color: inherit; text-decoration: none; }
.app-card h2 a:hover { text-decoration: underline; }
.app-card p { margin: 0; color: var(--text-muted); }
.app-card .store-link { margin-top: auto; padding-top: 0.5rem; font-weight: 600; }

/* Contact list */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.contact-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.contact-list p { margin: 0; }

/* Legal pages */
.legal .meta { color: var(--text-muted); }
.legal h2 { font-size: 1.25rem; scroll-margin-top: 6rem; }
.legal ol { padding-left: 1.5rem; }
.legal li { margin-bottom: 0.4em; }
.credit { font-size: 0.875rem; color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--text-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.site-footer p { margin: 0; }
