/* KidsMail — one-page preview styles (plain CSS, no build step) */
:root {
  /* Fall palette pulled from the Wellsville Mountains art */
  --paper: #fbf4e6;        /* warm card-stock cream */
  --paper-deep: #f3e5c8;
  --card: #ffffff;
  --ink: #241c14;          /* near-black brown, high contrast on cream */
  --ink-muted: #4a3d30;
  --rust: #9a3412;         /* button / accents (7.3:1 with white) */
  --rust-dark: #7c2a0e;
  --gold: #d99a2b;
  --gold-soft: #f2c76b;
  --mountain: #2f4a6b;     /* slate mountain blue */
  --mountain-soft: #dfe7f0;
  --border: #e2cfa8;
  --focus: #1d4ed8;
  --radius: 14px;
  --max: 72rem;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.25rem;      /* 20px body */
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, #fffaf0 0%, transparent 60%),
    var(--paper);
}

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

a {
  color: var(--rust);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rust-dark);
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* Header: airmail-stripe top edge */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.site-header::before {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--rust) 0 14px,
    var(--card) 14px 24px,
    var(--mountain) 24px 38px,
    var(--card) 38px 48px
  );
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-stamp {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--card);
  background: var(--rust);
  border-radius: 6px;
  outline: 2px dashed var(--gold-soft);
  outline-offset: -5px;
}

/* Main */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

/* Hero: mobile-first single column (art first, then words) */
.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-text {
  order: 2;
}

.postcard {
  order: 1;
  margin: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 4.25rem);
  line-height: 1.05;
  color: var(--mountain);
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0.4rem 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--rust);
}

.pitch {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  color: var(--ink);
}

.cta {
  margin: 0;
}

.button {
  display: inline-block;
  min-height: 3.25rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--rust);
  border: 3px solid var(--rust-dark);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--rust-dark), 0 8px 18px rgba(124, 42, 14, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.button:hover {
  color: #fff;
  background: var(--rust-dark);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--rust-dark);
}

.button:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Postcard motif */
.postcard-frame {
  position: relative;
  padding: 0.75rem;
  background: var(--card);
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(36, 28, 20, 0.08),
    0 12px 30px rgba(36, 28, 20, 0.18);
  transform: rotate(-1.25deg);
}

.postcard-frame img {
  display: block;
  width: 100%;
  border-radius: 6px;
}

.stamp {
  position: absolute;
  top: -0.9rem;
  right: -0.4rem;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4.6rem;
  color: var(--mountain);
  background: var(--gold-soft);
  border: 3px solid var(--card);
  outline: 2px dashed var(--rust);
  outline-offset: -8px;
  box-shadow: 0 3px 8px rgba(36, 28, 20, 0.25);
  transform: rotate(6deg);
}

.postcard figcaption {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.125rem;     /* 18px minimum */
  font-style: italic;
  color: var(--ink-muted);
}

/* Features row */
.features {
  margin-top: 3.5rem;
  padding: 2rem 1.25rem;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

.features h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
  color: var(--mountain);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.feature-list li {
  padding: 1.25rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-list li:nth-child(1) .feature-icon { background: var(--mountain); }
.feature-list li:nth-child(2) .feature-icon { background: var(--rust); }
.feature-list li:nth-child(3) .feature-icon { background: #8a5a12; }

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.6rem;
  color: #fff;
  border-radius: 50%;
}

.feature-list h3 {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--ink);
}

.feature-list p {
  margin: 0;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  background: var(--mountain);
  color: #fff;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-size: 1.125rem;     /* 18px minimum */
}

.footer-inner p {
  margin: 0;
}

/* Tablet and up */
@media (min-width: 640px) {
  .feature-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .features {
    padding: 2.25rem 2rem;
  }
}

/* Desktop: words left, postcard right */
@media (min-width: 960px) {
  main {
    padding-top: 3.5rem;
  }

  .hero {
    grid-template-columns: 1.05fr 1fr;
    gap: 3.5rem;
  }

  .hero-text { order: 1; }
  .postcard { order: 2; }
}

/* footer link contrast on blue */
footer a { color: #fde7b0; text-decoration-thickness: 2px; }
footer a:hover { color: #ffffff; }

/* Seasonal gallery: 2 across on mobile, 4 across on desktop */
.seasons {
  margin-top: 3.5rem;
}

.seasons h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
  color: var(--mountain);
}

.season-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
}

.season-card {
  margin: 0;
}

.season-card a {
  display: block;
  padding: 0.4rem;
  background: var(--card);
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(36, 28, 20, 0.08),
    0 6px 16px rgba(36, 28, 20, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.season-grid li:nth-child(odd) .season-card a { transform: rotate(-1deg); }
.season-grid li:nth-child(even) .season-card a { transform: rotate(1deg); }

.season-grid li .season-card a:hover {
  transform: rotate(0) translateY(-3px);
  box-shadow:
    0 2px 4px rgba(36, 28, 20, 0.1),
    0 10px 22px rgba(36, 28, 20, 0.22);
}

.season-card a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
  border-radius: 8px;
}

.season-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1408 / 768;
  object-fit: cover;
  border-radius: 4px;
  background: var(--paper-deep);
}

.season-card figcaption {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 1.125rem;     /* 18px minimum */
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

@media (min-width: 640px) {
  .season-grid { gap: 2rem 1.5rem; }
  .season-card a { padding: 0.55rem; }
}

@media (min-width: 960px) {
  .season-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

/* Coloring card option (distinct from the seasonal gallery) */
.coloring {
  margin-top: 3.5rem;
}

.coloring h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
  color: var(--mountain);
}

.coloring-card {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  background: var(--card);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
}

.coloring-figure {
  margin: 0;
}

.coloring-figure a {
  display: block;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(36, 28, 20, 0.08),
    0 6px 16px rgba(36, 28, 20, 0.16);
  transform: rotate(-1deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.coloring-figure a:hover {
  transform: rotate(0) translateY(-3px);
}

.coloring-figure a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
  border-radius: 8px;
}

.coloring-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 704 / 384;
  border-radius: 4px;
  background: #fff;
}

.coloring-text h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  line-height: 1.25;
  color: var(--rust);
}

.coloring-text p {
  margin: 0;
  color: var(--ink);
}

@media (min-width: 760px) {
  .coloring-card {
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    padding: 2rem;
  }
}
