/* =========================================================
   Home — matches pstr.be home page
   - fixed name block top-left, menu opens on hover
   - column of hand-drawn plans that scrolls normally
   - hover a drawing: grey square, then the photo + code/title/type
   ========================================================= */
:root {
  --hm-ink: #1d1d1f;
  --hm-grey: #8d8d8d;
  --hm-nav: #4a4a4a;
  --hm-bg: #ffffff;
  --hm-sq: #ececec;
  --hm-font: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --hm-box: clamp(230px, 27vw, 430px);
}
html, body.hm { background: var(--hm-bg); }
body.hm { font-family: var(--hm-font); color: var(--hm-ink); margin: 0; -webkit-font-smoothing: antialiased; }
body.hm a { color: inherit; text-decoration: none; }

/* ---------- fixed name + hover menu ---------- */
.hm-side {
  position: fixed; top: clamp(18px, 3.4vw, 46px); left: clamp(16px, 2.2vw, 34px); z-index: 20;
  padding: 0 40px 40px 0; /* hover area */
}
.hm-name { display: block; font-weight: 300; line-height: 1.08; }
.hm-name .n1 { display: block; font-size: clamp(1.5rem, 2.9vw, 2.75rem); letter-spacing: .01em; text-transform: uppercase; color: var(--hm-ink); }
.hm-name .n2 { display: none; font-size: clamp(1.4rem, 2.6vw, 2.45rem); color: var(--hm-grey); margin-top: 2px; }
.hm-nav { list-style: none; margin: clamp(28px, 4.5vw, 64px) 0 0; padding: 0; visibility: hidden; }
.hm-nav li { overflow: hidden; }
.hm-nav a {
  display: inline-block; font-size: clamp(1.1rem, 1.75vw, 1.6rem); font-weight: 300; text-transform: uppercase; color: var(--hm-nav);
  letter-spacing: .01em; padding: clamp(9px, 1.25vw, 17px) 0; transform: translateY(-14px); opacity: 0;
  transition: opacity .35s ease, transform .45s cubic-bezier(.22,.8,.2,1), color .25s;
}
.hm-nav a:hover { color: var(--hm-ink); }
.hm-nav a.lang { font-weight: 500; }
.hm-side:hover .hm-nav, .hm-side:focus-within .hm-nav, .hm-side.open .hm-nav { visibility: visible; }
.hm-side:hover .hm-nav a, .hm-side:focus-within .hm-nav a, .hm-side.open .hm-nav a { opacity: 1; transform: none; }
.hm-nav li:nth-child(2) a { transition-delay: .03s; } .hm-nav li:nth-child(3) a { transition-delay: .06s; }
.hm-nav li:nth-child(4) a { transition-delay: .09s; } .hm-nav li:nth-child(5) a { transition-delay: .12s; }
.hm-nav li:nth-child(6) a { transition-delay: .15s; } .hm-nav li:nth-child(7) a { transition-delay: .18s; }
/* the drawings fade back a little while the menu is open so the menu reads clearly */
.hm-side:hover ~ .hm-col, .hm-side.open ~ .hm-col { opacity: .35; }
.hm-col { transition: opacity .4s ease; }

/* ---------- column of drawings ---------- */
.hm-col {
  list-style: none; margin: 0; padding: 22vh 0 30vh; display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(70px, 13vh, 160px); padding-left: 50vw;
}
.hm-item { position: relative; }
.hm-item:nth-child(4n+2) { margin-left: 2.5vw; }
.hm-item:nth-child(4n+3) { margin-left: -1.5vw; }
.hm-item:nth-child(4n+4) { margin-left: 1vw; }
.pi { display: block; position: relative; width: var(--hm-box); height: var(--hm-box); outline: none; }
.pi-bg { position: absolute; inset: 0; background: var(--hm-sq); opacity: 0; transition: opacity .25s ease .05s; }
.pi-sketch {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: multiply; filter: grayscale(1) contrast(1.15);
  transition: opacity .3s ease;
}
.pi-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .35s ease 0s;
}
.pi-info {
  position: absolute; left: calc(100% + 12px); bottom: 2px; width: max-content; max-width: 26vw;
  font-size: clamp(.78rem, .95vw, .9rem); line-height: 1.35; color: var(--hm-grey); font-weight: 400;
  opacity: 0; transform: translateX(-6px); transition: opacity .3s ease, transform .4s cubic-bezier(.22,.8,.2,1);
}
.pi-info .c { display: block; color: var(--hm-ink); margin-bottom: 10px; letter-spacing: .02em; }

