:root {
  --ink: #26352f;
  --sub: #737a70;
  --paper: #f6f4ee;
  --accent: #b96744;
  --line: rgba(50, 63, 52, 0.18);
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e8e5de;
  overflow: hidden;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #bd744e;
  outline-offset: 5px;
}
button {
  border: 0;
}
a {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
#experience {
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  position: relative;
}
#scene {
  position: absolute;
  inset: 0;
  outline: none;
}
canvas {
  display: block;
  touch-action: none;
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      90deg,
      rgba(238, 235, 227, 0.68),
      transparent 40%
    ),
    linear-gradient(0deg, rgba(237, 235, 227, 0.75), transparent 22%);
  transition: opacity 0.7s;
}
.walking .vignette {
  opacity: 0;
}
.header {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.6%;
  gap: 25px;
  background: linear-gradient(#eeece6d9, #eeece600);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  padding: 0;
  text-align: left;
}
.brand svg {
  width: 38px;
  height: 38px;
}
.brand > span {
  font-family: Manrope, sans-serif;
  letter-spacing: 0.13em;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
}
.brand small {
  display: block;
  font: 600 7px "DM Sans";
  letter-spacing: 0.19em;
  margin-top: 8px;
}
.header-middle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.17em;
}
.header-middle i {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.header-middle > span {
  color: #91958b;
  margin-left: 16px;
}
.header nav {
  display: flex;
  align-items: center;
  gap: 27px;
}
.header nav button {
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  padding: 9px 0;
}
.header nav button span {
  margin-left: 15px;
}
.header nav .contact {
  background: var(--ink);
  color: #f9f8f2;
  padding: 14px 20px;
  border-radius: 3px;
}
.intro {
  position: absolute;
  top: 29%;
  left: 4.5%;
  pointer-events: none;
  transition:
    opacity 0.5s,
    transform 0.5s;
  max-width: 560px;
}
.intro > * {
  pointer-events: auto;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.eyebrow > span {
  height: 5px;
  width: 20px;
  background: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
.intro h1 {
  font:
    500 clamp(32px, 3.35vw, 60px) / 1.15 Manrope,
    sans-serif;
  letter-spacing: -0.055em;
  margin-top: 25px;
}
.intro h1 em {
  font-style: normal;
  color: #7b8773;
}
.intro p {
  font-size: 13px;
  color: #687368;
  line-height: 1.8;
  margin-top: 24px;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 33px;
  background: var(--ink);
  color: #fffdf4;
  padding: 18px 21px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
}
.primary:hover {
  background: #405344;
}
.intro .primary {
  margin-top: 28px;
}
.primary span {
  font-size: 19px;
  line-height: 1;
}
.intro-note {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.14em;
  font-size: 8px;
  margin-top: 35px;
  color: #8b9184;
}
.small-line {
  display: block;
  width: 26px;
  height: 1px;
  background: #a0aa95;
}
.walking .intro,
.panel-open .intro {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}
.walking .intro *,
.panel-open .intro * {
  pointer-events: none;
}
.location {
  position: absolute;
  left: 3.6%;
  top: 130px;
  display: flex;
  gap: 11px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s;
}
.walking .location {
  opacity: 1;
}
.location-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px #f5f2ea80;
}
.location small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.location strong {
  font-size: 12px;
  font-weight: 500;
}
.walking .location,
.walking .scene-actions {
  background: #f6f3ecdf;
  padding: 12px;
  border-radius: 3px;
  backdrop-filter: blur(15px);
}
.scene-actions {
  position: absolute;
  top: 130px;
  right: 3.6%;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 5;
}
.scene-actions button {
  background: #f6f3ebc9;
  border: 1px solid #9fa89755;
  border-radius: 3px;
  height: 35px;
  min-width: 35px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.scene-actions button span {
  font-size: 10px;
  padding-right: 8px;
}
.scene-actions button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.world-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #ffffffb3;
  background: #f9f7f0e8;
  padding: 7px 12px 7px 7px;
  border-radius: 3px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  font-size: 11px;
  box-shadow: 0 4px 25px #18291c15;
  pointer-events: auto;
  transition: opacity 0.2s;
}
.world-label b {
  background: var(--ink);
  color: #fff;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
}
.world-label i {
  font-style: normal;
  font-size: 15px;
  margin-left: 13px;
  color: var(--accent);
}
.world-label:hover {
  background: white;
  box-shadow: 0 6px 30px #18291c30;
}
.world-label.entry b {
  background: var(--accent);
}
.bottom {
  position: absolute;
  bottom: 28px;
  left: 3.6%;
  right: 3.6%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
  z-index: 4;
}
.bottom > * {
  pointer-events: auto;
}
.map-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f6efc9;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffffa6;
  border-radius: 4px;
  padding: 9px 13px 9px 6px;
  text-align: left;
  box-shadow: 0 6px 25px #21301b08;
}
.map-card svg {
  width: 96px;
  height: 66px;
}
.map-card div > span {
  font-size: 8px;
  letter-spacing: 0.13em;
  font-weight: 600;
}
.map-card small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: #838c7b;
}
.map-arrow {
  font-size: 15px;
  align-self: start;
  padding-top: 8px;
}
.navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.mode-switch {
  display: flex;
  padding: 4px;
  background: #f8f6efd9;
  backdrop-filter: blur(15px);
  border-radius: 30px;
  box-shadow: 0 4px 20px #26321f0a;
  border: 1px solid #fff9;
}
.mode-switch button {
  background: transparent;
  padding: 9px 19px;
  border-radius: 22px;
  font-size: 15px;
}
.mode-switch button span {
  font-size: 10px;
  margin-left: 5px;
}
.mode-switch button.active {
  background: var(--ink);
  color: #fff;
}
.service-dock {
  display: flex;
  background: #f8f6efe8;
  backdrop-filter: blur(15px);
  border: 1px solid #fff9;
  box-shadow: 0 4px 35px #28391e0c;
  border-radius: 4px;
  padding: 6px;
}
.service-dock button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  background: none;
  font-size: 10px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.service-dock button:last-child {
  border: 0;
}
.service-dock button > span {
  font-size: 8px;
  color: var(--accent);
}
.service-dock button i {
  font-style: normal;
  color: #87917c;
}
.service-dock button:hover,
.service-dock button.active {
  background: #e6e8df;
}
.scene-caption {
  font-size: 8px;
  text-align: right;
  letter-spacing: 0.15em;
  padding-bottom: 3px;
}
.scene-caption small {
  display: block;
  letter-spacing: 0;
  color: #7b8673;
  font-size: 10px;
  margin-top: 6px;
}
.scene-caption div {
  margin-top: 22px;
  letter-spacing: 0;
  color: #7b8673;
  font-size: 10px;
}
.mouse-icon {
  font-size: 18px;
  margin-right: 7px;
}
.panel {
  position: absolute;
  right: 26px;
  top: 102px;
  bottom: 142px;
  width: 390px;
  z-index: 8;
  background: #f9f7f0ed;
  backdrop-filter: blur(25px);
  border: 1px solid #fff9;
  border-radius: 5px;
  box-shadow: 0 20px 80px #1e281c26;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: panel-in 0.35s ease;
}
.close-panel {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  z-index: 1;
  width: 30px;
  height: 30px;
  background: #eeeae1;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.panel-inner {
  padding: 33px 29px;
}
.panel .eyebrow {
  color: var(--accent);
  font-size: 8px;
}
.panel h2 {
  font: 500 33px/1.15 Manrope;
  letter-spacing: -0.05em;
  margin: 20px 0;
}
.panel .lead {
  font-size: 13px;
  line-height: 1.75;
  color: #626e61;
}
.panel .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 19px 0;
}
.panel .tags span {
  font-size: 9px;
  border: 1px solid #c8cebf;
  padding: 7px 9px;
  border-radius: 20px;
}
.panel-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  margin-top: 25px;
}
.photo-caption {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #7d8976;
  margin: 8px 0 23px;
  gap: 10px;
}
.panel h3 {
  font: 600 14px Manrope;
  margin: 23px 0 10px;
}
.panel p,
.panel li {
  font-size: 12px;
  line-height: 1.75;
  color: #697462;
}
.panel ul {
  padding-left: 17px;
  margin: 10px 0;
}
.panel .primary {
  width: 100%;
  margin-top: 25px;
  font-size: 11px;
}
.panel a {
  font-size: 12px;
  text-underline-offset: 4px;
}
.panel-note {
  font-size: 10px !important;
  border-top: 1px solid var(--line);
  margin-top: 26px !important;
  padding-top: 17px;
}
.project-item {
  margin-bottom: 25px;
}
.project-item .panel-image {
  margin-top: 10px;
}
.project-item h3 {
  margin-bottom: 0;
}
.panel-open .scene-actions {
  opacity: 0;
  pointer-events: none;
}
.walk-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 170px;
  pointer-events: none;
  text-align: center;
  z-index: 2;
}
.walk-hint > div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #f8f7efc9;
  backdrop-filter: blur(12px);
  font-size: 10px;
  color: #56644f;
}
.walk-hint kbd {
  font: 9px "DM Sans";
  padding: 4px 6px;
  border: 1px solid #aeb5a4;
  border-radius: 3px;
}
.walk-hint span {
  margin: 0 5px;
}
.hint-divider {
  height: 13px;
  width: 1px;
  background: #adb8a1;
}
.crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  color: #f8f6ecb3;
  text-shadow: 0 1px 3px #26352f;
  font-size: 18px;
}
.direction-pad {
  position: absolute;
  bottom: 180px;
  left: 30px;
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 5px;
  z-index: 5;
  touch-action: none;
}
.direction-pad button {
  width: 40px;
  height: 40px;
  border: 1px solid #eee9de;
  background: #f8f6efe0;
  border-radius: 5px;
  touch-action: none;
}
.direction-pad button:first-child {
  grid-column: 2;
  grid-row: 1;
}
.direction-pad button:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.direction-pad button:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.direction-pad button:last-child {
  grid-column: 3;
  grid-row: 2;
}
#toast {
  position: absolute;
  left: 50%;
  top: 112px;
  transform: translateX(-50%);
  padding: 11px 18px;
  background: #2d3f34e8;
  color: #fff8ec;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}
