/* ============================================================
   LEO HOUSE TLV — THE PENTHOUSE
   Add-on components, built on styles.css tokens
   ============================================================ */

/* ---------- key facts strip ---------- */
.ph-facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
.ph-facts .fact {
  padding: clamp(26px, 3vw, 44px) clamp(14px, 1.6vw, 30px);
  border-left: 1px solid var(--line-light);
}
.ph-facts .fact:first-child { border-left: none; }
.ph-facts .fact b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.ph-facts .fact span {
  display: block;
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242,236,224,0.62);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .ph-facts { grid-template-columns: repeat(2, 1fr); }
  .ph-facts .fact:nth-child(odd) { border-left: none; }
  .ph-facts .fact { border-top: 1px solid var(--line-light); }
  .ph-facts .fact:nth-child(-n+2) { border-top: none; }
}
@media (max-width: 540px) { .ph-facts { grid-template-columns: 1fr; } .ph-facts .fact { border-left: none; } }

/* ---------- plan boards ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4px;
}
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-board {
  background: #fbf8f1;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.plan-board .plan-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 3vw, 48px);
  background:
    linear-gradient(#fbf8f1, #fbf8f1) padding-box,
    repeating-linear-gradient(0deg, rgba(21,19,14,0.035) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(21,19,14,0.035) 0 1px, transparent 1px 26px);
}
.plan-board .plan-img img { width: 100%; height: auto; mix-blend-mode: multiply; }
.plan-board .plan-cap {
  border-top: 1px solid var(--line);
  padding: clamp(20px, 2vw, 30px) clamp(22px, 2.4vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.plan-board .plan-cap .ttl { font-family: var(--serif); font-size: clamp(1.3rem, 1.9vw, 1.85rem); line-height: 1.05; }
.plan-board .plan-cap .ttl small { display:block; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--stone); margin-bottom: 8px; }
.plan-board .plan-cap .lvl { font-family: var(--serif); font-size: 2.2rem; color: var(--gold-deep); line-height: 1; }

/* ---------- plan zoom affordance ---------- */
.plan-zoom { position: relative; cursor: zoom-in; }
.plan-zoom .plan-expand {
  position: absolute;
  right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans);
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bone);
  background: rgba(21, 19, 14, 0.82);
  padding: 8px 13px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}
.plan-zoom:hover .plan-expand,
.plan-zoom:focus-visible .plan-expand { opacity: 1; transform: translateY(0); }
.plan-zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- download plans button ---------- */
.plan-pdf-btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease), opacity 0.3s;
}
.plan-pdf-btn:hover { background: var(--ink); color: var(--bone); transform: translateY(-2px); }
.plan-pdf-btn:disabled { opacity: 0.6; cursor: wait; }
.plan-pdf-btn.solid { background: var(--ink); color: var(--bone); }
.plan-pdf-btn.solid:hover { background: var(--gold-deep); }
.plan-pdf-btn .pdf-tag {
  font-size: 0.58rem; letter-spacing: 0.14em;
  border: 1px solid currentColor; border-radius: 3px;
  padding: 2px 6px; opacity: 0.8;
}
.plan-pdf-btn .pdf-arrow { font-size: 0.95rem; letter-spacing: 0; }

/* ---------- plan lightbox ---------- */
.plan-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 5vw, 70px);
  background: rgba(21, 19, 14, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 0.36s var(--ease);
}
.plan-modal.open { opacity: 1; }
.plan-modal[hidden] { display: none; }
.plan-modal-inner {
  width: min(1000px, 100%);
  max-height: 100%;
  display: flex; flex-direction: column;
  transform: translateY(10px) scale(0.99);
  transition: transform 0.4s var(--ease);
}
.plan-modal.open .plan-modal-inner { transform: none; }
.plan-modal-board {
  background: #fbf8f1;
  border: 1px solid var(--line-light);
  padding: clamp(16px, 3vw, 40px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: 1; min-height: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(21,19,14,0.035) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(21,19,14,0.035) 0 1px, transparent 1px 26px);
}
.plan-modal-board img {
  max-width: 100%; max-height: 74svh;
  width: auto; height: auto; object-fit: contain;
  mix-blend-mode: multiply; display: block;
}
.plan-modal-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: var(--bone);
  padding: 18px clamp(18px, 2.4vw, 30px);
}
.plan-modal-ttl {
  font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  color: var(--ink); display: flex; align-items: baseline; gap: 14px;
}
.plan-modal-ttl .idx {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold-deep);
}
.plan-modal-close {
  position: absolute; top: clamp(16px, 3vw, 30px); right: clamp(16px, 3vw, 34px);
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(242,236,224,0.4); background: transparent;
  color: var(--bone); font-size: 1.6rem; line-height: 1;
  cursor: pointer; z-index: 3;
  transition: background 0.3s, transform 0.3s;
}
.plan-modal-close:hover { background: rgba(242,236,224,0.14); transform: rotate(90deg); }
.plan-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(242,236,224,0.35); background: rgba(21,19,14,0.35);
  color: var(--bone); font-size: 1.7rem; line-height: 1;
  cursor: pointer; z-index: 3;
  transition: background 0.3s, border-color 0.3s;
}
.plan-nav:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.plan-nav.prev { left: clamp(10px, 2vw, 26px); }
.plan-nav.next { right: clamp(10px, 2vw, 26px); }
@media (max-width: 640px) {
  .plan-nav { width: 44px; height: 44px; font-size: 1.4rem; }
  .plan-modal-bar { justify-content: center; text-align: center; }
}

