/* ==========================================================================
   Adigan — project page. Builds on style.css (tokens, hero, sheets, buttons).
   ========================================================================== */

/* ---------- Hero ---------- */
.hero--project .hero__img { object-position: 50% 50%; }
.hero--project .hero__shade { background:
  linear-gradient(180deg, rgba(8, 14, 10, 0.62) 0%, rgba(8, 14, 10, 0) 28%),
  linear-gradient(0deg, rgba(8, 14, 10, 0.9) 0%, rgba(8, 14, 10, 0.5) 40%, rgba(8, 14, 10, 0) 74%),
  radial-gradient(70% 80% at 0% 78%, rgba(8, 14, 10, 0.6), rgba(8, 14, 10, 0) 70%); }
.hero--project .hero__body { padding-bottom: clamp(150px, 22vh, 220px); }
.hero--project .hero__title { max-width: 12em; margin-bottom: 26px; font-size: clamp(2.4rem, min(5.4vw, 9.6vh), 6.2rem); }
.hero--project .hero__eyebrow { gap: 12px; }
.hero--project .hero__eyebrow span { opacity: 0.5; }
.phero__back { color: inherit; text-decoration: none; padding-bottom: 3px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
.phero__back:hover { color: var(--lime); }
.phero__sub { font: 600 clamp(1.1rem, 1.5vw, 1.5rem)/1.2 var(--display); letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.92); }
.hero--project .status { color: #fff; border-color: rgba(255, 255, 255, 0.35); background: rgba(11, 17, 13, 0.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* The hole number sits in the sky, top right, so it never covers the houses lower in the picture. */
.phero__hole { position: absolute; right: var(--gut); top: clamp(112px, 15vh, 150px); text-align: right; color: var(--lime); pointer-events: none; }
.phero__hole small { display: block; margin-bottom: clamp(18px, 2vw, 30px); padding-right: 0.5em; font: 500 0.75rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.9); }
.phero__hole b { display: block; font: 600 clamp(5rem, min(12.5vw, 24vh), 12.5rem)/0.76 var(--display); letter-spacing: -0.07em; font-variant-numeric: tabular-nums; text-shadow: 0 10px 50px rgba(8, 14, 10, 0.35); }