#toast.show {
  opacity: 1;
}
#loading {
  position: absolute;
  inset: 0;
  background: #e8e5de;
  z-index: 30;
  display: grid;
  place-content: center;
  text-align: center;
  transition: opacity 0.6s;
}
.loading-brand {
  font: 800 40px Manrope;
  letter-spacing: 0.2em;
}
.loading-brand span {
  display: block;
  font: 500 8px "DM Sans";
  letter-spacing: 0.2em;
  margin: 18px 0;
}
.loading-track {
  height: 2px;
  background: #d2d5c8;
  margin-top: 30px;
  overflow: hidden;
}
.loading-track i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--accent);
  animation: loading 1.4s infinite;
}
#fallback {
  position: absolute;
  inset: 24% 8% auto;
  max-width: 650px;
}
#fallback h1 {
  font: 500 42px Manrope;
}
#fallback p {
  line-height: 1.7;
  margin: 24px 0;
}
#fallback button {
  background: var(--ink);
  color: white;
  padding: 15px;
  margin: 5px;
}
.walking .header {
  background: linear-gradient(#eeece6e8, #eeece650, transparent);
}
.walking .scene-caption {
  background: #f8f6efc9;
  padding: 12px;
  border-radius: 3px;
}
.panel-open .scene-caption {
  visibility: hidden;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes loading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(200%);
  }
}
@media (min-width: 1600px) {
  .intro {
    top: 32%;
  }
  .bottom {
    bottom: 35px;
  }
  .panel {
    width: 430px;
    bottom: 160px;
  }
  .panel-image {
    height: 230px;
  }
}
@media (max-width: 1100px) {
  .header-middle {
    display: none;
  }
  .intro h1 {
    font-size: 37px;
  }
  .map-card div,
  .map-arrow,
  .scene-caption {
    display: none;
  }
  .service-dock button {
    padding: 13px 11px;
    gap: 8px;
  }
  .bottom {
    gap: 10px;
  }
  .intro {
    top: 24%;
  }
  .panel {
    width: 360px;
  }
  .navigation {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 700px) {
  .header {
    height: 78px;
    padding: 0 20px;
  }
  .brand > span {
    font-size: 20px;
  }
  .brand svg {
    width: 30px;
  }
  .brand small {
    font-size: 5.5px;
  }
  .header nav {
    gap: 14px;
  }
  .header nav button {
    font-size: 10px;
  }
  .header nav #about {
    display: none;
  }
  .header nav .contact {
    padding: 10px 12px;
  }
  .header nav .contact span {
    display: none;
  }
  .header nav #projects span {
    margin-left: 3px;
  }
  .intro {
    left: 23px;
    top: 115px;
  }
  .intro h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-top: 15px;
  }
  .intro p {
    font-size: 11px;
    margin-top: 14px;
    line-height: 1.5;
  }
  .intro p br {
    display: none;
  }
  .intro p {
    max-width: 225px;
  }
  .intro .primary {
    padding: 13px 16px;
    margin-top: 18px;
    font-size: 11px;
  }
  .intro-note {
    display: none;
  }
  .eyebrow {
    font-size: 7px;
  }
  .scene-actions {
    top: 88px;
    right: 20px;
    gap: 5px;
  }
  .scene-actions button {
    height: 30px;
    min-width: 30px;
  }
  .scene-actions button span {
    display: none;
  }
  .location {
    top: 93px;
    left: 20px;
  }
  .walking .location {
    padding: 8px 10px;
  }
  .location strong {
    font-size: 10px;
  }
  .location small {
    font-size: 7px;
  }
  .bottom {
    bottom: 16px;
    left: 12px;
    right: 12px;
    justify-content: center;
  }
  .map-card {
    display: none;
  }
  .navigation {
    gap: 10px;
    width: 100%;
  }
  .service-dock {
    width: 100%;
    padding: 3px;
  }
  .service-dock button {
    flex: 1;
    justify-content: center;
    white-space: normal;
    font-size: 9px;
    padding: 12px 5px;
    gap: 6px;
  }
  .service-dock button i {
    display: none;
  }
  .mode-switch button {
    padding: 8px 16px;
  }
  .world-label {
    font-size: 9px;
    padding: 5px 7px 5px 5px;
    gap: 6px;
  }
  .world-label b {
    height: 22px;
    width: 22px;
    font-size: 9px;
  }
  .world-label i {
    margin-left: 3px;
  }
  .panel {
    top: 84px;
    right: 12px;
    left: 12px;
    bottom: 130px;
    width: auto;
    max-width: 430px;
    margin-left: auto;
  }
  .panel-inner {
    padding: 26px 24px;
  }
  .panel h2 {
    font-size: 28px;
    margin: 14px 0;
  }
  .panel-image {
    height: 170px;
  }
  .walk-hint {
    bottom: 142px;
  }
  .walk-hint > div {
    display: none;
  }
  .direction-pad {
    bottom: 145px;
    left: 20px;
  }
  .panel-open .direction-pad,
  .panel-open .walk-hint {
    display: none;
  }
  #toast {
    top: 85px;
    max-width: 90%;
    width: max-content;
    font-size: 10px;
  }
  .walking .scene-actions {
    padding: 5px;
  }
  .vignette {
    background: linear-gradient(180deg, #eeeae3a0, transparent 65%, #eeeae380);
  }
  .panel-open #labels {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (min-width: 701px) {
  .intro h1 em {
    white-space: nowrap;
  }
}
.walking .header-middle {
  visibility: hidden;
}