/* legend chips */
.plan-legend { display: flex; flex-wrap: wrap; gap: 8px 8px; margin-top: 2px; }
.plan-legend .lg { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 100px; padding: 7px 13px; display: inline-flex; gap: 8px; align-items: center; }
.plan-legend .lg::before { content: ''; width: 6px; height: 6px; background: var(--gold-deep); border-radius: 50%; }

/* ---------- duo / split gallery rows ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.duo.uneven { grid-template-columns: 1.5fr 1fr; }
.duo.uneven.rev { grid-template-columns: 1fr 1.5fr; }
.duo figure { position: relative; overflow: hidden; background: var(--ink-2); }
.duo figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); display: block; }
.duo figure:hover img { transform: scale(1.05); }
.duo figcaption { position: absolute; left: 22px; bottom: 18px; color: var(--bone); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; text-shadow: 0 1px 14px rgba(0,0,0,0.6); z-index: 2; }
.duo figure::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 50%); pointer-events: none; }
.duo .h-tall img { height: clamp(420px, 64svh, 760px); }
.duo .h-med img { height: clamp(360px, 52svh, 620px); }
@media (max-width: 760px) {
  .duo, .duo.uneven, .duo.uneven.rev { grid-template-columns: 1fr; }
  .duo .h-tall img, .duo .h-med img { height: 56svh; }
}

/* ---------- curated brands ---------- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}
.brand-grid .bx {
  background: var(--ink);
  padding: clamp(22px, 2.4vw, 36px) clamp(18px, 2vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 128px;
  justify-content: center;
}
.brand-grid .bx .nm { font-family: var(--serif); font-size: clamp(1.15rem, 1.5vw, 1.5rem); letter-spacing: 0.01em; }
.brand-grid .bx .cat { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--taupe); }
@media (max-width: 900px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .brand-grid { grid-template-columns: 1fr; } }

/* ---------- building & technology amenities ---------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(30px, 4vw, 56px);
  background: var(--line);
  border: 1px solid var(--line);
}
.amenity-grid .am {
  background: var(--bone);
  padding: clamp(26px, 2.8vw, 40px) clamp(22px, 2.4vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: clamp(150px, 15vw, 190px);
}
.amenity-grid .am .am-idx {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.amenity-grid .am .am-nm {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  line-height: 1.1;
  color: var(--ink);
  margin-top: auto;
}
.amenity-grid .am .am-cat {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
}
@media (max-width: 900px) { .amenity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .amenity-grid { grid-template-columns: 1fr; } }

/* ---------- back link ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--taupe);
  transition: gap 0.4s var(--ease), color 0.3s;
}
.back-link:hover { gap: 18px; color: var(--gold); }

/* tri gallery for suite */
.tri { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.tri figure { position: relative; overflow: hidden; background: var(--ink-2); }
.tri figure img { width: 100%; height: clamp(340px, 50svh, 600px); object-fit: cover; transition: transform 1.2s var(--ease); }
.tri figure:hover img { transform: scale(1.05); }
.tri figcaption { position: absolute; left: 18px; bottom: 16px; color: var(--bone); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; text-shadow: 0 1px 14px rgba(0,0,0,0.6); z-index:2; }
.tri figure::after { content:''; position:absolute; inset:0; background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 48%); pointer-events:none; }
@media (max-width: 760px) { .tri { grid-template-columns: 1fr; } }

/* ---------- ambience / background music control ---------- */
.ambience {
  position: fixed;
  right: clamp(18px, 2.4vw, 38px);
  bottom: clamp(18px, 2.4vw, 38px);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  background: rgba(242, 236, 224, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  box-shadow: 0 10px 34px rgba(21, 19, 14, 0.18);
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
              border-color 0.45s var(--ease), box-shadow 0.45s var(--ease),
              opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.ambience[hidden] { display: none; }
/* entrance */
.ambience.is-ready { opacity: 1; transform: translateY(0); }
.ambience:not(.is-ready) { opacity: 0; transform: translateY(14px); }
.ambience:hover { box-shadow: 0 14px 40px rgba(21, 19, 14, 0.26); }

/* equalizer */
.ambience .eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; width: 18px; }
.ambience .eq span {
  flex: 1;
  background: var(--ink);
  border-radius: 2px;
  height: 30%;
  transform-origin: bottom;
  transition: background 0.45s var(--ease);
}
.ambience.playing { background: var(--gold); border-color: var(--gold); }
.ambience.playing .eq span { background: var(--ink); animation: eqbar 1s var(--ease) infinite; }
.ambience.playing .eq span:nth-child(1) { animation-delay: -0.8s; }
.ambience.playing .eq span:nth-child(2) { animation-delay: -0.35s; }
.ambience.playing .eq span:nth-child(3) { animation-delay: -0.6s; }
.ambience.playing .eq span:nth-child(4) { animation-delay: -0.1s; }
/* paused: static low bars */
.ambience:not(.playing) .eq span:nth-child(1) { height: 40%; }
.ambience:not(.playing) .eq span:nth-child(2) { height: 70%; }
.ambience:not(.playing) .eq span:nth-child(3) { height: 30%; }
.ambience:not(.playing) .eq span:nth-child(4) { height: 55%; }
@keyframes eqbar {
  0%, 100% { height: 22%; }
  20% { height: 90%; }
  45% { height: 45%; }
  70% { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ambience.playing .eq span { animation: none; height: 60%; }
}

.ambience .eq-label {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.ambience .eq-label .lab {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}
.ambience .eq-label .state {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.ambience.playing .eq-label .lab { opacity: 0.7; }

@media (max-width: 600px) {
  .ambience { padding: 10px; gap: 0; }
  .ambience .eq-label { display: none; }
}
