/* Czech Archives – light "reading room" design */
/* Brand teal from the original logo (#00B3A2), white pages, grey footer, a wall of archive drawers in the hero. */
/* Contrast checked: ink 15.9:1, muted 7:1, teal-ink on white 6.4:1, ink on teal 6.5:1, white on hero overlay 12:1+. */

:root {
  --teal: #00b3a2;
  --teal-ink: #006b5f;
  --teal-tint: #eaf6f4;
  --ink: #1d2326;
  --muted: #4f5b5e;
  --line: #d3dcdb;
  --paper: #fbf8f1;
  --grey: #e6e7e8;
  --wood: #2a1c13;

  --font-head: 'Literata Variable', 'Literata', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-type: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 2rem);
  --maxw: 72rem;
  --focus: #0b3d91;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-body);
  text-rendering: optimizeLegibility;
}
main {
  flex: 1;
}
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
  color: var(--ink);
}
h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  margin: 0 0 1rem;
}
p {
  margin: 0 0 1.1rem;
}
a {
  color: var(--teal-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.block {
  display: block;
}
.mono {
  font-family: var(--font-type);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
address {
  font-style: normal;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--teal);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border: 2px solid var(--ink);
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Header (mobile first) ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: 'brand lang menu' 'nav nav nav';
  align-items: center;
  gap: 0.15rem 0.75rem;
  padding-block: 0.6rem 0;
}
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.brand-logo {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-tag {
  display: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.nav-lang {
  grid-area: lang;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
}
.nav-lang:hover {
  background: var(--ink);
  color: #fff;
}
.header-inner nav {
  grid-area: nav;
  min-width: 0;
}
/* On phones the menu is one swipeable row under the logo: always visible, no JavaScript. */
.nav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.25rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 2.25rem), transparent);
}
.nav-list::-webkit-scrollbar {
  display: none;
}
.nav-list li {
  flex: none;
  scroll-snap-align: start;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.4rem 0.8rem;
  font-weight: 500;
  font-size: 0.98rem;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list li:first-child .nav-link {
  padding-left: 0;
}
.nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--teal);
}
.nav-link[aria-current='page'] {
  border-bottom-color: var(--teal);
  font-weight: 700;
}
.menu-btn {
  grid-area: menu;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--teal-ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.menu-btn:hover {
  background: var(--teal-tint);
}
/* With JavaScript the menu folds into the hamburger button (phones and tablets). */
@media (max-width: 73.99rem) {
  .js .menu-btn {
    display: inline-flex;
  }
  .js .header-inner nav {
    display: none;
    border-top: 1px solid var(--line);
  }
  .js .header-inner nav.is-open {
    display: block;
  }
  .js .nav-list {
    flex-direction: column;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    gap: 0;
  }
  .js .nav-list li {
    flex: none;
  }
  .js .nav-link {
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 0.4rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .js .nav-list li:last-child .nav-link {
    border-bottom: 0;
  }
  .js .nav-link[aria-current='page'] {
    border-bottom-color: var(--line);
    box-shadow: inset 4px 0 0 var(--teal);
    padding-left: 0.9rem;
  }
}
@media (min-width: 30rem) {
  .brand-tag {
    display: block;
  }
  .brand-logo {
    width: 46px;
    height: 46px;
  }
}
@media (min-width: 74rem) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.25rem;
    padding-block: 0.9rem 0.4rem;
  }
  .brand {
    gap: 0.85rem;
  }
  .brand-logo {
    width: 52px;
    height: 52px;
  }
  .brand-name {
    font-size: 1.45rem;
  }
  .header-inner nav {
    margin-left: auto;
  }
  .nav-list {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    gap: 0 0.35rem;
    align-items: stretch;
  }
  .nav-link {
    padding: 0.4rem 1rem;
    border-bottom: 0;
    border-top: 3px solid var(--line);
  }
  .nav-list li:first-child .nav-link {
    padding-left: 1rem;
  }
  .nav-link:hover {
    border-top-color: var(--teal);
    background: var(--teal-tint);
  }
  .nav-link[aria-current='page'] {
    border-top-color: var(--teal);
  }
  .nav-lang {
    align-self: center;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font: 600 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--ink);
  border-radius: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-primary {
  background: var(--teal);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-primary:hover {
  background: #14c4b2;
  color: var(--ink);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn-primary:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}
.status {
  margin: 0.6rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}
.status:empty {
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding-block: clamp(2.5rem, 7vw, 5rem);
  background-color: var(--wood);
  background-image: linear-gradient(90deg, rgba(20, 12, 7, 0.88) 0%, rgba(20, 12, 7, 0.62) 55%, rgba(20, 12, 7, 0.3) 100%),
    url('/hero-drawers.svg');
  background-size: cover;
  background-position: center;
  --focus: #fff;
}
.hero--photo {
  background-image: linear-gradient(90deg, rgba(20, 12, 7, 0.88) 0%, rgba(20, 12, 7, 0.62) 55%, rgba(20, 12, 7, 0.3) 100%),
    url('/hero.jpg');
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.6rem, 1.5rem + 5vw, 4.8rem);
  line-height: 1.03;
  color: #fff;
}
.hero .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 34rem;
}
.hero p {
  color: #fff;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  font-size: 0.97rem;
  color: #fff;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.chip:hover {
  color: var(--ink);
  background: #fff;
}

