/* campertron.com: one static page and its 404 page. No web fonts, no scripts, no images from other sites.
   Light and dark follow the visitor's system setting (prefers-color-scheme). Every color pair is checked for contrast
   (docs/ai-context/maintainer-procedures.md §The landing page). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f2f5f1;
  --text: #1a1f1b;
  --muted: #475049;
  --link: #165a34;
  --button-bg: #165a34;
  --button-text: #ffffff;
  --border: #c3cdc5;
  --focus: #1757c2;
  --code-bg: #e9eee9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --surface: #1a201c;
    --text: #e8ede9;
    --muted: #b6c0b8;
    --link: #8bd6a6;
    --button-bg: #8bd6a6;
    --button-text: #0b1a11;
    --border: #3b4740;
    --focus: #8fb8ff;
    --code-bg: #0a0d0b;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* A word wider than the screen (very large text on a phone) wraps instead of making the page scroll sideways. */
  overflow-wrap: anywhere;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.125em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* The skip link is the first thing a keyboard reaches; it is shown when it has the focus. */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -20rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--link);
  font-weight: 600;
  border: 2px solid var(--focus);
}

.skip-link:focus {
  top: 0.75rem;
}

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

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.brand img {
  border-radius: 0.5rem;
}

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

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
}

section {
  padding: 2.5rem 0;
}

.band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.25rem);
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

h3 {
  margin: 1.75rem 0 0.4rem;
  font-size: 1.2rem;
}

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

p {
  margin: 0 0 1rem;
}

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 48rem) {
  .hero-inner {
    grid-template-columns: 1fr minmax(14rem, 20rem);
  }
}

.lead {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
}

.hero-image {
  justify-self: center;
  width: 100%;
  max-width: 20rem;
  border-radius: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 2px solid var(--button-bg);
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

.button-primary {
  background: var(--button-bg);
  color: var(--button-text);
}

.button-secondary {
  background: transparent;
  color: var(--link);
}

.note {
  color: var(--muted);
}

.steps {
  margin: 0;
  padding-left: 1.5rem;
}

.steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

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

.card {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.card p {
  margin: 0;
}

.shots {
  display: grid;
  gap: 2.5rem;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
}

.shot-wide img {
  width: 100%;
  max-width: 50rem;
}

.shot-phone img {
  width: 100%;
  max-width: 20rem;
}

@media (min-width: 64rem) {
  .shot-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 2rem;
    align-items: start;
  }
}

pre {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.link-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.link-list li {
  margin-bottom: 0.5rem;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

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