/* Project detail pages share the same opening, gallery and plan rail. */
.thea-panorama {
  --hero-ink: #11273b;
  isolation: isolate; position: relative; display: grid;
  min-height: clamp(29rem, min(69svh, 49vw), 50rem);
  background: var(--hero-ink); color: #fffaf3;
}
.thea-panorama-image, .thea-panorama::after { position: absolute; inset: 0; z-index: -1; }
.thea-panorama-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--hero-position, center 56%); }
.thea-panorama::after {
  content: '';
  background: linear-gradient(90deg, rgb(12 30 47 / .86), rgb(17 36 51 / .67) 28%, rgb(17 36 51 / .25) 47%, transparent 67%),
              linear-gradient(0deg, rgb(9 27 42 / .34), transparent 42%);
}
.thea-panorama-inner { display: flex; align-items: end; justify-content: flex-end; }
.thea-panorama-copy {
  width: min(36%, 37rem); text-align: start;
  padding-block: clamp(3rem, 5.6vw, 6rem) clamp(2.8rem, 4.6vw, 5rem);
}
.thea-hero-signature { display: flex; align-items: center; gap: clamp(.75rem, 1.3vw, 1.4rem); margin-bottom: clamp(1.1rem, 1.7vw, 2rem); }
.thea-wordmark { width: clamp(6.8rem, 8.5vw, 9.7rem); height: auto; display: block; }
.thea-hero-place {
  display: inline-flex; align-items: center; gap: .3rem; padding-inline-start: clamp(.65rem, 1vw, 1.2rem);
  border-inline-start: 1px solid rgb(238 242 240 / .48); min-height: 44px;
  font: 400 clamp(.94rem, 1.08vw, 1.14rem)/1.4 var(--body); color: #f6f4ed; white-space: nowrap;
}
.thea-hero-place svg { width: 1.05em; height: 1.05em; }
.thea-residence .thea-panorama h1 { margin: 0; font: 300 clamp(3.65rem, 5.25vw, 6.25rem)/1.06 var(--body); color: inherit; letter-spacing: -.04em; }
.thea-residence .thea-panorama h1 em { display: block; color: #c8e5f1; font-style: normal; white-space: nowrap; }
.thea-panorama-copy p { max-width: 33ch; margin: .95rem 0 0; font: 400 clamp(1.08rem, 1.38vw, 1.5rem)/1.55 var(--body); text-wrap: pretty; }
.thea-project-terms { background: var(--thea-ink); color: #fffaf4; }
.thea-terms-inner { display: flex; align-items: center; padding-block: clamp(1.4rem, 2.4vw, 2.65rem); }
.thea-terms-list { display: flex; align-items: stretch; margin: 0; }
.thea-terms-list > div { padding-inline: clamp(1.3rem, 3.8vw, 4.9rem); border-inline-start: 1px solid #53677a; }
.thea-terms-list > div:first-child { padding-inline-start: 0; border: 0; }
.thea-terms-list dt { font-size: clamp(1rem, 1.22vw, 1.25rem); line-height: 1.4; color: #d3e1e9; }
.thea-terms-list dd { margin: 0; }
.thea-terms-list .thea-term-amount {
  display: flex; align-items: baseline; gap: .4rem; margin-block: .32rem .28rem;
  font: 400 clamp(1.0625rem, 1.3vw, 1.35rem)/1.4 var(--body);
}
.thea-term-amount :is(small, bdi) { font: inherit; letter-spacing: inherit; }
.thea-starting-price { flex-wrap: wrap; }
.thea-starting-price small, .thea-starting-price > span { white-space: nowrap; }
.thea-residence .thea-plan-spec dd bdi {
  font: inherit; font-variant-numeric: tabular-nums; letter-spacing: normal;
}
.thea-terms-list .thea-term-note { font-size: clamp(.9375rem, 1.06vw, 1.1rem); color: #d3e1e9; line-height: 1.5; }
.thea-sale-note::before { display: inline-block; content: ''; width: .4em; height: .4em; margin-inline-end: .45em; margin-block-end: .1em; border-radius: 50%; background: #b8d6e4; }
.thea-facts { padding-block: clamp(1.6rem, 3vw, 3.5rem); border-bottom: 1px solid var(--thea-rule); }
.thea-facts dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; }
.thea-facts dl > div { min-width: 0; padding-inline: clamp(1rem, 2.4vw, 2.5rem); }
.thea-facts dl > div + div { border-inline-start: 1px solid var(--thea-rule); }
.thea-facts dl > div:first-child { padding-inline-start: 0; }
.thea-facts dl > div:last-child { padding-inline-end: 0; }
.thea-facts dt { display: flex; align-items: center; gap: .48rem; color: var(--thea-text); font-size: clamp(.91rem, 1.02vw, 1.12rem); }
.thea-facts dt svg { width: 1.35rem; height: 1.35rem; color: #54768a; flex: none; }
.thea-facts dd { margin: .48rem 0 0; color: var(--thea-ink); font: 400 clamp(1.06rem, 1.36vw, 1.55rem)/1.36 var(--body); text-wrap: pretty; }

.thea-album {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: 'title chapters' 'stage stage' 'picker pager';
  align-items: end; gap: clamp(.9rem, 1.55vw, 1.65rem) 1.2rem;
  padding-block: clamp(2.5rem, 4.25vw, 5rem) var(--thea-space); scroll-margin-top: 0;
}
.thea-album h2 { grid-area: title; margin: 0; }
.thea-album-chapters { grid-area: chapters; display: flex; flex-wrap: wrap; gap: .15rem clamp(.9rem, 2vw, 2.2rem); align-items: end; justify-self: end; border-block-end: 1px solid var(--thea-rule); }
.thea-album-chapters button {
  padding: 0; background: transparent; border: 0; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 44px; margin-block-end: -1px; border-block-end: 2px solid transparent;
  color: var(--thea-text); font: 400 clamp(1rem, 1.16vw, 1.2rem)/1.4 var(--body); white-space: nowrap;
}
.thea-album-chapters button[aria-pressed="true"] { border-color: var(--thea-ink); color: var(--thea-ink); font-weight: 500; }
.thea-album-chapters button:hover { color: var(--thea-ink); border-color: #819baa; }
.thea-album-stage {
  --album-gap: clamp(.55rem, 1.05vw, 1.2rem);
  grid-area: stage; display: flex; align-items: start; gap: var(--album-gap); min-width: 0;
  container-type: inline-size; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.thea-render { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; }
.thea-render-canvas { position: relative; display: block; aspect-ratio: var(--photo-ratio, 16 / 9); background: #e9e7df; cursor: zoom-in; }
.thea-render-canvas img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thea-render figcaption { padding-block-start: .55rem; font-size: clamp(1rem, 1.12vw, 1.22rem); line-height: 1.45; color: var(--thea-text); }
.thea-render-open {
  position: absolute; bottom: .8rem; left: .8rem; display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid rgb(255 255 255 / .68); border-radius: 50%; background: rgb(18 41 63 / .84); color: #fff;
}
.thea-cover-open { left: auto; right: var(--home-edge); bottom: clamp(1rem, 2vw, 2.4rem); }
.thea-cover-open:hover, .thea-render-canvas:hover .thea-render-open { background: var(--thea-ink); }
.thea-album [hidden] { display: none !important; }
.thea-residence .is-loop { cursor: grab; scrollbar-width: none; }
.thea-residence .is-loop::-webkit-scrollbar { display: none; }
.thea-residence .is-loop.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.thea-residence .is-loop :is(img,button) { user-select: none; }
.thea-residence .is-dragging * { cursor: grabbing; }
.thea-residence .thea-render-canvas:focus-visible { outline-offset: -4px; }
.thea-album-picker { grid-area: picker; display: flex; gap: .36rem; align-items: center; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-block: 3px; }
.thea-album-picker button {
  display: block; flex: none; width: clamp(4.5rem, 6.4vw, 7rem); min-height: 44px; padding: 3px; border: 1px solid transparent;
  border-radius: 0; background: transparent; cursor: pointer;
}
.thea-album-picker img { display: block; width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; }
.thea-album-picker button[aria-pressed=true], .thea-album-picker button:hover { border-color: var(--thea-ink); }
.thea-album-pager { grid-area: pager; justify-self: end; }
.thea-album-pager, .thea-plan-pager { display: flex; align-items: center; align-self: center; gap: .7rem; }
.thea-next {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid #91a3ae; border-radius: 50%; background: transparent; color: var(--thea-ink); cursor: pointer;
}
.thea-next:hover { color: #fff; background: var(--thea-ink); }
.thea-next svg { width: 1.25rem; }
.thea-album-pager [role=status], .thea-plan-pager [role=status] { font-size: .94rem; color: var(--thea-text); font-variant-numeric: tabular-nums; }
.thea-album-pager b, .thea-plan-pager b { font-weight: 500; color: var(--thea-ink); }
.thea-album :is(button, a, .thea-album-stage):focus-visible { outline: 2px solid #426c89; outline-offset: 3px; }
.thea-render-canvas:focus-visible { box-shadow: 0 0 0 4px #fff; }
@media (min-width: 821px) {
  /* Fit the opening landscape and portrait edge to edge, with every image
     in the strip retaining its own native ratio at the same height. */
  .thea-album-stage .thea-render {
    --photo-height: min(calc((100cqi - var(--album-gap)) / var(--opening-aspect)), 59svh);
    flex-basis: calc(var(--photo-height) * var(--photo-ratio));
  }
}
.thea-plan-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: clamp(1rem, 1.65vw, 2rem); }
.thea-plan-pager[hidden] { display: none; }
.thea-residence .thea-plan-spec { font: 400 1rem/1.5 var(--body); }
.thea-residence .thea-area-total {
  align-items: center; border-block-start-color: var(--thea-ink);
  padding-block: clamp(.58rem, 1vw, .9rem);
}
.thea-area-total dt { font-weight: 500; color: var(--thea-ink); }
.thea-area-total dt small { display: block; margin-top: .1rem; font-weight: 400; font-size: .875rem; color: var(--thea-text); }
.thea-residence .thea-plan-tabs { --plan-gap: clamp(.35rem, .65vw, .75rem); gap: var(--plan-gap); margin-bottom: .65rem; border: 0; }
.thea-residence .thea-plan-tabs.is-loop {
  display: flex; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}
.thea-residence .thea-plan-tabs.is-loop button {
  flex: 0 0 calc((100% + var(--plan-gap)) / var(--visible-plans,3) - var(--plan-gap)); scroll-snap-align: start; cursor: inherit;
}
.thea-residence .thea-plan-tabs.is-loop button:focus-visible { outline-offset: -4px; }
.thea-residence .thea-plan-tabs.is-loop.is-dragging { scroll-snap-type: none; }
.thea-residence .thea-plan :is(.thea-plan-link,.thea-plan-summary) { touch-action: pan-y pinch-zoom; }
.thea-residence .thea-plan-link { user-select: none; }
.thea-residence .thea-plan :is(.thea-plan-link,.thea-plan-summary).is-dragging { user-select: none; cursor: grabbing; }
@media (prefers-reduced-motion: no-preference) {
  .thea-residence .thea-plan[role=tabpanel]:not([hidden]) { animation: thea-plan-reveal .2s ease-out; }
  @keyframes thea-plan-reveal { from { opacity: .45; } to { opacity: 1; } }
}
.thea-residence .thea-plan-tabs button {
  display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "code name" "code area";
  align-content: center; align-items: center; justify-items: start; text-align: start;
  gap: .12rem clamp(.65rem, 1vw, 1.1rem); padding: .8rem clamp(.7rem, 1.35vw, 1.5rem);
  border: 1px solid #b7c5c9; background: transparent; color: var(--thea-ink);
}
.thea-residence .thea-plan-tabs button[aria-selected=true] { background: var(--paper); border-color: #788f9c; box-shadow: inset 0 -3px 0 var(--thea-ink); }
.thea-residence .thea-plan-tabs button:hover { background: var(--paper); border-color: #788f9c; }
.thea-plan-tabs .thea-plan-number {
  grid-area: code; align-self: stretch; display: grid; place-items: center;
  padding-left: clamp(.6rem, 1vw, 1rem); border-left: 1px solid var(--thea-rule);
  font: 400 clamp(1.55rem, 2vw, 2.3rem)/1 Georgia, serif; color: var(--sea-blue);
}
.thea-plan-tabs .thea-plan-name { grid-area: name; font-size: clamp(1rem, 1.18vw, 1.24rem); line-height: 1.35; }
.thea-plan-tabs .thea-plan-tab-area { grid-area: area; font: 400 1rem/1.45 var(--body); color: var(--thea-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.thea-plan-tabs .thea-plan-tab-area bdi { font: inherit; letter-spacing: normal; }
.thea-residence .thea-viewer [data-next-view]:not([hidden]) { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.thea-residence .thea-viewer [data-next-view] svg { width: 1.25rem; }
@media (max-width: 820px) {
  .thea-panorama-copy { width: min(49%, 32rem); }
  .thea-residence .thea-panorama h1 { font-size: clamp(3rem, 7vw, 4rem); }
  .thea-facts dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .thea-facts dl > div { padding: .9rem clamp(.8rem, 3vw, 1.5rem); }
  .thea-facts dl > div:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .thea-facts dl > div:nth-child(even) { padding-inline-end: 0; }
  .thea-facts dl > div:nth-child(n+3) { border-top: 1px solid var(--thea-rule); }
  .thea-facts dd { margin-top: .25rem; }
  .thea-album { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'title pager' 'chapters chapters' 'stage stage' 'picker picker'; gap: .9rem; }
  .thea-album-chapters { justify-self: stretch; gap: clamp(.95rem, 4vw, 2rem); }
  .thea-album-pager { gap: .4rem; }
  .thea-album-picker { gap: .3rem; }
  .thea-album-picker button { width: clamp(3.7rem, 14vw, 5.5rem); }
  .thea-album-stage.is-loop { height: var(--visible-height, auto); }
  .thea-render[data-shape="portrait"] .thea-render-canvas,
  .thea-render[data-shape="portrait"] figcaption { width: min(100%, 54svh); margin-inline: auto; }
}
@media (max-width: 620px) {
  .thea-panorama { --mobile-photo: clamp(14rem, 67vw, 25rem); min-height: 0; }
  .thea-panorama-image { inset: 0 0 auto; height: var(--mobile-photo); }
  .thea-panorama-image img { object-position: var(--mobile-hero-position, 53% 50%); }
  .thea-panorama::after {
    background: linear-gradient(180deg, transparent calc(var(--mobile-photo) * .46), rgb(17 39 59 / .52) calc(var(--mobile-photo) * .76), var(--hero-ink) var(--mobile-photo)),
                radial-gradient(ellipse 11rem 6rem at top left, rgb(12 30 49 / .59), transparent);
  }
  .thea-panorama-inner { display: block; }
  .thea-panorama-copy { width: 100%; padding-block: calc(var(--mobile-photo) * .68) 1.35rem; }
  .thea-hero-signature { gap: .7rem; margin: 0 0 .3rem; }
  .thea-wordmark { width: clamp(4.6rem, 17vw, 6.4rem); }
  .thea-hero-place { min-height: 44px; padding-inline-start: .68rem; border: 0; background: linear-gradient(#cbd4d2,#cbd4d2) right center / 1px 1.16em no-repeat; font-size: .94rem; }
  .thea-residence .thea-panorama h1 { font-size: clamp(2.3rem, 9.2vw, 3.6rem); }
  .thea-residence .thea-panorama h1 em { display: inline; }
  .thea-panorama-copy p { max-width: 43ch; margin-top: .58rem; font-size: 1.04rem; line-height: 1.54; }
  .thea-terms-inner { flex-direction: column; align-items: stretch; }
  .thea-terms-list { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); }
  .thea-terms-list > div { padding-inline: 1rem 0; }
  .thea-terms-list .thea-term-amount { gap: .2rem; }
  .thea-facts { padding-block: 1.3rem .4rem; }
  .thea-album { padding-block: 2.5rem; gap: .8rem; }
  .thea-page .thea-album h2 { font-size: clamp(1.9rem, 7.25vw, 2.45rem); }
  .thea-album-pager { gap: .35rem; }
  .thea-render-open { left: .5rem; bottom: .5rem; width: 44px; height: 44px; }
  .thea-cover-open { inset: .75rem var(--home-edge) auto auto; }
}
@media (max-width: 365px) {
  .thea-terms-list { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
  .thea-terms-list > div + div { padding-inline-start: .65rem; }
  .thea-page .thea-album h2 { font-size: 1.72rem; }
  .thea-album-picker button { width: 50px; }
}
@media (max-width: 640px) {
  .thea-residence .thea-plan-tabs { --plan-gap: .4rem; }
  .thea-residence .thea-plan-tabs.is-loop button { flex-basis: max(44%, 8.55rem); }
  .thea-residence .thea-plan-tabs button {
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "code" "name" "area";
    justify-items: center; align-items: start; text-align: center; gap: .25rem; padding: .62rem .14rem .68rem;
  }
  .thea-plan-tabs .thea-plan-number { padding: 0; border: 0; font-size: 1.48rem; }
  .thea-plan-tabs .thea-plan-name { text-wrap: balance; }
}

.residence-name {
  font: 400 clamp(1.35rem, 2vw, 2.2rem)/1.12 Georgia, serif;
  letter-spacing: -.025em; white-space: nowrap;
}
.residence-page .thea-panorama h1 { text-wrap: balance; }
.residence-page .thea-panorama h1 em { white-space: normal; }
.residence-page .thea-panorama-copy p { max-width: 37ch; }
.residence-vista { --hero-position: center 52%; --mobile-hero-position: center 48%; }
.residence-heleni { --hero-position: center 61%; }
.residence-heleni .thea-wordmark { width: clamp(8.5rem, 12vw, 12.5rem); }
.residence-mola { --hero-position: center 60%; }
.residence-loutra { --hero-position: center 62%; }
.residence-floor-intro { min-width: 0; }
.residence-floor-intro p { max-width: 52ch; margin: .65rem 0 0; }
.thea-residence .residence-floor-tabs button {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3.6rem; font: 400 clamp(1rem, 1.15vw, 1.2rem)/1.35 var(--body);
}
@media (max-width: 640px) {
  .residence-page .residence-floor-tabs.is-loop button { flex-basis: calc((100% - var(--plan-gap)) / 2); }
  .residence-page .thea-plan-head { align-items: flex-start; }
  .residence-page .thea-plan-pager { align-self: flex-start; }
  .residence-page .thea-plan-pager [role=status] { white-space: nowrap; }
  .residence-page .thea-panorama-copy p { max-width: 45ch; }
  .residence-page .thea-panorama h1 em { white-space: nowrap; }
  .residence-heleni .thea-wordmark { width: clamp(7.25rem, 31vw, 9rem); }
}
