/* KCA — the shell for pages that live outside the compiled bundle.
 *
 * gallery.html, blog.html, post.html and testimonials.html are plain HTML,
 * because the site itself is Vite output whose source tree is not in this
 * repository and cannot be added to. That makes matching its appearance a
 * copying job, so it is done once here rather than four times.
 *
 * The custom properties are the same triplets the bundle's stylesheet defines
 * (assets/index-*.css). Keeping the same names and the same values means a
 * future rebuild of the site can be matched by changing this block alone.
 */

:root {
  --background: 0 0% 100%;
  --foreground: 162 40% 8%;
  --card: 162 20% 98%;
  --primary: 162 82% 12%;
  --primary-foreground: 0 0% 98%;
  --secondary: 162 20% 96%;
  --muted: 210 20% 96%;
  --muted-foreground: 210 15% 46%;
  --accent: 142 76% 36%;
  --accent-foreground: 0 0% 100%;
  --border: 162 20% 90%;
  --destructive: 0 84% 60%;
  --radius: 0.75rem;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, .03), 0 2px 4px rgba(0, 0, 0, .05),
                 0 12px 24px -12px rgba(0, 0, 0, .05);
}

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

body {
  font-family: 'Public Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* --------------------------------------------------------------- the header
 *
 * Fixed, translucent and 4rem tall, which is what the bundle's own header is —
 * a visitor moving between a bundle page and one of these should not see the
 * chrome move.
 */
.kca-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 4rem;
  display: flex;
  align-items: center;
  background: hsl(var(--background) / .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.kca-header__inner {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.kca-brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.kca-brand img { height: 3.5rem; width: auto; }
.kca-brand span {
  font-size: .75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.kca-nav { display: flex; align-items: center; gap: 1.5rem; }
.kca-nav a {
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  color: hsl(var(--foreground) / .8);
  transition: color .2s;
  white-space: nowrap;
}
.kca-nav a:hover,
.kca-nav a[aria-current='page'] { color: hsl(var(--primary)); }

.kca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: .625rem 1.25rem;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.kca-btn:hover { opacity: .9; transform: translateY(-1px); }
.kca-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.kca-btn--accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.kca-btn--ghost {
  background: transparent;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--border));
}
.kca-btn--block { width: 100%; }

/* ------------------------------------------------------------------ the hero */
.kca-hero {
  margin-top: 4rem;              /* clears the fixed header */
  min-height: 17rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: hsl(var(--primary-foreground));
  background:
    linear-gradient(hsl(var(--primary) / .82), hsl(var(--primary) / .82)),
    var(--kca-hero-image, none) center / cover no-repeat,
    hsl(var(--primary));
}
.kca-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; line-height: 1.15; }
.kca-hero p { margin-top: .75rem; max-width: 40rem; color: hsl(var(--primary-foreground) / .8); }

/* ------------------------------------------------------------- the container */
.kca-container { max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.5rem; }
.kca-container--narrow { max-width: 46rem; }

.kca-section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.kca-section-head h2 { font-size: 1.75rem; font-weight: 700; }
.kca-section-head p { margin-top: .5rem; color: hsl(var(--muted-foreground)); }

.kca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
}

.kca-card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
a.kca-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.kca-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.kca-card__meta {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: hsl(var(--muted-foreground));
  margin-bottom: .75rem;
}
.kca-card__title { font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.kca-card__text { margin-top: .5rem; font-size: .9rem; color: hsl(var(--muted-foreground)); flex: 1; }
.kca-card__more { margin-top: 1rem; font-size: .875rem; font-weight: 600; color: hsl(var(--accent)); }

.kca-pill {
  display: inline-block;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  padding: .4rem 1rem;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.kca-pill:hover,
.kca-pill[aria-pressed='true'] {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------------------- form fields */
.kca-field { margin-bottom: 1.125rem; }
.kca-field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .375rem; }
.kca-field input,
.kca-field select,
.kca-field textarea {
  width: 100%;
  font: inherit;
  font-size: .9375rem;
  color: inherit;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 4px);
  padding: .625rem .75rem;
}
.kca-field input:focus,
.kca-field select:focus,
.kca-field textarea:focus {
  outline: 2px solid hsl(var(--accent) / .5);
  outline-offset: 1px;
  border-color: hsl(var(--accent));
}
.kca-field textarea { resize: vertical; min-height: 8rem; }
.kca-hint { font-size: .8125rem; color: hsl(var(--muted-foreground)); margin-top: .375rem; }

/* A row of radio inputs presented as stars. Keyboard and screen readers get
 * the real radio group; everyone else sees the stars. */
.kca-stars { display: flex; gap: .25rem; }
.kca-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.kca-stars label {
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  color: hsl(var(--muted-foreground) / .4);
  margin: 0;
  transition: color .15s;
}
.kca-stars input:checked ~ label,
.kca-stars label:hover { color: hsl(var(--accent)); }
.kca-stars input:focus-visible + label { outline: 2px solid hsl(var(--accent)); border-radius: 4px; }

.kca-note {
  border-radius: calc(var(--radius) - 4px);
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-bottom: 1.25rem;
}
.kca-note--error { background: hsl(var(--destructive) / .1); color: hsl(var(--destructive)); }
.kca-note--ok { background: hsl(var(--accent) / .12); color: hsl(var(--primary)); }

/* ------------------------------------------------------------- states, footer */
.kca-state { text-align: center; padding: 4rem 1rem; color: hsl(var(--muted-foreground)); }

.kca-footer {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground) / .75);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .875rem;
  margin-top: 3rem;
}
.kca-footer a { color: hsl(var(--primary-foreground)); }
.kca-footer nav { margin-bottom: .75rem; display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
.kca-footer nav a { text-decoration: none; font-weight: 500; }
.kca-footer nav a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- the small screen
 *
 * Below 900px the row of links becomes a sheet under the header, opened by a
 * button that does not exist at all on wider screens. The button is a real
 * <button> with aria-expanded, so the sheet is reachable without a pointer.
 */
.kca-menu-btn { display: none; }

@media (max-width: 900px) {
  .kca-brand span { display: none; }

  .kca-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: none;
    color: hsl(var(--foreground));
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
  }

  .kca-nav {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1rem 1rem;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-card);
  }
  .kca-nav[data-open='true'] { display: flex; }
  .kca-nav a {
    padding: .75rem 0;
    border-bottom: 1px solid hsl(var(--border) / .5);
  }
  .kca-nav a:last-child { border-bottom: 0; }
  .kca-nav .kca-btn { margin-top: .75rem; }
}