/* The memorable element: an archive index card used as the search form. */
.search-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--teal);
  padding: 1.5rem 1.25rem 3.4rem;
  --focus: #0b3d91;
}
.search-card::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--wood);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.55);
}
.search-card h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.75rem;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.search-card p,
.search-card a {
  color: var(--ink);
}
.search-card a {
  color: var(--teal-ink);
}
.search-hint {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.fields {
  display: grid;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.field label {
  display: block;
  margin-bottom: 0.3rem;
  font: 400 0.8125rem/1.3 var(--font-type);
  letter-spacing: 0.02em;
}
.field input,
.field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 0;
}
.field input::placeholder {
  color: #66706f;
  opacity: 1;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
}
@media (min-width: 36rem) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }
  .field-wide {
    grid-column: 1 / -1;
  }
  .search-card {
    padding-inline: 1.75rem;
  }
}
@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 4rem;
  }
}
@media (max-width: 61.99rem) {
  .hero {
    background-image: linear-gradient(180deg, rgba(20, 12, 7, 0.86), rgba(20, 12, 7, 0.7)), url('/hero-drawers.svg');
  }
  .hero--photo {
    background-image: linear-gradient(180deg, rgba(20, 12, 7, 0.86), rgba(20, 12, 7, 0.7)), url('/hero.jpg');
  }
}