/* hover / focus / tapped */
.pi:hover .pi-bg, .pi:focus-visible .pi-bg, .pi.on .pi-bg { opacity: 1; transition-delay: 0s; }
.pi:hover .pi-photo, .pi:focus-visible .pi-photo, .pi.on .pi-photo { opacity: 1; transition-delay: .22s; }
.pi:hover .pi-sketch, .pi:focus-visible .pi-sketch, .pi.on .pi-sketch { opacity: 0; transition-delay: .22s; }
.pi:hover .pi-info, .pi:focus-visible .pi-info, .pi.on .pi-info { opacity: 1; transform: none; transition-delay: .25s; }

/* drawings appear softly while scrolling */
.hm-item { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.22,.8,.2,1); }
.hm-item.in { opacity: 1; transform: none; }

/* ---------- tablet / mobile ---------- */
@media (max-width: 991.98px) {
  :root { --hm-box: min(56vw, 360px); }
  .hm-col { padding-left: 34vw; padding-top: 26vh; }
  .pi-info { max-width: 30vw; }
}
@media (max-width: 640px) {
  :root { --hm-box: 62vw; }
  .hm-side { position: fixed; left: 0; right: 0; top: 0; padding: 16px 16px 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); }
  .hm-name .n1 { font-size: 1.32rem; }
  .hm-name .n2 { font-size: 1.15rem; }
  .hm-nav { margin-top: 14px; max-height: 0; overflow: hidden; transition: max-height .5s ease; }
  .hm-side.open .hm-nav { max-height: 420px; }
  .hm-side:hover:not(.open) .hm-nav { visibility: hidden; }
  .hm-side:hover:not(.open) .hm-nav a { opacity: 0; }
  .hm-side:hover:not(.open) ~ .hm-col { opacity: 1; }
  .hm-nav a { font-size: 1.05rem; padding: 9px 0; }
  .hm-toggle { position: absolute; right: 16px; top: 22px; width: 30px; height: 22px; border: 0; background: transparent; padding: 0; }
  .hm-toggle span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--hm-ink); transition: transform .35s, top .35s; }
  .hm-toggle span:nth-child(1) { top: 6px; } .hm-toggle span:nth-child(2) { top: 15px; }
  .hm-side.open .hm-toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
  .hm-side.open .hm-toggle span:nth-child(2) { top: 10px; transform: rotate(-45deg); }
  .hm-col { padding: 140px 0 22vh; align-items: center; gap: 90px; }
  .hm-item, .hm-item:nth-child(n) { margin-left: 0; left: -14vw; }
  .pi-info { left: calc(100% + 10px); max-width: 32vw; font-size: .74rem; }
}
@media (min-width: 641px) { .hm-toggle { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hm-item { opacity: 1; transform: none; transition: none; }
  .hm-nav a { transform: none; }
}
@media (max-width: 640px) {
  .hm-item, .hm-item:nth-child(n) { left: 0; }
  .pi-info { left: 0; top: calc(100% + 10px); bottom: auto; max-width: none; transform: translateY(-6px); }
  .pi-info .c { display: inline; margin: 0 8px 0 0; }
  .hm-col { gap: 110px; }
}

/* Logo */
.hm-logo { display: block; width: 12vw; min-width: 130px; max-width: 200px; height: auto; margin-bottom: 8px; }
@media (max-width: 767.98px) { .hm-logo { width: 140px; } }

/* Tablets: caption under the image (no room beside it) */
@media (min-width: 641px) and (max-width: 991.98px) {
  .pi-info { left: 0; top: calc(100% + 10px); bottom: auto; max-width: none; transform: translateY(-6px); }
  .pi-info .c { display: inline; margin: 0 8px 0 0; }
  .hm-col { gap: clamp(110px, 16vh, 170px); }
}
/* Small laptops: move the column left so the caption fits beside the image */
@media (min-width: 992px) and (max-width: 1279.98px) {
  .hm-col { padding-left: 42vw; }
  .pi-info { max-width: calc(58vw - var(--hm-box) - 2.5vw - 40px); }
}

/* No projects yet */
.hm-empty { list-style: none; max-width: 420px; color: var(--hm-grey); font-size: 1.2rem; line-height: 1.5; }
.hm-empty a { color: var(--hm-ink); }
.ios-admin-hint { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; max-width: calc(100vw - 32px); padding: 14px 20px; background: #151515; color: #f5f3ee; font: 500 14px/1.45 system-ui, sans-serif; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.ios-admin-hint a, .ios-admin-hint a:visited { color: #f1c9b6 !important; text-decoration: underline !important; }
