:root {
  color-scheme: light;
  --ink: #303a28;
  --paper: #f8ecd7;
  --sage: #ddd8bb;
  --line: #8f9276;
  --rust: #9e431e;
  --rust-hover: #843619;
  --serif: Lora, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) url("public/art/paper.jpg") center top / 1050px auto repeat;
  font: 17px/1.5 var(--serif);
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; font-weight: 580; letter-spacing: -.033em; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1.12em; height: 1.12em; flex: none; stroke-width: 1.65; }
.page-width { width: min(calc(100% - 80px), 1352px); margin-inline: auto; }

.skip {
  position: fixed;
  z-index: 5;
  inset: 10px auto auto 10px;
  transform: translateY(-150%);
  padding: 10px 16px;
  color: white;
  background: var(--ink);
}
.skip:focus { transform: none; }

.site-header, .site-footer {
  background: var(--sage) url("public/art/linen.jpg") center / 830px auto repeat;
  background-blend-mode: multiply;
}
.site-header { position: relative; z-index: 2; border-bottom: 1px solid #b6b699; }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: clamp(76px, 6.95vw, 100px);
  padding: 4px clamp(8px, 2.35vw, 34px);
}
.brand { flex: none; display: block; width: clamp(158px, 18vw, 256px); }
.brand img { width: 100%; mix-blend-mode: multiply; filter: brightness(.83) saturate(.84); }
.main-nav, .footer-inner nav { display: flex; align-items: center; gap: clamp(18px, 3.05vw, 44px); }
.main-nav a, .main-nav summary, .footer-inner nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:not(.button):hover, .main-nav summary:hover, .footer-inner nav a:hover {
  text-decoration: underline;
}
.house-menu { position: relative; }
.house-menu summary { list-style: none; cursor: pointer; }
.house-menu summary::-webkit-details-marker { display: none; }
.house-menu[open] summary svg { transform: rotate(180deg); }
.house-menu ul {
  position: absolute;
  top: calc(100% + 6px);
  left: -16px;
  min-width: max-content;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: #fcf1dc;
  border: 1px solid var(--line);
  box-shadow: 0 5px 15px #303a2820;
}
.house-menu ul a { padding-inline: 12px; width: 100%; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .62em;
  padding: 8px clamp(19px, 2.3vw, 34px);
  color: #fff9ef;
  background: var(--rust);
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.25;
}
.button:hover { background: var(--rust-hover); }

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-inner {
  min-height: clamp(235px, 20.4vw, 294px);
  padding: clamp(44px, 3.7vw, 54px) clamp(14px, 4.55vw, 65px) 24px;
}
.hero h1 { font-size: clamp(44px, 4.44vw, 64px); }
.hero p { margin-top: 7px; font-size: clamp(17px, 1.83vw, 26px); font-style: italic; }
.hero-skyline {
  position: absolute;
  inset: 0 0 0 auto;
  width: 66%;
  z-index: -2;
  background: url("public/art/skyline.png") right center / 100% auto no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 16% 91%, transparent),
    linear-gradient(to bottom, transparent, #000 12% 72%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.hero-rowan {
  position: absolute;
  inset: 0 auto auto 0;
  width: clamp(68px, 9vw, 130px);
  aspect-ratio: .99;
  background: url("public/art/rowan.png") right top / auto 105% no-repeat;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: -1;
}

