/* ---------- Design tokens ---------- */
:root {
  --color-khaki: #9C8B5E;
  --color-lavender: #C4B7DB;
  --color-lilac: #B497C9;
  --color-earth: #6E5945;
  --color-cream: #FBF8F3;

  /* Text-safe accents (WCAG 2.1 AA). The original lilac/khaki above are too
     light for text (2.4:1 / 3.2:1 on cream) and are kept for decorative use
     only. These pass 4.5:1 on cream, lavender-tint and white, and white text
     on them passes 4.5:1 too. */
  --color-lilac-deep: #74559A;
  --color-khaki-deep: #706238;

  --color-lavender-tint: #EDE8F5;
  --color-white: #FFFFFF;

  --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --shadow-soft: 0 6px 24px rgba(110, 89, 69, 0.12);
  --wrap-width: 1100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-earth);
  background: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-lilac-deep); text-decoration-thickness: 1.5px; text-underline-offset: 0.15em; }
a:hover { color: var(--color-khaki-deep); }

/* Visible keyboard focus everywhere (WCAG 2.4.7). No transitions or
   animations anywhere on this site, by design. */
:focus-visible {
  outline: 3px solid var(--color-lilac-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-footer :focus-visible { outline-color: var(--color-cream); }

/* Skip link: first focusable element on every page (WCAG 2.4.1). */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--color-earth);
  color: var(--color-cream);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: var(--color-cream); }
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-khaki-deep);
  line-height: 1.2;
  margin-top: 0;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3, .card-title { font-size: 1.2rem; }
ul { padding-left: 1.25rem; }

.wrap {
  max-width: var(--wrap-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.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;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--color-cream);
  border-bottom: 1px solid rgba(156, 139, 94, 0.2);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
}
.brand__name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-khaki-deep);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--color-khaki-deep);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-earth);
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  color: var(--color-earth);
  font-weight: 600;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--color-khaki-deep);
}
/* Current page is marked by more than colour (WCAG 1.4.1). */
.primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--color-cream);
    border-bottom: 1px solid rgba(156, 139, 94, 0.2);
    box-shadow: var(--shadow-soft);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .primary-nav li { padding-block: 0.6rem; border-top: 1px solid rgba(156, 139, 94, 0.12); }
}
@media (min-width: 721px) {
  .nav-toggle { display: none; }
}

/* ---------- Layout sections ---------- */
main > section,
main > .section {
  padding-block: 3rem;
}
.section--lavender {
  background: var(--color-lavender-tint);
}
.section--khaki-band {
  background: var(--color-lavender);
  color: var(--color-earth);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding-block: 3rem;
}
.hero > *,
.card--highlight > *,
.card-grid > * {
  min-width: 0;
}
.hero__text .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-lilac-deep);
  font-weight: 700;
}
.hero__image img,
.card--highlight img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero.hero--text-only {
    grid-template-columns: minmax(0, 46rem);
  }
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.card--highlight {
  background: var(--color-white);
  border: 1px solid var(--color-lavender);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
}
/* Photo column: portrait 4:5, fixed width beside the text on wider screens. */
.card--highlight picture,
.card--highlight img { display: block; width: 100%; max-width: 22rem; }
.card--highlight img { aspect-ratio: 4 / 5; object-fit: cover; }
.card--highlight img.photo-dogs { object-position: 50% 80%; }
.card--highlight img.photo-riemu { object-position: 50% 40%; }
@media (min-width: 700px) {
  .card--highlight { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--color-lilac-deep);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--color-khaki-deep); color: var(--color-white); }
.btn--ghost {
  background: transparent;
  color: var(--color-earth);
  border: 1.5px solid var(--color-earth);
}
/* Ghost hover keeps a light fill so the text never matches the background
   (it used to inherit .btn:hover's khaki fill). Khaki-deep on white: 6.0:1. */
.btn--ghost:hover {
  background: var(--color-white);
  border-color: var(--color-khaki-deep);
  color: var(--color-khaki-deep);
}

/* ---------- Availability banner ---------- */
.availability {
  background: var(--color-white);
  border-left: 4px solid var(--color-khaki-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-weight: 600;
}
.availability small {
  display: block;
  font-weight: 400;
  color: var(--color-earth);
  margin-top: 0.25rem;
}

/* ---------- Training list (Minusta page) ---------- */
.training-group {
  border-top: 1px solid rgba(156, 139, 94, 0.25);
  padding-block: 1.25rem;
}
.training-group summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-earth);
  font-family: var(--font-heading);
}
.training-group ul { margin-top: 0.75rem; }

/* ---------- Placeholder images ---------- */
.placeholder-figure {
  margin: 0;
}
.placeholder-figure figcaption {
  font-size: 0.8rem;
  color: var(--color-earth);
  margin-top: 0.4rem;
}

.page-banner {
  margin-bottom: 1rem;
}
.page-banner img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

/* ---------- Page header ---------- */
.page-header {
  padding-block: 2.5rem 1rem;
}

/* Minusta: a modest portrait beside the heading and intro (left on wider
   screens, below the intro on phones). Kept small on purpose: the site is
   informational, not personal branding. */
.profile-header {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: center;
}
.profile-header__text > :last-child { margin-bottom: 0; }
.profile-header__photo img {
  width: 160px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 700px) {
  .profile-header { grid-template-columns: 200px minmax(0, 1fr); }
  .profile-header__photo { order: -1; }
  .profile-header__photo img { width: 200px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-earth);
  color: var(--color-cream);
  padding-block: 2.5rem;
}
.site-footer a { color: var(--color-cream); }
.site-footer a:hover { color: var(--color-lavender-tint); }
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 0;
  margin: 0 0 1.25rem;
}
.footer-strap {
  margin: 0 0 0.5rem;
  opacity: 0.85;
  font-size: 0.9rem;
}
.footer-contact { margin: 0.5rem 0 0; font-size: 0.9rem; }
.footer-credit { margin: 1.25rem 0 0; font-size: 0.8rem; }
.footer-docs { margin: 0.5rem 0 0; font-size: 0.9rem; }

/* ---------- Document download ---------- */
.doc-download__meta {
  margin-top: 0;
  font-size: 0.875rem;
}
