/* DANIEL GOL — ABOUT, a room of The Door
   Layered on door.css: same stage, screen, ambilight, bar and glass doors.
   Only what About adds lives here — the screen's picture layers and the open-room panel. */

/* ── Picture layers inside the screen (under the door's shade) ── */
.layers,
.layer,
.slide {
  position: absolute;
  inset: 0;
}

.layers {
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
}

.layer,
.slide {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.layer.is-on,
.slide.is-on {
  opacity: 1;
}

.slide {
  transition-duration: 1s;
}

.layer img,
.layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cover {
  object-fit: cover;
  transform: translateZ(0) scale(1.001);
  transition: transform 1.4s var(--ease);
}

/* the picture's own light fills the screen around it — the picture itself is never cropped */
.fill {
  object-fit: cover;
  filter: blur(42px) saturate(1.5) brightness(0.5);
  transform: scale(1.14);
}

.contain {
  object-fit: contain;
  object-position: 50% 50%;
  transition: object-position 0.8s var(--ease);
}

body:not(.room-open)[data-door]:not([data-door=""]) .layer.is-on .cover {
  transform: translateZ(0) scale(1.025);
}

/* an open room keeps its picture clear of the panel, centred in the space that is left */
body.room-open .layer .contain {
  padding: calc(var(--inset) + 52px) 0 var(--inset) var(--inset);
  width: calc(100% - clamp(300px, 36%, 460px) - var(--inset));
}

/* ── Bar: Sound only where there is a film ── */
.snd {
  display: none !important;
}

body[data-room="sound"] .snd {
  display: inline-flex !important;
}

body[data-room="sound"] span.snd {
  display: block !important;
}

/* ── Doors: the door's kinetic expansion, for About's four rooms ── */
body.ready:not(.room-open)[data-door="about"] .door--about,
body.ready:not(.room-open)[data-door="pizza"] .door--pizza,
body.ready:not(.room-open)[data-door="sound"] .door--sound,
body.ready:not(.room-open)[data-door="links"] .door--links {
  flex-grow: 1.36;
}

body.ready:not(.room-open)[data-door="about"] .door:not(.door--about),
body.ready:not(.room-open)[data-door="pizza"] .door:not(.door--pizza),
body.ready:not(.room-open)[data-door="sound"] .door:not(.door--sound),
body.ready:not(.room-open)[data-door="links"] .door:not(.door--links) {
  flex-grow: 0.88;
  opacity: 0.64;
}

body.room-open .door {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate3d(0, 26px, 0) scale(0.97) !important;
  transition: opacity 0.42s var(--ease), transform 0.48s var(--ease-io) !important;
}

body.room-open .door:nth-child(2) { transition-delay: 0.03s !important; }
body.room-open .door:nth-child(3) { transition-delay: 0.06s !important; }
body.room-open .door:nth-child(4) { transition-delay: 0.09s !important; }

.door--pizza:hover .d-node .btn-icon,
.door--links:hover .d-node .btn-icon {
  transform: rotate(18deg) scale(1.06);
}

.door--sound:hover .d-node .btn-icon {
  transform: translate3d(1px, 0, 0) scale(1.08);
}

.d-node .btn-icon circle,
.d-node .btn-icon rect {
  fill: none;
}

/* ── The open room: one pane of smoked crystal beside its picture ── */
.panel {
  position: absolute;
  z-index: 12;
  top: calc(var(--inset) + 52px);
  right: var(--inset);
  bottom: var(--inset);
  width: clamp(300px, 36%, 460px);
  display: flex;
  flex-direction: column;
  border-radius: var(--card-radius);
  overflow: hidden;
  isolation: isolate;
  user-select: text;
  background: linear-gradient(160deg, rgba(var(--glass-hi-rgb), 0.66) 0%, rgba(var(--glass-lo-rgb), 0.85) 100%);
  -webkit-backdrop-filter: blur(40px) saturate(1.82) brightness(1.03);
  backdrop-filter: blur(40px) saturate(1.82) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(243, 234, 214, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 24px 56px -14px rgba(0, 0, 0, 0.82);
  opacity: 0;
  transform: translate3d(24px, 0, 0);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease-out);
}

body.room-open .panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  transition-delay: 0.12s;
}

/* the door's proximity rim and inner spotlight */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -120px),
    rgba(251, 247, 238, 0.72) 0%, rgba(var(--tone-rgb), 0.44) 36%, rgba(243, 234, 214, 0.09) 74%);
  opacity: 0.78;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(260px 190px at var(--mx, 50%) var(--my, 120%),
    rgba(var(--tone2-rgb), 0.14) 0%, rgba(var(--tone-rgb), 0.12) 42%, transparent 74%);
  opacity: 0.5;
}

