/* Autumn Roosts / visual prototype 01 */

.page-roosting{
  --roost-night: #17151d;
  --roost-night-soft: #24212b;
  --roost-land: #34313b;
  --roost-land-focus: #5e5868;
  --roost-panel: #a94f36;
  --roost-panel-ink: #1d1110;
  --roost-cream: #f1e8d8;
  --roost-muted: rgba(241, 232, 216, .64);
  --roost-border: rgba(241, 232, 216, .18);
  --roost-standardized: #f0a85b;
  --roost-historical: #db7b73;
  --roost-context: #9aa9c8;
  --roost-river: #7ca5b2;
  --roost-header-h: 62px;

  margin: 0;
  color: var(--roost-cream);
  background: var(--roost-night);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.page-roosting .sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.roosting-skip-link{
  position: fixed;
  top: 10px;
  left: -9999px;
  z-index: 500;
  padding: 10px 14px;
  color: var(--roost-night);
  background: var(--roost-cream);
}

.roosting-skip-link:focus{ left: 10px; }

.page-roosting .site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--roost-header-h);
  color: var(--roost-cream);
  background: linear-gradient(90deg, var(--roost-panel) 0 320px, rgba(23, 21, 29, .94) 320px 100%);
  border-bottom: 1px solid var(--roost-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.page-roosting .site-header__inner{
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: 100%;
  padding: 10px 16px;
}

.page-roosting .site-header__brand{
  display: inline-flex;
  align-items: center;
  color: var(--roost-panel-ink);
  text-decoration: none;
}

.page-roosting .site-header__brandmark{
  display: block;
  width: 154px;
  height: 34px;
  background: currentColor;
  -webkit-mask: url("/assets/shared/icons/falcopolis-H-600.svg") center / contain no-repeat;
  mask: url("/assets/shared/icons/falcopolis-H-600.svg") center / contain no-repeat;
}

.page-roosting .site-header__brandtext{ display: none; }

.page-roosting .site-header__nav{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.page-roosting .site-header__link,
.page-roosting .site-header__back{
  color: var(--roost-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  border-radius: 999px;
}

.page-roosting .site-header__link{ padding: 8px 10px; }

.page-roosting .site-header__link:hover,
.page-roosting .site-header__link.is-current,
.page-roosting .site-header__link[aria-current="page"]{
  color: var(--roost-cream);
  background: rgba(241, 232, 216, .1);
}

.page-roosting .site-header__right{ display: flex; justify-content: flex-end; }

.page-roosting .site-header__back{
  padding: 9px 12px;
  border: 1px solid var(--roost-border);
}

.roosting-shell{
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - var(--roost-header-h));
}

.roosting-intro{
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-height: calc(100vh - var(--roost-header-h));
  padding: 28px 22px 18px;
  color: var(--roost-panel-ink);
  background: var(--roost-panel);
  border-right: 1px solid rgba(29, 17, 16, .2);
}

.roosting-intro__parent{
  color: currentColor;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .13em;
}

.roosting-intro__title{
  margin: 12px 0 14px;
  font-size: clamp(42px, 4vw, 62px);
  line-height: .82;
  letter-spacing: -.065em;
}

.roosting-intro__lede{
  max-width: 28ch;
  margin: 0;
  color: rgba(29, 17, 16, .73);
  font-size: 12.5px;
  line-height: 1.45;
}

.roosting-regions{
  align-self: start;
  border-top: 1px solid rgba(29, 17, 16, .26);
}

.roosting-region{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 10px;
  width: 100%;
  padding: 12px 0;
  color: rgba(29, 17, 16, .52);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(29, 17, 16, .26);
  cursor: pointer;
}

.roosting-region:hover,
.roosting-region.is-active{ color: var(--roost-panel-ink); }

.roosting-region > span{
  grid-row: 1 / span 2;
  padding-top: 2px;
  font-size: 9px;
  letter-spacing: .08em;
}

.roosting-region strong{ font-size: 13px; }
.roosting-region small{ font-size: 9px; opacity: .74; }

.roosting-intro__note{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-top: 1px solid rgba(29, 17, 16, .22);
}

.roosting-map-panel{
  display: grid;
  grid-template-rows: minmax(520px, 1fr) auto;
  min-width: 0;
  min-height: calc(100vh - var(--roost-header-h));
  background: var(--roost-night);
}

.roosting-map{
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 55%, rgba(169, 79, 54, .08), transparent 30%),
    var(--roost-night);
}

.roosting-map__svg{ display: block; width: 100%; height: 100%; min-height: 520px; }

.roosting-map__status{
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  color: var(--roost-muted);
  font-size: 12px;
}

.roosting-map__status[hidden]{ display: none; }

.roosting-graticule{
  fill: none;
  stroke: rgba(241, 232, 216, .07);
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}

.roosting-country{
  fill: var(--roost-land);
  stroke: var(--roost-night);
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
}

.roosting-country.is-dimmed{ opacity: .55; }
.roosting-country.is-focus{ fill: var(--roost-land-focus); opacity: 1; }

.roosting-hungary-land{
  fill: var(--roost-land-focus);
  stroke: var(--roost-cream);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.roosting-river{
  fill: none;
  stroke: var(--roost-river);
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .62;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.roosting-river.is-major{
  stroke-width: 2;
  opacity: .9;
}

.roosting-country-label{
  fill: var(--roost-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  text-anchor: middle;
  text-transform: uppercase;
  pointer-events: none;
}

.roosting-marker,
.roosting-site{ cursor: pointer; }
.roosting-marker circle,
.roosting-marker path,
.roosting-site circle{
  vector-effect: non-scaling-stroke;
  transition: transform 180ms ease, opacity 180ms ease;
}

.roosting-marker.is-standardized circle{
  fill: var(--roost-standardized);
  stroke: var(--roost-night);
  stroke-width: 1.5;
}

.roosting-grove line{
  stroke: var(--roost-cream);
  stroke-width: 2;
  stroke-linecap: round;
}

.roosting-marker.is-historical path{
  fill: var(--roost-historical);
  stroke: var(--roost-cream);
  stroke-width: 1;
}

.roosting-marker.is-context circle{
  fill: var(--roost-night);
  stroke: var(--roost-context);
  stroke-width: 2.5;
}

.roosting-marker.is-selected circle,
.roosting-marker.is-selected path{ stroke: var(--roost-cream); stroke-width: 2.5; }

.roosting-site circle{
  fill: rgba(217, 151, 42, .46);
  stroke: var(--roost-standardized);
  stroke-width: 2;
}

.roosting-site-leader{
  stroke: var(--roost-standardized);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: .72;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.roosting-site:hover circle{ transform: scale(1.14); }

.roosting-site.is-muted{ pointer-events: none; }

.roosting-site.is-selected circle{
  fill: var(--roost-standardized);
  stroke: var(--roost-cream);
  stroke-width: 2.6;
}

.roosting-site-label{
  fill: var(--roost-cream);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .035em;
  paint-order: stroke;
  stroke: var(--roost-night);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.roosting-marker-label{
  fill: var(--roost-cream);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  paint-order: stroke;
  stroke: var(--roost-night);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.roosting-points{ pointer-events: none; }

.roosting-dot{
  fill: var(--roost-cream);
  stroke: rgba(23, 21, 29, .4);
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}

.roosting-map[data-phase="peak"] .roosting-dot{
  fill: var(--roost-standardized);
  stroke: rgba(23, 21, 29, .55);
}

.roosting-layers{
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 6;
  display: grid;
  gap: 8px;
  min-width: 225px;
  margin: 0;
  padding: 12px 14px 13px;
  color: var(--roost-cream);
  background: rgba(23, 21, 29, .86);
  border: 1px solid var(--roost-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.roosting-layers[hidden],
.roosting-timeline[hidden]{ display: none; }

.roosting-layers legend{
  padding: 0 4px;
  color: var(--roost-muted);
  font-size: 9px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.roosting-layers label{
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.roosting-layers input{
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--roost-standardized);
}

.roosting-layers span,
.roosting-map__legend span{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.roosting-layers i,
.roosting-map__legend i{ display: block; width: 13px; height: 8px; box-sizing: border-box; }
.roosting-layers i.is-standardized,
.roosting-map__legend i.is-standardized{ background: var(--roost-standardized); border-radius: 50%; }
.roosting-layers i.is-historical,
.roosting-map__legend i.is-historical{ background: var(--roost-historical); transform: rotate(45deg) scale(.72); }
.roosting-layers i.is-context,
.roosting-map__legend i.is-context{ background: transparent; border: 2px solid var(--roost-context); border-radius: 50%; }
.roosting-map__legend i.is-dot{
  width: 8px;
  height: 8px;
  margin-inline: 2px 3px;
  background: var(--roost-cream);
  border: 1px solid rgba(23, 21, 29, .4);
  border-radius: 50%;
}
.roosting-map__legend i.is-major{
  width: 11px;
  height: 11px;
  background: rgba(217, 151, 42, .46);
  border: 2px solid var(--roost-standardized);
  border-radius: 50%;
}
.roosting-map__legend i.is-river{
  height: 2px;
  background: var(--roost-river);
  border-radius: 999px;
}
.roosting-map__legend i.is-map{ background: var(--roost-land); }

.roosting-map__scale{
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  justify-items: end;
  gap: 3px;
  pointer-events: none;
}

.roosting-map__scale span{ color: var(--roost-muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.roosting-map__scale strong{ font-size: 13px; font-weight: 500; }

.roosting-map__detail{
  position: absolute;
  left: 22px;
  bottom: 28px;
  z-index: 4;
  display: grid;
  max-width: 430px;
  gap: 6px;
  padding-left: 15px;
  border-left: 2px solid var(--roost-standardized);
}

.roosting-map__index{ color: var(--roost-standardized); font-size: 10px; letter-spacing: .12em; }
.roosting-map__detail strong{ font-size: clamp(22px, 2.8vw, 38px); font-weight: 500; letter-spacing: -.035em; }
.roosting-map__detail p{ max-width: 52ch; margin: 0; color: var(--roost-muted); font-size: 12px; line-height: 1.45; }
.roosting-map__detail a{ width: max-content; color: var(--roost-cream); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }

.roosting-map__legend{
  position: absolute;
  right: 22px;
  bottom: 28px;
  display: grid;
  gap: 7px;
  color: var(--roost-muted);
}

.roosting-timeline{
  display: grid;
  grid-template-columns: auto 190px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  background: var(--roost-night-soft);
  border-top: 1px solid var(--roost-border);
}

.roosting-play{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 178px;
  padding: 11px 14px;
  color: var(--roost-night);
  background: var(--roost-standardized);
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

.roosting-play:hover{ background: var(--roost-cream); }
.roosting-play:focus-visible{ outline: 2px solid var(--roost-cream); outline-offset: 3px; }

.roosting-timeline__reading{ display: grid; gap: 2px; }
.roosting-timeline__reading span{ color: var(--roost-standardized); font-size: 11px; letter-spacing: .08em; }
.roosting-timeline__reading strong{ font-size: 13px; font-weight: 500; }
.roosting-timeline__reading em{ color: var(--roost-muted); font-size: 10px; font-style: normal; }
.roosting-progress input{ width: 100%; accent-color: var(--roost-standardized); }
.roosting-timeline__note{ color: var(--roost-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }

.roosting-source{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 20px 24px;
  color: var(--roost-muted);
  background: var(--roost-night-soft);
  border-top: 1px solid var(--roost-border);
}

.roosting-source p{ max-width: 92ch; margin: 0; font-size: 11px; line-height: 1.5; }
.roosting-source a{ color: var(--roost-cream); }

@media (max-width: 980px){
  .page-roosting .site-header{ height: auto; min-height: var(--roost-header-h); background: rgba(23, 21, 29, .96); }
  .page-roosting .site-header__brandmark{ width: 94px; }
  .page-roosting .site-header__nav{ display: none; }
  .roosting-shell{ grid-template-columns: 1fr; }
  .roosting-intro{ min-height: auto; padding: 24px 18px 18px; }
  .roosting-intro__title{ font-size: clamp(42px, 12vw, 70px); }
  .roosting-regions{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roosting-region:nth-child(odd){ padding-right: 12px; }
  .roosting-region:nth-child(even){ padding-left: 12px; border-left: 1px solid rgba(29, 17, 16, .26); }
  .roosting-source{ grid-template-columns: 1fr; }
  .roosting-timeline{ grid-template-columns: auto 190px minmax(150px, 1fr); }
  .roosting-timeline__note{ grid-column: 1 / -1; }
}

@media (max-width: 680px){
  .roosting-regions{ grid-template-columns: 1fr; }
  .roosting-region:nth-child(odd),
  .roosting-region:nth-child(even){ padding-left: 0; padding-right: 0; border-left: 0; }
  .roosting-map__scale,
  .roosting-map__legend{ display: none; }
  .roosting-layers{ top: 14px; left: 14px; min-width: 0; }
  .roosting-map__detail{ right: 18px; left: 18px; bottom: 20px; }
  .roosting-timeline{ grid-template-columns: 1fr; gap: 10px; }
  .roosting-play{ width: 100%; }
}

@media (prefers-reduced-motion: reduce){
  .roosting-marker circle,
  .roosting-marker path{ transition: none; }
}
