/* NaaimachineMuseum — site styles. No external fonts or resources. */
:root {
  --paper: #fbf8f3;
  --paper-2: #f1ebe1;
  --ink: #26221e;
  --ink-soft: #57504a;
  --accent: #8a3b12;
  --accent-dark: #6a2c0b;
  --line: #ddd3c4;
  --focus: #1f5fbf;
  --radius: 6px;
  --content: 72rem;
  --text: 46rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wp--preset--spacing--10: 0.5rem;
  --wp--preset--spacing--20: 0.75rem;
  --wp--preset--spacing--30: 1.25rem;
  --wp--preset--spacing--40: 2rem;
  --wp--preset--spacing--50: 3rem;
  --wp--preset--spacing--60: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); line-height: 1.25; margin: 1.6em 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Header and navigation */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-header__inner { max-width: var(--content); margin: 0 auto; padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }
.site-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
.menu-toggle { font: inherit; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 0.4rem 0.9rem; cursor: pointer; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-nav a, .site-nav summary { color: var(--ink); text-decoration: none; padding: 0.35rem 0; display: inline-block; cursor: pointer; }
.site-nav a:hover, .site-nav summary:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-nav summary { list-style: none; }
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after { content: " ▾"; font-size: 0.8em; }
.site-nav__group { position: relative; }
.site-nav__sub { list-style: none; margin: 0; padding: 0.5rem 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.site-nav__sub a { display: block; padding: 0.3rem 0; }

@media (min-width: 60em) {
  .menu-toggle { display: none; }
  .site-nav__sub { position: absolute; top: 100%; left: -0.75rem; min-width: 16rem; max-height: 70vh; overflow-y: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
}
@media (max-width: 59.99em) {
  .site-nav { width: 100%; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__item { border-top: 1px solid var(--line); }
  .site-nav a, .site-nav summary { padding: 0.6rem 0; width: 100%; }
  .site-nav__sub { border: 0; padding: 0 0 0.5rem 1rem; }
  .js .site-nav:not(.is-open) { display: none; }
}

/* Layout */
.site-main { max-width: var(--content); margin: 0 auto; padding: 1rem 1rem 3rem; }
.page { max-width: var(--content); }
.breadcrumb { margin-top: 1rem; font-size: 0.95rem; }
.breadcrumb a::before { content: "← "; }
.page-title { margin-top: 0.75rem; }
.entry-content > * { margin-left: auto; margin-right: auto; }
.entry-content p, .entry-content ul, .entry-content ol { max-width: var(--text); }
.button { display: inline-block; background: var(--accent); color: #fff; padding: 0.6rem 1.2rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.button:hover { background: var(--accent-dark); color: #fff; }

/* Footer */
.site-footer { background: var(--ink); color: #eee7dc; }
.site-footer__inner { max-width: var(--content); margin: 0 auto; padding: 2rem 1rem; display: grid; gap: 0.25rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #f3d3b8; }
.site-footer__name { font-family: var(--serif); font-size: 1.2rem; }

/* Home */
.home-hero { margin: 0 0 1.5rem; }
.home-hero img { width: 100%; border-radius: var(--radius); max-height: 32rem; object-fit: cover; }
.home-intro { text-align: center; max-width: var(--text); margin: 0 auto 2rem; }
.home-intro h1 { margin-top: 0.5rem; }
.home-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 2rem 0; }
.home-photos figure { margin: 0; }
.home-photos img { width: 100%; border-radius: var(--radius); }
.home-news { background: var(--paper-2); border-radius: var(--radius); padding: 1rem 1.5rem; }
.home-news ul { list-style: none; padding: 0; }
.home-news li { padding: 0.4rem 0; border-top: 1px solid var(--line); }
.home-news__date { font-weight: 600; margin-right: 0.5rem; }
.section-links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.section-links a { display: block; padding: 0.9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.section-links a:hover { border-color: var(--accent); }

/* Gutenberg blocks used by the content */
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }
.has-small-font-size { font-size: 0.9rem; }
.has-medium-font-size { font-size: 1.1rem; }
.has-base-background-color { background: #fff; }
.has-background { padding: 1rem; }
.wp-block-heading.is-style-asterisk::before { content: "✻"; display: block; color: var(--accent); font-size: 1.2rem; margin-bottom: 0.25rem; }
.has-text-align-center.is-style-asterisk::before { text-align: center; }

figure { margin: 1rem 0; }
.wp-block-image { text-align: center; }
.wp-block-image img { display: inline-block; vertical-align: top; }
.wp-block-image.is-style-rounded img { border-radius: 10px; }
.wp-block-image figcaption, .wp-block-embed figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.3rem; }
.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.alignleft { float: left; margin: 0.25rem 1.25rem 1rem 0; max-width: 50%; }
.alignright { float: right; margin: 0.25rem 0 1rem 1.25rem; max-width: 50%; }
.alignwide, .alignfull { max-width: var(--content); }
.entry-content::after { content: ""; display: table; clear: both; }

.wp-block-spacer { height: 1.5rem; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2rem auto; max-width: 8rem; }
.wp-block-separator.is-style-wide { max-width: none; }
.wp-block-separator.is-style-dots { border: 0; text-align: center; max-width: none; }
.wp-block-separator.is-style-dots::before { content: "· · ·"; color: var(--ink-soft); font-size: 1.5rem; letter-spacing: 1rem; }

.wp-block-group { margin: 1.5rem 0; }

.wp-block-columns { display: flex; flex-direction: column; gap: 1.5rem; margin: 1.5rem 0; }
.wp-block-column { min-width: 0; }
@media (min-width: 48em) {
  .wp-block-columns { flex-direction: row; }
  .wp-block-column { flex: 1 1 0; }
}

.wp-block-media-text { display: grid; gap: 1.25rem; margin: 1.5rem 0; align-items: center; }
.wp-block-media-text__media img { width: 100%; }
@media (min-width: 48em) {
  .wp-block-media-text { grid-template-columns: 50% 1fr; }
  .wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 50%; }
  .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
}

/* Tables scroll sideways on narrow screens instead of breaking the layout. */
.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
.wp-block-table table { border-collapse: collapse; width: 100%; background: #fff; }
/* Wide tables (4+ columns) keep a readable width and scroll; narrower ones fit the screen. */
.wp-block-table table:has(tr > :nth-child(4)) { min-width: 36rem; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--line); padding: 0.5rem; vertical-align: top; }
.wp-block-table td img { max-width: 100%; }

/* Galleries */
.wp-block-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
@media (min-width: 48em) {
  .wp-block-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wp-block-gallery .wp-block-image { margin: 0; }
.wp-block-gallery .gallery-link { display: block; }
.wp-block-gallery img { width: 100%; }
.wp-block-gallery.is-cropped img { aspect-ratio: 1; object-fit: cover; }

/* Video placeholders: poster is local; YouTube loads only after a click. */
.video { position: relative; max-width: 48rem; margin: 1.5rem auto; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-link { display: block; position: relative; height: 100%; color: #fff; text-decoration: none; }
.video-link img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video-play { position: absolute; top: 50%; left: 50%; width: 4.5rem; height: 3.2rem; margin: -1.6rem 0 0 -2.25rem; background: #c4302b; border-radius: 0.8rem; }
.video-play::after { content: ""; position: absolute; left: 1.8rem; top: 0.95rem; border-left: 1.2rem solid #fff; border-top: 0.65rem solid transparent; border-bottom: 0.65rem solid transparent; }
.video-note { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.5rem 0.75rem; background: rgba(0, 0, 0, 0.7); font-size: 0.85rem; }
.video-link:hover .video-play, .video-link:focus-visible .video-play { background: #e0221a; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Lightbox (created by site.js) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; background: #fff; }
.lightbox__caption { color: #fff; margin-top: 0.5rem; text-align: center; max-width: 80vw; }
.lightbox__btn { position: fixed; background: rgba(255, 255, 255, 0.9); color: var(--ink); border: 0; border-radius: 50%; width: 3rem; height: 3rem; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; }
.lightbox__next { right: 1rem; top: 50%; }

.contact-details { background: var(--paper-2); border-radius: var(--radius); padding: 1rem 1.5rem; max-width: var(--text); }

@media print {
  .site-header, .site-footer, .breadcrumb, .video-play { display: none; }
  body { background: #fff; }
}