/* ---------- About (sand sheet rising over the hero) ---------- */
.pabout { position: relative; z-index: 1; display: flow-root; margin-top: calc(-1 * var(--shoulder)); padding-bottom: calc(var(--pad) * 0.6 + var(--shoulder)); background: var(--sand); border-radius: var(--shoulder) var(--shoulder) 0 0; }
.factbar { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); margin-top: clamp(-76px, -8vh, -52px); border-radius: var(--r); background: var(--ink); color: #fff; box-shadow: 0 30px 70px -40px rgba(11, 17, 13, 0.7); overflow: hidden; }
.factbar > div { padding: clamp(18px, 2vw, 30px) clamp(16px, 2vw, 30px); border-left: 1px solid rgba(255, 255, 255, 0.1); }
.factbar > div:first-child { border-left: 0; }
.factbar dt { font: 500 0.68rem/1.2 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.factbar dd { margin-top: 10px; font: 600 clamp(1.05rem, 1.55vw, 1.6rem)/1.15 var(--display); letter-spacing: -0.02em; }
.factbar > .is-key dd { color: var(--lime); }
.pabout__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 110px); align-items: start; margin-top: var(--pad); }
.pabout__grid--bare { margin-top: calc(var(--pad) + var(--shoulder)); }
.pabout__lede { margin-top: 24px; font: 600 clamp(1.45rem, 2.5vw, 2.7rem)/1.14 var(--display); letter-spacing: -0.028em; }
.pabout__body { display: grid; gap: 22px; padding-top: 6px; }
.pabout__body > p { max-width: 36em; font-size: 1.08rem; color: var(--text); }
.keys, .near { margin-top: clamp(14px, 2vw, 28px); }
.keys h3, .near h3 { margin-bottom: 6px; font: 500 0.75rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.keys dl > div, .near dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.keys dt, .near dt { color: var(--text); }
.keys dd, .near dd { font: 600 1.05rem/1.2 var(--display); letter-spacing: -0.01em; text-align: right; }

/* ---------- Amenities (ink sheet) ---------- */
.amen { position: relative; z-index: 1; margin-top: calc(-1 * var(--shoulder)); padding-block: var(--pad) calc(var(--pad) + var(--shoulder)); background: var(--ink); color: #fff; border-radius: var(--shoulder) var(--shoulder) 0 0; }
.amen__title { margin-top: 18px; font: 600 clamp(2.2rem, 5vw, 5.2rem)/1 var(--display); letter-spacing: -0.04em; }
.amen__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 56px) clamp(20px, 2.6vw, 44px); margin-top: clamp(40px, 6vw, 88px); }
.amen__item { position: relative; padding-top: 22px; border-top: 1px solid var(--line-light); }
.amen__item::before { content: ""; position: absolute; left: 0; top: -1px; width: 34px; height: 3px; background: var(--lime); transition: width 0.7s var(--ease); }
.amen__item:hover::before { width: 100%; }
.amen__item h3 { font: 600 clamp(1.1rem, 1.35vw, 1.35rem)/1.2 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.amen__item p { margin-top: 12px; font-size: 0.96rem; line-height: 1.6; color: rgba(255, 255, 255, 0.66); }

/* ---------- Media ---------- */
.pmedia { position: relative; z-index: 1; margin-top: calc(-1 * var(--shoulder)); padding-block: var(--pad); background: var(--paper); border-radius: var(--shoulder) var(--shoulder) 0 0; overflow: hidden; }
.pmedia__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 56px); }
.pmedia__title { margin-top: 18px; font: 600 clamp(2rem, 4.2vw, 4.4rem)/1 var(--display); letter-spacing: -0.038em; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--sand); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 999px; font: 600 0.92rem/1 var(--display); text-decoration: none; white-space: nowrap; color: var(--text); transition: background-color 0.35s, color 0.35s; }
.tabs__tab sup { font: 500 0.66rem/1 var(--body); opacity: 0.6; }
.tabs__tab:hover { color: var(--ink); }
.tabs-on .tabs__tab.is-active { background: var(--ink); color: #fff; }
html:not(.tabs-on) .tabs { display: none; }
.pm-panel { margin-top: clamp(40px, 6vw, 80px); }
.pm-panel:first-of-type { margin-top: 0; }
.pm-panel__title { margin-bottom: 22px; font: 600 clamp(1.3rem, 2vw, 1.9rem)/1.1 var(--display); letter-spacing: -0.025em; }
.tabs-on .pm-panel { display: none; margin-top: 0; }
.tabs-on .pm-panel.is-active { display: block; animation: panel-in 0.7s var(--ease); }
.tabs-on .pm-panel__title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes panel-in { from { opacity: 0; transform: translateY(18px); } }

.gal__track { display: flex; gap: clamp(10px, 1.2vw, 18px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-left: max(var(--gut), calc((100vw - var(--max)) / 2)); padding-inline: max(var(--gut), calc((100vw - var(--max)) / 2)); scrollbar-width: none; cursor: grab; }
.gal__track::-webkit-scrollbar { display: none; }
.gal__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gal__track.is-dragging .gal__item { pointer-events: none; }
.gal__item { flex: none; height: min(66vh, 640px); aspect-ratio: var(--ratio, 4 / 3); max-width: 86vw; overflow: hidden; border-radius: var(--r); background: var(--sand); scroll-snap-align: start; cursor: zoom-in; }
.gal__item img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); -webkit-user-drag: none; user-select: none; }
/* A corner badge says "this opens larger". */
.gal__item, .plan__img { position: relative; }
.gal__item::after, .plan__img::after { content: ""; position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(11, 17, 13, 0.62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M9.5 2.5h4v4M13.5 2.5l-4.2 4.2M6.5 13.5h-4v-4M2.5 13.5l4.2-4.2' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color 0.35s, scale 0.5s var(--ease); pointer-events: none; }
@media (hover: hover) { .gal__item:hover::after, .plan__img:hover::after { background-color: var(--ink); scale: 1.1; } }
@media (hover: hover) { .gal__item:hover img { scale: 1.04; } }
.gal__bar { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.gal__count { font: 500 0.82rem/1 var(--body); letter-spacing: 0.1em; color: var(--mute); font-variant-numeric: tabular-nums; }
.gal__count b { color: var(--ink); font-weight: 600; }
.gal__hint { margin-right: auto; font-size: 0.88rem; color: var(--mute); }
.gal__nav { display: inline-flex; gap: 8px; }
.round { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background-color 0.35s, color 0.35s, border-color 0.35s; }
.round svg { width: 16px; height: 16px; }
.round:hover { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.round--light { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.round--light:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.plan__img { display: block; aspect-ratio: 4 / 3; padding: clamp(10px, 1.6vw, 24px); border-radius: var(--r); background: var(--sand); cursor: zoom-in; overflow: hidden; }
.plan__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: scale 0.9s var(--ease); }
@media (hover: hover) { .plan__img:hover img { scale: 1.03; } }
.plan figcaption { margin-top: 12px; font: 600 1rem/1.2 var(--display); }

.std { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.std__side { display: grid; justify-items: start; gap: 14px; }
.std__label { margin-top: 10px; font: 500 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.std__label:first-child { margin-top: 0; }
.std__rooms { display: grid; justify-items: start; gap: 2px; }
.std__room { padding: 4px 0; border: 0; background: none; cursor: pointer; font: 600 clamp(1.6rem, 2.6vw, 2.7rem)/1.08 var(--display); letter-spacing: -0.035em; color: rgba(11, 17, 13, 0.3); text-align: left; transition: color 0.4s; }
.std__room:hover, .std__room.is-active { color: var(--ink); }
.std__variants { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; font: 600 0.9rem/1 var(--display); color: var(--ink); transition: background-color 0.3s, border-color 0.3s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--lime); border-color: var(--lime); }
.std__pdf { margin-top: clamp(14px, 2vw, 28px); }
.std__stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.std__shot { position: relative; overflow: hidden; border-radius: var(--r); background: var(--sand); aspect-ratio: 4 / 3; }
.std__shot img { width: 100%; height: 100%; object-fit: cover; }
.std__shot figcaption { position: absolute; left: 14px; bottom: 14px; padding: 8px 12px; border-radius: 999px; background: rgba(11, 17, 13, 0.6); color: #fff; font: 500 0.7rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* With scripts on, one picture at a time; the chooser swaps it. */
.std.is-live .std__variants { display: none; }
.std.is-live .std__variants.is-active { display: flex; }
.std.is-live .std__stage { display: block; position: relative; aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; overflow: hidden; border-radius: var(--r); background: var(--sand); }
.std.is-live .std__shot { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; visibility: hidden; }
.std.is-live .std__shot.is-active { visibility: visible; }
/* With motion on, pictures stay stacked so a new one can wipe in over the old one.
   The chosen one must be on top from the start; the script raises z-index from 2 upwards. */
html.js .std.is-live .std__shot { visibility: visible; }
html.js .std.is-live .std__shot.is-active { z-index: 1; }
html.js .std.is-live .std__shot figcaption { opacity: 0; transition: opacity 0.4s; }
html.js .std.is-live .std__shot.is-active figcaption { opacity: 1; }
html:not(.js) .std__label, html:not(.js) .std__rooms, .std:not(.is-live) .std__label, .std:not(.is-live) .std__rooms, .std:not(.is-live) .std__variants { display: none; }

.embed { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; max-height: 76vh; width: 100%; overflow: hidden; border-radius: var(--r); background: var(--ink); color: #fff; }
.embed::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 40%, rgba(228, 237, 100, 0.16), transparent 70%), repeating-linear-gradient(-28deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 64px); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__load { position: relative; display: grid; justify-items: center; gap: 10px; padding: 24px; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; }
.embed__ico { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 8px; border-radius: 50%; background: var(--lime); color: var(--ink); transition: scale 0.6s var(--ease); }
.embed__ico .u-wing { width: 34px; }
.embed__load:hover .embed__ico { scale: 1.08; }
.embed__load b { font: 600 clamp(1.3rem, 2vw, 1.9rem)/1.1 var(--display); letter-spacing: -0.025em; }
.embed__load small { font-size: 0.86rem; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.6); }
.embed.is-loaded::before { display: none; }

/* ---------- Location (sand sheet) ---------- */
.ploc { position: relative; z-index: 1; margin-top: calc(-1 * var(--shoulder)); padding-block: var(--pad); background: var(--sand); border-radius: var(--shoulder) var(--shoulder) 0 0; }
.ploc__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.ploc__info { display: grid; justify-items: start; gap: 26px; }
.ploc__title { font: 600 clamp(2rem, 4vw, 4.2rem)/1.02 var(--display); letter-spacing: -0.038em; }
.near { width: 100%; }
.embed--map { aspect-ratio: 4 / 5; max-height: 82vh; position: sticky; top: clamp(90px, 12vh, 120px); }

/* ---------- Next project ---------- */
.pnext { position: relative; z-index: 1; display: block; height: min(72svh, 660px); min-height: 440px; overflow: hidden; background: var(--ink); color: #fff; text-decoration: none; }
.pnext__img { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; transition: scale 1.6s var(--ease); }
@media (hover: hover) { .pnext:hover .pnext__img { scale: 1.04; } }
.pnext__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 14, 10, 0.88), rgba(8, 14, 10, 0.25) 60%, rgba(8, 14, 10, 0.35)); }
.pnext__body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding-bottom: calc(clamp(40px, 7vh, 84px) + var(--shoulder)); }
.pnext__title { margin-top: 20px; max-width: 12em; font: 600 clamp(2.2rem, 5.6vw, 6rem)/0.98 var(--display); letter-spacing: -0.04em; }
.pnext__meta { margin-top: 16px; font-size: 1.05rem; color: rgba(255, 255, 255, 0.8); }
.pnext__go { --hb: #fff; --hc: var(--ink); margin-top: 26px; }
@media (hover: hover) { .pnext:hover .pnext__go { color: var(--hc); } .pnext:hover .pnext__go::before { transform: none; } .pnext:hover .pnext__go .arr { transform: translate(3px, -3px); } }
.pnext__hole { position: absolute; right: var(--gut); bottom: calc(clamp(40px, 7vh, 84px) + var(--shoulder)); font: 600 clamp(6rem, 17vw, 17rem)/0.76 var(--display); letter-spacing: -0.07em; color: var(--lime); }

/* ---------- Full-screen viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 180; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); align-items: center; gap: 0 clamp(8px, 2vw, 28px); padding: clamp(12px, 2vw, 28px); background: rgba(8, 12, 9, 0.985); color: #fff; opacity: 0; transition: opacity 0.35s; }
.lb.is-open { opacity: 1; }
.lb__top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-bottom: clamp(8px, 1.4vw, 18px); }
.lb__count { font: 500 0.82rem/1 var(--body); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.lb__stage { align-self: stretch; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; min-height: 0; }
.lb__img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 12px; align-self: center; background: #fff; }
.lb__cap { padding-top: 14px; min-height: 2.6em; font-size: 0.95rem; color: rgba(255, 255, 255, 0.75); text-align: center; }
.lb.is-single .lb__prev, .lb.is-single .lb__next { visibility: hidden; }
html.lb-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .amen__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .hero--project .hero__body { padding-bottom: clamp(120px, 17vh, 160px); }
  .hero--project .hero__title { font-size: clamp(2.1rem, min(9.4vw, 7.4vh), 4rem); }
  .phero__hole { right: var(--gut); top: clamp(92px, 13vh, 120px); bottom: auto; }
  .phero__hole small { display: none; }
  .phero__hole b { font-size: clamp(4.4rem, 22vw, 7rem); }
  .factbar { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -60px; }
  .factbar > div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .factbar > div:nth-child(-n + 2) { border-top: 0; }
  .factbar > div:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.1); }
  .factbar > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pabout__grid, .std, .ploc__grid { grid-template-columns: 1fr; }
  .gal__item { height: min(52vh, 420px); }
  .gal__hint { display: none; }
  .gal__nav { margin-left: auto; }
  .plans { grid-template-columns: 1fr; }
  .embed--map { position: relative; top: auto; aspect-ratio: 4 / 3; }
  .tabs { flex-wrap: wrap; border-radius: 26px; overflow: visible; }
  /* Viewer on a phone: picture in the middle, both arrows on one row under it. */
  .lb { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top top" "stage stage" "prev next"; gap: 0; background: #080c09; padding-bottom: max(clamp(12px, 2vw, 28px), env(safe-area-inset-bottom, 0px)); }
  .lb__top { grid-area: top; }
  .lb__stage { grid-area: stage; }
  .lb__prev { grid-area: prev; justify-self: start; }
  .lb__next { grid-area: next; justify-self: end; }
  .lb__cap { padding-block: 12px 14px; }
}
@media (max-width: 599px) {
  .amen__grid { grid-template-columns: 1fr; }
  .pnext__hole { display: none; }
}
@media (max-height: 599px) {
  .phero__hole { display: none; }
}