@media (max-width: 700px) {
  .panel {
    top: auto;
    max-height: 52dvh;
  }
  .panel-open .location {
    display: none;
  }
}

.direction-pad:before {
  content: "PRZYTRZYMAJ STRZAŁKI";
  position: absolute;
  top: -18px;
  left: 0;
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #405343;
  background: #f6f3edc9;
  padding: 2px 5px;
  border-radius: 2px;
}

/* Preserve legibility against the more natural lighting range. */
.evening .header {
  background: linear-gradient(#eff0ebe8, #eff0eb90, transparent);
}
.evening .intro {
  background: #ecece5df;
  padding: 26px;
  border-radius: 4px;
  left: 3%;
}
.evening .scene-caption {
  background: #f5f2e9de;
  padding: 12px;
  border-radius: 3px;
}
.evening .vignette {
  opacity: 0.24;
}
.walking .header {
  background: linear-gradient(#f1eee8ed, #f1eee840, transparent);
}
@media (max-width: 700px) {
  .evening .intro {
    left: 14px;
    padding: 14px;
    max-width: calc(100% - 28px);
  }
}

.source-links {
  display: grid;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #d5d1c6;
  margin-top: 26px;
}
.source-links a,
.project-source {
  font-size: 12px;
  line-height: 1.6;
  text-underline-offset: 4px;
}
.walking .header {
  background: linear-gradient(#eeeae2c9, transparent);
}
.crosshair {
  opacity: 0.2;
}
.panel-open .walk-hint {
  visibility: hidden;
}
.walking .walk-hint > div {
  animation: hint-dismiss 0.8s 10s forwards;
}
@keyframes hint-dismiss {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .walking .walk-hint > div {
    animation: none;
  }
}

/* Guided viewpoints keep the same canvas and replace first-person navigation. */
body.guided #intro,body.guided #featured-project{opacity:0;visibility:hidden;pointer-events:none}
body.guided #walk-hint,body.guided #touch-controls{display:none!important}
body.guided .world-label{display:none}
.mode-switch{max-width:calc(100vw - 28px)}

.outdoor-menu{display:block;margin:8px auto;padding:9px 18px;border:1px solid #acb1a780;background:#f5f3eddd;border-radius:24px;color:#293d34;font:inherit;font-size:11px;cursor:pointer;backdrop-filter:blur(12px)}
.outdoor-card{display:block;width:100%;padding:0;margin:16px 0;border:1px solid #d9d8ce;background:#f3f1e9;text-align:left;cursor:pointer;border-radius:8px;overflow:hidden}.outdoor-card img{width:100%;height:135px;object-fit:cover;display:block}.outdoor-card span{display:block;padding:14px;font-size:14px;color:#293d34}

body.guided .vignette { opacity: 0; }
@media (max-width:700px) {
  body.guided .panel { max-height:34dvh; bottom:204px; }
  body.guided .panel-inner { padding:20px; }
  body.guided .panel-image { height:120px; }
  body.guided .panel h2 { font-size:25px; margin:12px 0; }
}