.properties {
  display: grid;
  grid-template-columns: 2fr 1fr;
  padding: clamp(10px, 1.65vw, 24px) 0 clamp(30px, 3.4vw, 49px);
}
.village { min-width: 0; padding-inline: clamp(12px, 2.15vw, 31px); }
.village--jankowce { border-left: 1px solid var(--line); }
.village-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.2vw, 18px);
  font-size: clamp(25px, 2.72vw, 39px);
}
.village-name::before, .village-name::after {
  content: "";
  flex: 1 1 0;
  border-top: 1px solid var(--ink);
}
.house-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.village--weremien .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.house { padding-top: 14px; text-align: center; }
.house-art {
  display: flex;
  height: clamp(164px, 17.9vw, 257px);
  align-items: end;
  justify-content: center;
  overflow: clip;
  overflow-clip-margin: 22px;
  border-radius: 3px;
}
.house-art img {
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.house-art--compact img { height: 112%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .house-art img { transition: transform 240ms ease-out; }
  .house-art:hover img { transform: translateY(-3px); }
}
.house h3 { margin-top: 14px; font-size: clamp(24px, 2.95vw, 43px); }
.house-place {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9em;
  margin-top: 8px;
  font: 700 clamp(12px, 1.2vw, 17px)/1.35 var(--serif);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.house-place::before, .house-place::after {
  content: "";
  width: clamp(22px, 4.6vw, 64px);
  border-top: 1px solid var(--line);
}
.house-facts {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-block: clamp(14px, 1.65vw, 23px) clamp(16px, 1.9vw, 27px);
  font-size: clamp(14px, 1.36vw, 19px);
}
.house-facts span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48em;
  padding: 2px .68em;
  white-space: nowrap;
}
.house-facts span + span { border-left: 1px solid var(--line); }
.house-facts .house-room-count { white-space: pre; text-align: left; }
.house-room-count svg { flex-shrink: 0; }
@media (min-width: 501px) {
  .house-facts { min-block-size: calc(2lh + 4px); }
}
.house-button {
  min-width: min(100%, 232px);
  min-height: clamp(44px, 3.65vw, 53px);
  font-size: clamp(16px, 1.52vw, 22px);
}

.location {
  position: relative;
  width: min(calc(100% - 80px), 1352px);
  margin-inline: auto;
  min-height: clamp(216px, 18.9vw, 272px);
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.location-heading { width: 100%; }
.atlas-map { display: none; }
.location h2 {
  position: relative;
  z-index: 1;
  padding: clamp(26px, 3.3vw, 48px) 14px 0;
  font-size: clamp(32px, 3.17vw, 46px);
}
.route {
  position: absolute;
  width: 78%;
  aspect-ratio: 8 / 3;
  right: 0;
  top: 50%;
  transform: translateY(-52%);
  mix-blend-mode: multiply;
}
.route-art {
  width: 100%;
  mask-image: radial-gradient(ellipse 54% 53% at center, #000 57%, transparent 100%);
}
.route-label {
  position: absolute;
  transform: translate(-50%, -100%);
  border-radius: 3px;
  padding: 1px .48em;
  background: #fff5da;
  font-weight: 700;
  font-size: clamp(13px, 1.55vw, 22px);
  white-space: nowrap;
}
.route-label--weremien { left: 14.05%; top: 52%; }
.route-label--lesko { left: 52.66%; top: 52.8%; }
.route-label--jankowce { left: 87.55%; top: 30%; }
.location::before, .location::after {
  position: absolute;
  width: clamp(48px, 7.7vw, 105px);
  height: clamp(74px, 9.4vw, 136px);
  bottom: -18px;
  content: "";
  background: url("public/art/willow.png") left top / contain no-repeat;
  pointer-events: none;
}
.location::before { left: -35px; transform: rotate(145deg); }
.location::after { right: -31px; transform: rotate(215deg) scaleX(-1); }

.site-footer { border-top: 1px solid #b6b699; }
.footer-inner { min-height: clamp(94px, 8.5vw, 122px); }
.footer-inner .brand { width: clamp(144px, 15vw, 219px); }
.footer-inner p { margin-right: auto; padding-left: 28px; border-left: 1px solid var(--line); font-style: italic; }
.footer-inner nav { font-size: 17px; }

@media (max-width: 940px) {
  .page-width { width: calc(100% - 48px); }
  .header-inner, .footer-inner { padding-inline: 0; }
  .hero-inner { padding-left: 38px; }
  .hero-rowan { left: -19px; }
  .hero-skyline { width: 69%; background-size: auto 100%; }
  .village { padding-inline: 10px; }
  .village--weremien .house-grid { gap: 12px; }
  .house h3 { font-size: clamp(20px, 2.95vw, 28px); }
  .house-art img { max-width: 116%; }
  .house-facts span { padding-inline: .38em; gap: .3em; }
  .footer-inner nav { gap: 16px; }
  .footer-inner p { font-size: 14px; padding-left: 16px; }
}
@media (max-width: 740px) {
  .page-width { width: calc(100% - 36px); }
  .main-nav { gap: 14px; font-size: 14px; }
  .main-nav > a[href="#zagroda"], .main-nav > a[href^="mailto:"] { display: none; }
  .book-link { padding-inline: 15px; }
  .hero-inner { padding: 36px 18px 26px; }
  .hero h1 { font-size: clamp(37px, 6.25vw, 48px); }
  .hero-skyline { width: 64%; opacity: .7; }
  .hero-rowan { left: -27px; }
  .properties { grid-template-columns: 1fr; gap: 28px; }
  .village { padding: 0; }
  .village--jankowce { border-left: 0; }
  .house-art { height: clamp(136px, 27vw, 205px); }
  .house-art img { max-width: 108%; }
  .house h3 { font-size: clamp(22px, 4vw, 31px); }
  .house { padding-top: 10px; }
  .house-facts { margin-bottom: 15px; }
  .village--jankowce .house { width: min(100%, 360px); margin-inline: auto; }
  .location { width: calc(100% - 36px); min-height: auto; padding-bottom: 10px; }
  .location h2 { padding-left: 0; }
  .route { position: relative; top: auto; width: 100%; transform: none; margin-top: 10px; }
  .location::before, .location::after { display: none; }
  .footer-inner { flex-wrap: wrap; gap: 10px 22px; padding-block: 14px; }
  .footer-inner nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 0 16px; }
}
@media (max-width: 500px) {
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 4px; padding-block: 8px; }
  .header-inner .brand { width: 155px; }
  .main-nav { width: 100%; justify-content: center; gap: 18px; }
  .house-menu ul { left: -8px; }
  .hero-inner { min-height: 290px; padding: 30px 8px 115px; }
  .hero h1 { font-size: clamp(36px, 9.2vw, 46px); }
  .hero p { font-size: clamp(15px, 4.1vw, 18px); }
  .hero-skyline { inset: auto 0 0 auto; width: 100%; height: 126px; opacity: .96; }
  .hero-rowan { width: 64px; left: auto; right: -10px; transform: none; opacity: .8; }
  .village--weremien .house-grid { grid-template-columns: 1fr; gap: 22px; }
  .village--weremien .house + .house { padding-top: 24px; border-top: 1px solid #a4a58c; }
  .house-art { height: 166px; }
  .house-art img { max-width: 100%; }
  .house h3 { font-size: clamp(25px, 7.1vw, 34px); margin-top: 8px; }
  .house-place { margin-top: 6px; }
  .house-facts { margin-top: 10px; }
  .house-button { min-width: 212px; }
  .route-label { font-size: 12px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-inner p { width: 100%; padding: 0; border-left: 0; }
}

@media (max-width: 360px) {
  .main-nav { gap: 12px; font-size: 13px; }
  .house-facts span { padding-inline: .35em; }
}

@media (min-width: 741px) {
  .hero-inner { padding-top: clamp(43px, 3.54vw, 52px); }
  .hero h1 { letter-spacing: -.044em; }
  .hero p { margin-top: 6px; }

  .hero-skyline {
    top: 0;
    right: max(0px, calc((100% - 1440px) / 2.4));
    bottom: auto;
    /* Fit the painted strip within the hero so its lower fade stays visible. */
    width: auto;
    height: min(100%, calc(100vw * 267 / 1263));
    aspect-ratio: 1263 / 267;
    background: url("reference.png") left 8.98876% / 100% auto no-repeat;
    mask-image: linear-gradient(to right, transparent 37.7%, #000 49% 91%, transparent),
      linear-gradient(to bottom, transparent, #000 12% 72%, transparent);
  }
  .hero-rowan {
    width: 10.69%;
    aspect-ratio: 135 / 119;
    background: url("reference.png") left 7.80834% / 935.556% auto no-repeat;
    transform: none;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 67% 45%, 67% 100%, 0 100%);
    mask-image: linear-gradient(to bottom, #000 85%, transparent);
  }

  .properties { padding-bottom: clamp(34px, 3.17vw, 46px); }
  .village--jankowce { padding-bottom: 15px; }
  .village-name::before, .village-name::after { translate: 0 4px; }
  .village--weremien .village-name::before { flex-grow: 1.05; }
  .village--weremien .house-grid {
    margin-left: clamp(10px, 1.35vw, 20px);
    margin-right: clamp(-29px, -1.98vw, -16px);
  }
  .village--jankowce .house-grid { margin-left: clamp(8px, 1.75vw, 26px); }
  .house-art { overflow-clip-margin: 14px; }
  .house-art img { translate: 0 8px; }
  .village--weremien .house-art--compact img { height: 104%; }
  .village--jankowce .house-art--compact img { height: 108%; }
  .house h3 {
    margin-top: 7px;
    font-size: clamp(21px, 3.16vw, 45px);
    letter-spacing: -.033em;
  }
  .house-place { margin-top: 9px; }
  .house-facts { margin-top: clamp(17px, 1.82vw, 25px); }

  .location {
    width: 100%;
    min-height: 0;
    display: grid;
    border-top: 0;
  }
  .location::before {
    z-index: 1;
    inset: 0 40px auto;
    width: auto;
    height: 1px;
    background: var(--line);
    transform: none;
  }
  .location::after, .location .route { display: none; }
  .location-heading { grid-area: 1 / 1; width: min(calc(100% - 80px), 1352px); }
  .location h2 { padding-top: clamp(32px, 3.37vw, 48px); }
  .atlas-map {
    display: block;
    grid-area: 1 / 1;
    aspect-ratio: 1263 / 228;
    background: url("reference.png") left 88.8998% / 100% auto no-repeat;
    mask-image: linear-gradient(to right, transparent 27.5%, #000 35%),
      linear-gradient(to bottom, #000 12%, transparent 17%, transparent 47.5%, #000 57%);
    mask-composite: add;
  }
}

@media (min-width: 941px) {
  .header-inner { padding-right: clamp(8px, .9vw, 13px); }
  .main-nav { gap: clamp(24px, 3.45vw, 50px); }
  .footer-inner { min-height: clamp(94px, 9.04vw, 130px); padding-left: 16px; gap: 35px; }
  .footer-inner .brand { width: clamp(160px, 17.7vw, 254px); }
  .footer-inner p { padding-left: clamp(24px, 3.72vw, 53px); }
  .footer-inner nav { gap: clamp(20px, 3.77vw, 54px); }
  .house-facts { font-size: clamp(15px, 1.44vw, 21px); margin-bottom: clamp(15px, 1.78vw, 26px); }
}

@media (min-width: 741px) and (max-width: 940px) {
  .hero-inner { min-height: 180px; padding-top: 31px; }
  .hero h1 { font-size: clamp(33px, 4.44vw, 42px); }
  .hero-rowan { left: 0; }
  .main-nav { gap: clamp(12px, 2.5vw, 24px); font-size: 15px; }
  .house-art { height: clamp(140px, 17.9vw, 170px); }
  .house-button { min-width: min(100%, 174px); }
  .location::before { inset-inline: 24px; }
  .location-heading { width: calc(100% - 48px); }
  .location h2 { padding-left: 8px; font-size: clamp(24px, 3.17vw, 30px); }
  .footer-inner p { white-space: normal; }
}

@media (max-width: 500px) {
  .hero-skyline {
    background: url("reference.png") right 8.95% / 161.72% auto no-repeat;
    opacity: 1;
  }
}

.route-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 8px 0 20px;
}
