:root {
  --container: 1240px;
  --accent: rgba(244, 130, 0, 0.35);
  --font: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;
}

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

[hidden] { display: none !important; }

html { scrollbar-gutter: unset; }

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: .5rem 1rem;
  background: #000;
  color: #fff;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Header ---------- */
.header { position: relative; padding-block: 2rem; }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header__brand {
  display: inline-block;
  font-size: 1.333rem;
  font-weight: 400;
  letter-spacing: .01em;
}
@media (min-width: 20em) and (max-width: 60em) {
  .header__brand { font-size: calc(1.333rem + (100vw - 20em) * 0.011097225); }
}
@media (min-width: 60em) { .header__brand { font-size: 1.776889rem; } }
.header__col-right { display: flex; align-items: center; gap: 1rem; }
.header__menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; }
.nav__link {
  display: block;
  position: relative;
  padding-block: .2em;
  color: #717171;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid currentColor;
  transition: right .3s;
}
.nav__link:hover,
.nav__item.is-current > .nav__link { color: #000; }
.nav__link:hover::after,
.nav__item.is-current > .nav__link::after { right: 0; }

.header__submenu-wrap {
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 60;
  width: max-content;
  min-width: 230px;
  max-width: 288px;
  padding: 1rem;
  background: #fff;
  border: 1px solid #000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.header__submenu-wrap::before { content: ""; position: absolute; inset: -8px 0 auto; height: 8px; }
.nav__item.has-children:hover > .header__submenu-wrap,
.nav__item.has-children:focus-within > .header__submenu-wrap { opacity: 1; visibility: visible; transform: none; }
.nav__submenu { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.nav__submenu .nav__link { font-size: 18px; font-weight: 400; }

@media (min-width: 768px) and (max-width: 1200px) {
  .header__menu { gap: 1.25rem; }
}

.search-toggle,
.mobile-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
}
.search-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.mobile-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.mobile-toggle .mobile-menu__close-icon { display: none; }
body.menu-open .mobile-toggle .mobile-menu__open-icon { display: none; }
body.menu-open .mobile-toggle .mobile-menu__close-icon { display: block; }
.mobile-toggle { display: none; }
.mobile-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.35); }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  width: 100%;
  max-width: 24rem;
  padding-top: 4rem;
  overflow-y: auto;
  background: #fff;
  transform: translateX(100%);
  transition: transform .3s ease;
}
body.menu-open .mobile-menu { transform: none; }
.mobile-menu__menu { margin: 0; padding: 1rem 2rem 2rem; list-style: none; }
.mobile-menu__item { border-bottom: 1px solid #ddd; }
.mobile-menu__link { display: block; padding: .5em 0; font-size: 20px; text-transform: uppercase; }
.mobile-menu__submenu { margin: 0; padding: 0 0 .75rem 1rem; list-style: none; }
.mobile-menu__submenu .mobile-menu__link { font-size: 16px; }

.search-overlay {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #000;
}
.search-overlay__form { display: flex; flex: 1; gap: .5rem; max-width: var(--container); margin-inline: auto; }
.search-overlay__form input { flex: 1; padding: .5rem; border: 1px solid #000; background: #fff; }
.search-overlay__form button,
.search-page__form button { padding: .5rem 1rem; border: 1px solid #000; background: #000; color: #fff; cursor: pointer; }
.search-overlay__close { border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; }

/* ---------- Content ---------- */
.site-main { padding-bottom: 4rem; }
.posts { padding-bottom: 1rem; }

.posts__row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .posts__row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts__row { grid-template-columns: repeat(3, 1fr); } }

.post-card { position: relative; height: 100%; }
.post-card__link { position: absolute; inset: 0; z-index: 20; }
.post-card__image { position: relative; margin: 0; overflow: hidden; }
.post-card__image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .2s; }
.post-card__overlay { position: absolute; inset: 0; z-index: 10; background: var(--accent); opacity: 0; transition: opacity .3s; }
.post-card:hover .post-card__image img,
.post-card:focus-within .post-card__image img { transform: scale(1.1); }
.post-card:hover .post-card__overlay,
.post-card:focus-within .post-card__overlay { opacity: 1; }
.post-card__body { padding-inline: 0; }
.post-card__heading {
  margin: 0;
  padding-block: 1rem;
  font-size: 1.776889rem;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
@media (min-width: 20em) and (max-width: 60em) {
  .post-card__heading { font-size: calc(1.776889rem + (100vw - 20em) * 0.0345111379); }
}
@media (min-width: 60em) { .post-card__heading { font-size: 3.1573345183rem; } }
.post-card__excerpt { padding-bottom: 1rem; font-size: 1rem; line-height: 1.5; }
.post-card__date { padding-bottom: 1rem; font-size: 1rem; }

.archive-header { padding-block: 2rem 1rem; }
.archive-header__title,
.entry__title { margin: 0; font-size: clamp(2rem, 4vw, 3.16rem); font-weight: 400; line-height: 1.05; }
.archive-header__description { margin: .5rem 0 0; color: #717171; font-size: 1.1rem; }
.entry__header { padding-block: 2rem 1rem; }
.entry__date { display: block; padding-top: .5rem; color: #717171; }
.entry__image { margin: 0 0 2rem; }
.entry__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
@media (max-width: 640px) { .entry__image img { aspect-ratio: 4 / 3; } }
.entry__content { max-width: 80ch; font-size: 1.15rem; }
.entry__content a { text-decoration: underline; text-underline-offset: .15em; }
.entry__content a:hover { text-decoration-thickness: 2px; }
.entry__content p { margin-block: 0 1.25rem; }
.entry__content p:empty,
.post-card__excerpt p:empty { display: none; }
.entry__content h2,
.entry__content h3 { margin-block: 2rem .75rem; font-weight: 400; }
.entry__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #000; }

.gallery { display: grid; grid-template-columns: 1fr; gap: .5rem; margin-block: 2rem; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery__item { display: block; overflow: hidden; }
.gallery__item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.gallery__item:hover img { transform: scale(1.05); }

/* ---------- Instagram feeds ---------- */
.instagram-feed { margin-block: 3rem; }
.instagram-feed__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.instagram-feed__avatar { flex: none; width: 50px; height: 50px; overflow: hidden; border-radius: 50%; background: #eee; }
.instagram-feed__avatar img { width: 100%; height: 100%; object-fit: cover; }
.instagram-feed__meta { display: grid; }
.instagram-feed__meta strong { font-size: 20px; }
.instagram-feed__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .25rem; }
@media (max-width: 991px) { .instagram-feed__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .instagram-feed__grid { grid-template-columns: repeat(3, 1fr); } }
.instagram-feed__item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #f4f4f4; }
.instagram-feed__item img { width: 100%; height: 100%; object-fit: cover; }
.instagram-feed__item::after { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0; transition: opacity .2s; }
.instagram-feed__item:hover::after { opacity: 1; }
.instagram-feed__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.instagram-feed__follow { padding: .5em 1em; border: 1px solid #000; background: #fff; cursor: pointer; }
.instagram-feed__follow:hover { background: #000; color: #fff; }
.instagram-feed__error { grid-column: 1 / -1; padding: 1rem; border: 1px solid #000; }

/* ---------- Search page ---------- */
.search-page__form { display: flex; gap: .5rem; max-width: 40rem; margin-bottom: 1rem; }
.search-page__form input { flex: 1; padding: .5rem; border: 1px solid #000; background: #fff; }
.search-page__status { display: block; min-height: 1.5rem; color: #717171; }
.search-page__results { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.search-page__results li { padding-bottom: 1rem; border-bottom: 1px solid #ddd; }
.search-page__results a { font-size: 1.3rem; }
.search-page__results p { margin: .25rem 0 0; color: #717171; }

.flipbook { margin-block: 1.5rem; }
.flipbook__viewer { display: block; width: 100%; height: min(75vh, 800px); min-height: 420px; border: 1px solid #000; background: #f4f4f4; }
.flipbook__fallback { margin-top: .75rem; }
.flipbook__link { display: inline-flex; align-items: center; gap: .35rem; padding: .6em 1em; border: 1px solid #000; text-decoration: none; }
.flipbook__link:hover { background: #000; color: #fff; }

/* ---------- Embedded videos ---------- */
.video-vimeo { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-block: 1.5rem; }
.video-vimeo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 3rem 1rem; background: rgba(0,0,0,.92); touch-action: pan-y; }
.lightbox__figure { display: grid; justify-items: center; gap: .5rem; margin: 0; max-width: min(90vw, 1200px); touch-action: pan-y; }
.lightbox__image { max-width: 100%; max-height: 78vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__caption { color: #fff; text-align: center; }
.lightbox__counter { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); color: #fff; }
.lightbox button { flex: none; padding: .25em .5em; border: 0; background: transparent; color: #fff; font-size: 3rem; line-height: 1; cursor: pointer; }
.lightbox__close { position: absolute; top: .5rem; right: 1rem; font-size: 2.5rem !important; }
body.lightbox-open { overflow: hidden; }

/* ---------- Footer ---------- */
.minimalio-footer { margin-top: 2rem; padding-block: 2rem; border-top: 1px solid #000; background: #fff; }
.footer__wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; text-align: center; }
@media (min-width: 768px) {
  .footer__left { width: 33.333%; text-align: left; }
  .footer__center { width: 33.333%; }
}

@media (max-width: 767px) {
  .menu-main-container { display: none; }
  .mobile-toggle { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
