/* Catalpa Tree RV Park. One stylesheet, system fonts, no external resources.
   Contrast (computed, WCAG ratios):
   light  text #1b2a23 on #fbf9f3 14.2, muted #4a5a52 6.9, green #1c5a39 7.8, blue #175a8c 6.9, border #6f8077 4.0
   dark   text #e9f0eb on #0e1915 15.5, muted #b4c4ba 9.9, green #86d3a5 10.2, blue #8fc6ee 9.8, border #7c9186 5.4 */
:root {
  --bg: #fbf9f3;
  --card: #ffffff;
  --tint: #e8f0ea;
  --text: #1b2a23;
  --muted: #4a5a52;
  --green: #1c5a39;
  --blue: #175a8c;
  --link: #175a8c;
  --border: #6f8077;
  --soft-border: #d6ddd7;
  --focus: #0b3d91;
  --btn-bg: #1c5a39;
  --btn-text: #ffffff;
  --btn2-text: #143f29;
  --hero-a: #1c5a39;
  --hero-b: #175a8c;
  --hero-text: #ffffff;
  --shadow: 0 1px 2px rgba(20, 40, 30, .08), 0 4px 14px rgba(20, 40, 30, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1915;
    --card: #16241e;
    --tint: #1b2d25;
    --text: #e9f0eb;
    --muted: #b4c4ba;
    --green: #86d3a5;
    --blue: #8fc6ee;
    --link: #8fc6ee;
    --border: #7c9186;
    --soft-border: #2c4038;
    --focus: #ffd866;
    --btn-bg: #86d3a5;
    --btn-text: #0a1a11;
    --btn2-text: #e9f0eb;
    --hero-a: #0f3a28;
    --hero-b: #0f3c5c;
    --hero-text: #ffffff;
    --shadow: none;
  }
}

*, *::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, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 40rem) { .wrap { padding-inline: 2rem; } }

h1, h2, h3 { line-height: 1.2; color: var(--green); margin: 0 0 .75rem; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: 1.6rem; margin-top: 2.5rem; }
h3 { font-size: 1.25rem; margin-top: 1.75rem; }
p, ul, address, table { margin: 0 0 1.1rem; }
address { font-style: normal; }
.lead { font-size: 1.3rem; color: var(--muted); }
.note { color: var(--muted); font-size: 1rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .08em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: .5rem; top: -4rem; z-index: 10;
  background: var(--btn-bg); color: var(--btn-text);
  padding: .75rem 1rem; border-radius: .5rem; font-weight: 700;
}
.skip:focus { top: .5rem; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--soft-border); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; color: var(--green); font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.brand:hover { text-decoration: underline; }
.logo { flex: none; }
nav ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .25rem .9rem; border-radius: 999px; color: var(--text); font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: background-color .15s; }
nav a:hover { background: var(--tint); text-decoration: underline; }
nav a[aria-current="page"] { background: var(--tint); border-color: var(--green); text-decoration: underline; text-decoration-thickness: .15em; text-underline-offset: .25em; }

/* hero */
.hero { position: relative; overflow: hidden; color: var(--hero-text); background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.hero::before { width: 28rem; height: 28rem; right: -8rem; top: -12rem; }
.hero::after { width: 18rem; height: 18rem; left: -6rem; bottom: -9rem; }
.hero-inner { position: relative; padding-block: 3rem 5rem; }
.hero h1 { color: var(--hero-text); }
.tagline { font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 600; margin: 0 0 .5rem; max-width: 36rem; }
.hero-sub { max-width: 36rem; margin-bottom: 1.5rem; }
.hero :focus-visible { outline-color: #ffd866; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 3rem; color: var(--bg); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .6rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: background-color .15s, color .15s; }
.btn:hover { text-decoration: underline; text-decoration-thickness: .12em; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-secondary { background: transparent; color: var(--btn2-text); border-color: var(--btn2-text); }
.btn-light { background: #ffffff; color: #143f29; }
.btn-outline { background: transparent; color: #ffffff; border-color: #ffffff; }

/* cards */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--soft-border); border-radius: 1rem; padding: 1.25rem; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; font-size: 1.25rem; }
.card p:last-child, .card address:last-child { margin-bottom: 0; }
.facts .card { display: flex; flex-direction: column; gap: .25rem; }
.big { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--green); }
.big-link { font-size: 1.35rem; font-weight: 700; }
.links .card { padding: 0; }
.links a { display: block; padding: 1rem 1.25rem; min-height: 3rem; font-weight: 600; }
.two { margin-bottom: 1.5rem; }

.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 3fr 2fr; } }