.p-aura {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 300px;
  height: 260px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--tone-rgb), 0.3) 0%, rgba(var(--tone2-rgb), 0.13) 45%, transparent 74%);
  filter: blur(30px);
  opacity: 0.6;
}

.p-top,
.p-scroll,
.p-next {
  position: relative;
  z-index: 2;
}

.p-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 4px 12px;
}

.p-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.p-back:hover,
.p-back:focus-visible {
  color: var(--text-primary);
  background: rgba(243, 234, 214, 0.08);
  outline: none;
}

.p-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 20px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 234, 214, 0.18) transparent;
  -webkit-mask: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
  mask: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
}

.p-room {
  display: none;
}

body[data-room="about"] .p-room[data-for="about"],
body[data-room="pizza"] .p-room[data-for="pizza"],
body[data-room="sound"] .p-room[data-for="sound"],
body[data-room="links"] .p-room[data-for="links"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  animation: roomin 0.6s var(--ease-out) both;
}

@keyframes roomin {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}

.p-era {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(243, 234, 214, 0.5);
  margin-bottom: -8px;
}

.p-name {
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}

.p-meta {
  font-size: 12px;
  letter-spacing: -0.01em;
  color: rgba(243, 234, 214, 0.56);
  margin-top: -8px;
}

.p-room p {
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.p-room p.p-lead {
  font-size: clamp(14.5px, 1.15vw, 16px);
  line-height: 1.5;
  letter-spacing: -0.014em;
  color: var(--text-primary);
}

.p-room i {
  color: var(--text-primary);
}

.p-room p.p-cap {
  font-size: 12.5px;
  color: rgba(243, 234, 214, 0.56);
}

.p-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 2px 0;
}

.p-facts dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(243, 234, 214, 0.5);
  margin-bottom: 5px;
}

.p-facts dd {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.p-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.p-thumbs button {
  aspect-ratio: 1;
  border-radius: 7px;
  overflow: hidden;
  opacity: 0.56;
  transition: opacity 0.35s var(--ease), transform 0.38s var(--ease-out);
}

.p-thumbs button.is-on,
.p-thumbs button:hover,
.p-thumbs button:focus-visible {
  opacity: 1;
  outline: none;
}

.p-thumbs button:hover {
  transform: translate3d(0, -1px, 0);
}

.p-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* reel rows, as in Cinema: picture · name · state in words · number */
.p-list {
  display: grid;
  gap: 2px;
  margin: 2px -8px 0;
}

.p-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
  opacity: 0.72;
  transition: opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}

.p-row.is-on,
.p-row:hover,
.p-row:focus-visible {
  opacity: 1;
  background: rgba(243, 234, 214, 0.05);
  outline: none;
}

.p-row img {
  width: 64px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.r-txt {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.r-name {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.016em;
  color: var(--text-primary);
}

.r-sub {
  font-size: 11.5px;
  letter-spacing: -0.006em;
  color: rgba(243, 234, 214, 0.56);
}

.r-nr {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: rgba(243, 234, 214, 0.44);
}

.p-links {
  display: grid;
  gap: 2px;
  margin: 0 -8px;
}

.p-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 8px 9px 10px;
  border-radius: 8px;
  transition: background-color 0.3s var(--ease);
}

.p-links a:hover,
.p-links a:focus-visible {
  background: rgba(243, 234, 214, 0.05);
  outline: none;
}

.p-links a:hover .d-node,
.p-links a:focus-visible .d-node {
  background: #fbf7ee;
  color: #080908;
  transform: translate3d(0, -1px, 0) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 18px rgba(243, 234, 214, 0.22);
}

.p-links a:hover .d-node .btn-icon {
  transform: translate3d(1.5px, -1.5px, 0);
}

.p-next {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 10px;
  padding: 12px 10px;
  border-radius: 8px;
  transition: background-color 0.3s var(--ease);
}

.p-next .r-name {
  flex: 1;
}

.p-next .btn-icon {
  transition: transform 0.38s var(--ease-out);
}

.p-next:hover,
.p-next:focus-visible {
  background: rgba(243, 234, 214, 0.06);
  outline: none;
}

.p-next:hover .btn-icon {
  transform: translate3d(2px, 0, 0);
}

/* ── Phone: the door's mobile screen; an open room fills it as glass ── */
@media (max-width: 720px) {
  .panel {
    top: calc(var(--inset) + 40px);
    left: var(--inset);
    width: auto;
  }
  body.room-open .layer .contain {
    padding: 0;
    width: 100%;
  }
  .p-scroll {
    padding: 8px 16px 16px;
  }
  .p-facts {
    gap: 16px;
  }
  .p-facts dd {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer, .slide, .panel, .p-room {
    transition: none !important;
    animation: none !important;
  }
}
