/* Layout and the parts shared by every page: header, footer, cookie bar. */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-2); }
.section { padding-block: var(--space-5); }

/* Red checkerboard of small squares, drawn in CSS only (inspired by Ukrainian embroidery) */
.checker-divider {
  --sq: 10px;
  height: var(--sq);
  background: repeating-conic-gradient(var(--red) 0 25%, transparent 0 50%) 0 0 / calc(var(--sq) * 2) calc(var(--sq) * 2);
}
.checker-divider { width: 7.5rem; margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--red-bar); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 1.1rem; padding: 0; text-decoration: none; }
.brand-strip { display: block; height: var(--header-h); width: auto; } /* white embroidered strip with the logo, cut from the banner */
.brand-word { width: clamp(7.8rem, 30vw, 20rem); height: auto; filter: brightness(0) invert(1); } /* the red wordmark, shown white on the red bar */
.nav-toggle {
  min-height: 2.75rem; padding: 0 var(--space-2); font: inherit; font-weight: 800; cursor: pointer;
  background: transparent; color: #fff; border: 2px solid #fff; border-radius: var(--radius);
}
.js .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--red-bar); border-top: 1px solid rgba(255, 255, 255, 0.35); }
.js .site-nav[hidden] { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: var(--space-1) var(--space-2) var(--space-2); display: grid; gap: 0.25rem; }
.site-nav a { display: block; padding: 0.7rem 0; font-size: calc(var(--fs-body) + 2px); font-weight: 700; color: #fff; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { opacity: 0.8; }
.site-header :focus-visible { outline-color: #fff; } /* a dark outline would be hard to see on the red bar */
.site-nav a[aria-current="page"] { border-bottom-color: #fff; }
@media (max-width: 29.99rem) { .brand { gap: 0.7rem; } }
@media (min-width: 56rem) { .brand-word { width: clamp(12rem, 20vw, 18rem); } } /* wide screens: 18rem, which is 1.2 times the first version (15rem), after the owner asked for 20% less than 1.5 times */
@media (min-width: 56rem) {
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav, .js .site-nav[hidden] { position: static; display: block; background: transparent; border: 0; }
  .site-nav ul { display: flex; gap: var(--space-3); padding: 0; }
  .site-nav a { padding: 0.4rem 0; }
}

/* Footer */
.site-footer { margin-top: var(--space-5); background: var(--graphite); color: var(--cream); }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--space-4); padding: var(--space-5) 0 var(--space-4); }
.footer-grid h2 { font-size: var(--step-0); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-logo { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: var(--space-2); padding: 0.6rem 0.8rem; background: #fff; border-radius: var(--radius); }
.footer-logo img { height: auto; }
.social a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0; }
.footer-legal { border-top: 1px solid #3a3733; padding: var(--space-2) 0 var(--space-3); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }

/* Cookie bar (behaviour in js/cookies.js) */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2); background: var(--graphite); color: var(--cream);
  border-top: 4px solid var(--red);
}
.btn-link { padding: 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; max-width: 46rem; font-size: var(--step--1); }
.cookie-bar a { color: var(--cream); }
.cookie-bar__actions { display: flex; gap: var(--space-1); }
.cookie-bar .btn { border-color: var(--cream); color: var(--cream); min-height: 2.75rem; }
.cookie-bar .btn:hover { background: var(--cream); color: var(--graphite); }
.cookie-bar .btn--primary { background: var(--red-text); border-color: var(--red-text); color: #fff; }

/* Home page: the red bar floats over the big photo (the photo starts under it) */
.top-sentinel { position: absolute; bottom: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.has-hero .site-header { position: fixed; top: 0; left: 0; right: 0; }