.ticks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .5rem 1.5rem; }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before { content: ""; position: absolute; left: .2rem; top: .55em; width: .6rem; height: .35rem; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* photo placeholders */
.photo-slot { margin: 0; }
.photo-box { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border: 2px dashed var(--border); border-radius: 1rem; background: var(--tint); color: var(--muted); font-weight: 600; }
.photo-slot figcaption, .map figcaption { color: var(--muted); font-size: 1rem; margin-top: .5rem; }

.prose { max-width: 52rem; padding-block: 2.5rem; }
.prose .photo-slot { margin-block: 1.5rem; max-width: 30rem; }
.local { padding-bottom: 3rem; }
.facts { padding-top: 1.5rem; }

/* map */
.map { margin: 1.5rem 0; padding: .75rem; background: var(--card); border: 1px solid var(--soft-border); border-radius: 1rem; }
.map img { display: block; width: 100%; height: auto; border-radius: .5rem; background: #fbfaf5; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
caption { text-align: left; font-weight: 700; padding-bottom: .5rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .75rem; border: 1px solid var(--border); }
thead th { background: var(--tint); }
td:first-of-type { overflow-wrap: anywhere; }

/* footer */
.site-footer { background: var(--tint); border-top: 1px solid var(--soft-border); padding-block: 2rem 1rem; margin-top: 2rem; }
.foot { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .foot { grid-template-columns: 1fr 1fr; } }
.foot-name { font-weight: 800; margin-bottom: .25rem; }
.site-footer a { display: inline-block; padding-block: .2rem; }
.copy { color: var(--muted); font-size: 1rem; margin: 1rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* artwork: the day and dusk pictures swap on html[data-sky], set by sky.js from the sun at Pendleton */
html:not([data-sky="dusk"]) img.sky-dusk { display: none; }
html[data-sky="dusk"] img.sky-day { display: none; }
.scene, .plate { margin: 0 0 2rem; }
.scene img, .plate img { display: block; width: 100%; height: auto; border-radius: 1rem; }
.scene { margin-top: 1.5rem; }
.scene figcaption, .plate figcaption { margin-top: .6rem; font-size: .95rem; color: var(--muted, inherit); }
.band { margin-top: 2rem; line-height: 0; overflow: hidden; }
.band img { display: block; width: 100%; height: auto; min-height: 3.5rem; object-fit: cover; }

/* home page scene: sky, then sun and moon (sky.js), then ridges, river and tree. Day picture is the default. */
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; background: #6fb6ea; }
.stage .layer, .stage .orbs { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .layer { background-repeat: no-repeat; background-size: cover; background-position: 50% 30%; }
.stage .back { background-image: url(assets/art/scene-sky-day.svg); }
html[data-phase="twilight"] .stage .back { background-image: url(assets/art/scene-sky-twilight.svg); }
html[data-phase="night"] .stage .back { background-image: url(assets/art/scene-sky-night.svg); }
html[data-phase="twilight"] .stage { background: #d28b6f; }
html[data-phase="night"] .stage { background: #0f1b3a; }

/* contact cards: the email address stays in one piece, and the footer directions link is quiet */
.card a[href^="mailto:"] { font-size: 1rem; overflow-wrap: break-word; }
.foot-dir { margin-top: .5rem; font-size: .95rem; }

.stage .front { background-image: url(assets/art/scene-front-summer-day.svg); }
html[data-season="spring"][data-phase="day"] .stage .front { background-image: url(assets/art/scene-front-spring-day.svg); }
html[data-season="spring"][data-phase="twilight"] .stage .front { background-image: url(assets/art/scene-front-spring-twilight.svg); }
html[data-season="spring"][data-phase="night"] .stage .front { background-image: url(assets/art/scene-front-spring-night.svg); }
html[data-season="summer"][data-phase="day"] .stage .front { background-image: url(assets/art/scene-front-summer-day.svg); }
html[data-season="summer"][data-phase="twilight"] .stage .front { background-image: url(assets/art/scene-front-summer-twilight.svg); }
html[data-season="summer"][data-phase="night"] .stage .front { background-image: url(assets/art/scene-front-summer-night.svg); }
html[data-season="autumn"][data-phase="day"] .stage .front { background-image: url(assets/art/scene-front-autumn-day.svg); }
html[data-season="autumn"][data-phase="twilight"] .stage .front { background-image: url(assets/art/scene-front-autumn-twilight.svg); }
html[data-season="autumn"][data-phase="night"] .stage .front { background-image: url(assets/art/scene-front-autumn-night.svg); }
html[data-season="winter"][data-phase="day"] .stage .front { background-image: url(assets/art/scene-front-winter-day.svg); }
html[data-season="winter"][data-phase="twilight"] .stage .front { background-image: url(assets/art/scene-front-winter-twilight.svg); }
html[data-season="winter"][data-phase="night"] .stage .front { background-image: url(assets/art/scene-front-winter-night.svg); }
