/* Nilpress starter theme. Mobile first, system fonts, light and dark. --accent comes from the
   theme option (ctx.cssVars); the fallback below is only used if it is missing. */
:root {
  --accent: #1f4fd8;
  --bg: #ffffff;
  --fg: #1b1f27;
  --muted: #5b6472;
  --line: #dde1e8;
  --soft: #f3f5f9;
  --radius: 0.5rem;
  --measure: 70rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --fg: #e8ebf1;
    --muted: #a3acba;
    --line: #2b313c;
    --soft: #1a1e26;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
  padding-block: 1.5rem 3rem;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
}
h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-top: 0.5em;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.15rem;
  margin-top: 0.75rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.wrap {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
}
body[data-layout='narrow'] .wrap {
  --measure: 46rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
}
.meta,
.small,
.help {
  color: var(--muted);
  font-size: 0.9rem;
}
.visually-hidden,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
}
.brand img {
  width: auto;
  height: 2rem;
  border-radius: 0;
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav {
  order: 3;
  width: 100%;
}
.site-header a:not(.brand):not(.cta) {
  color: var(--fg);
  text-decoration: none;
}
.site-header a:not(.brand):not(.cta):hover {
  color: var(--accent);
}
.cta,
.button,
button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.cta:hover,
.button:hover,
button:hover {
  filter: brightness(1.1);
}
button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.lang a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Content */
.hero {
  padding: 1.5rem 0 1rem;
}
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--soft);
}
/* The title link covers the whole card, so the cover image needs no link of its own. */
.card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.card h3 {
  margin-top: 0.75rem;
}
.card p {
  margin-bottom: 0;
}
.card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
}
.cover,
.gallery figure {
  margin: 0;
}
.cover img {
  width: 100%;
}
.gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
.prose {
  max-width: 44rem;
}
.prose img {
  margin-block: 1rem;
}
.narrow {
  max-width: 40rem;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  color: var(--muted);
}
.results {
  padding-left: 1.2rem;
}

/* Forms */
.quote label,
.search label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.search {
  display: flex;
  gap: 0.5rem;
}
.search input {
  flex: 1;
}
.hp {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}
.files {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
  padding-block: 1.5rem;
}
.foot-name {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
  margin: 0 0 1rem;
}
.contact dt {
  color: var(--muted);
}
.contact dd {
  margin: 0;
}

@media (min-width: 48rem) {
  .site-header nav {
    order: 0;
    width: auto;
  }
  .grid,
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