/* Timeline ruler: a measuring scale, the "search through history" motif. */
.ruler {
  height: 26px;
  border-bottom: 3px solid var(--teal);
  background-image: repeating-linear-gradient(90deg, var(--teal) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(90deg, var(--teal) 0 2px, transparent 2px 120px);
  background-size: 100% 10px, 100% 22px;
  background-position: left bottom, left bottom;
  background-repeat: no-repeat;
}

/* ---------- Services as archive drawers ---------- */
.section {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.drawer {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 3px solid var(--teal);
}
.drawer-item {
  position: relative;
  display: grid;
  gap: 0.75rem 2.5rem;
  padding: 1.75rem 1rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.drawer-item h3 {
  margin: 0;
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.8rem);
}
.drawer-item h3 a {
  color: var(--ink);
  text-decoration: none;
}
.drawer-item h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.drawer-item p {
  margin: 0 0 0.5rem;
}
.drawer-more {
  font-weight: 600;
  color: var(--teal-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.drawer-item:hover {
  background: var(--teal-tint);
  box-shadow: inset 6px 0 0 var(--teal);
}
.drawer-item:has(a:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}
.drawer-item a:focus-visible {
  outline: none;
}
@media (min-width: 52rem) {
  .drawer-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: baseline;
  }
}

/* ---------- Direct contact band ---------- */
.direct {
  padding-block: 2rem;
  background: var(--teal-tint);
  border-block: 1px solid var(--line);
}
.direct-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.direct h2 {
  font-size: 1.4rem;
  margin: 0 0 0.35rem;
}
.direct p {
  margin: 0;
}

/* ---------- Content pages ---------- */
.page {
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: '/';
  margin-right: 0.6rem;
  color: var(--muted);
}
.crumbs a {
  display: inline-block;
  padding-block: 0.6rem;
}
.prose {
  max-width: 42rem;
}
.prose h1,
.page-title {
  margin: 0 0 1.75rem;
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.2rem);
  line-height: 1.1;
}
.prose h1::after,
.page-title::after {
  content: '';
  display: block;
  width: min(13rem, 55%);
  height: 12px;
  margin-top: 1.1rem;
  background-image: repeating-linear-gradient(90deg, var(--teal) 0 2px, transparent 2px 10px);
  background-size: 100% 12px;
  border-bottom: 3px solid var(--teal);
}
.prose h1 + p {
  font-size: 1.25rem;
  line-height: 1.6;
}
.prose h2 {
  margin-top: 2.5rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}
.prose li {
  margin-bottom: 0.4rem;
}

/* ---------- Inquiry block ---------- */
.cta {
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}
.cta-card {
  display: grid;
  gap: 1.25rem 2rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--teal);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.cta-card h2 {
  margin-bottom: 0.5rem;
}
.cta-copy p {
  margin: 0;
  max-width: 36rem;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.9rem;
}
.cta-fallback {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}
.cta-actions .status {
  flex-basis: 100%;
}
.cta-preview {
  grid-column: 1 / -1;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}
.cta-preview summary {
  display: list-item;
  list-style-position: inside;
  min-height: 44px;
  padding-block: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}
.cta-preview pre {
  margin: 0.5rem 0 0;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--ink);
  font: 400 0.875rem/1.55 var(--font-type);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (min-width: 52rem) {
  .cta-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.more {
  padding-block: 1.5rem 0.5rem;
}
.more h2 {
  font-size: 1.25rem;
}
.more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.more-list a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
}
.more-list a:hover {
  background: var(--teal);
}

/* ---------- Contact ---------- */
.bcards {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.bcard,
.record {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--teal);
  padding: 1.5rem;
}
.bcard {
  border-left: 10px solid var(--teal);
}
.bcard h2,
.record h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}
.bcard p {
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: baseline;
}
.bcard .k,
.record dt {
  min-width: 4.5rem;
  font: 400 0.8125rem/1.3 var(--font-type);
}
.bcard a {
  overflow-wrap: anywhere;
}
.records {
  display: grid;
  gap: 1.5rem;
}
.record dl {
  display: grid;
  gap: 0.2rem 1.25rem;
  margin: 0;
}
.record dt {
  margin-top: 0.7rem;
}
.record dd {
  margin: 0;
}
@media (min-width: 40rem) {
  .record dl {
    grid-template-columns: max-content 1fr;
  }
  .record dt {
    margin-top: 0;
    padding-top: 0.3rem;
  }
}
@media (min-width: 52rem) {
  .bcards,
  .records {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 7vw, 5rem);
  background: var(--grey);
  border-top: 3px solid var(--teal);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem 1.5rem;
}
.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}
.site-footer a {
  color: var(--ink);
}
.site-footer a:hover {
  color: var(--teal-ink);
}
.foot-line {
  margin: 0.6rem 0 0;
}
.foot-people {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-people li {
  margin-bottom: 0.9rem;
}
.footer-bottom {
  padding-block: 1.25rem 2rem;
  background: linear-gradient(#c3cbca, #c3cbca) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  color: var(--muted);
}
.footer-bottom p {
  margin: 0 0 0.4rem;
}
@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Accessibility modes ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
@media (forced-colors: active) {
  .btn,
  .chip,
  .nav-lang,
  .search-card,
  .cta-card,
  .bcard,
  .record,
  .field input,
  .field select {
    border: 2px solid CanvasText;
  }
  .drawer-item {
    border-bottom: 2px solid CanvasText;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .site-header,
  .cta,
  .ruler,
  .skip-link {
    display: none;
  }
  .hero {
    background: none;
    color: #000;
  }
  .hero h1,
  .hero p {
    color: #000;
  }
  a {
    color: #000;
  }
}
