:root {
  --ease-out: cubic-bezier(.19, 1, .22, 1);
  --stone: #ede7db;
  --coal: #191b18;
  --gold: #d8bc93;
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-exit 220ms ease-in both; }
::view-transition-new(root) { animation: page-enter 470ms var(--ease-out) both; }
@keyframes page-exit { to { opacity: 0; } }
@keyframes page-enter { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; translate: 0 20px; } }
@keyframes line-in { from { scale: 0 1; } }
@keyframes image-in { from { opacity: .3; scale: 1.07; } }
@keyframes media-in { from { opacity: .55; scale: 1.035; } }
@keyframes separator-in { from { scale: 1 0; } }

.hero-copy { position: relative; border-top-color: transparent; }
.hero-copy::after {
  content: ''; position: absolute; inset: -1px 0 auto; height: 1px;
  background: linear-gradient(90deg, #f1dbb6bb, #fff2);
  transform-origin: left; pointer-events: none;
}
.hero-right .hero-copy::after { transform-origin: right; background: linear-gradient(270deg, #f1dbb6bb, #fff2); }
.hero-copy > p { text-wrap: pretty; }
.hero-cta { min-height: 44px; }
.hero-cta .round { overflow: hidden; }
.hero-cta .arrow { transition: translate 350ms var(--ease-out); }
.hero-cta:hover .arrow { translate: 3px 0; }
.header .pill { transition: color 220ms, background 220ms, border-color 220ms; }
.header .pill:hover { background: var(--white); border-color: var(--white); color: var(--coal); }
.nav > a:not(.pill) { position: relative; }
.nav > a:not(.pill)::after {
  content: ''; position: absolute; inset: auto 0 7px; height: 1px;
  background: var(--gold); scale: 0 1; transform-origin: left; transition: scale 340ms var(--ease-out);
}
.nav > a:not(.pill):is(:hover, :focus-visible, [aria-current])::after { scale: 1 1; }

@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: image-in 1.45s var(--ease-out) both; }
  .hero-right .hero-photo { animation-delay: 90ms; }
  .hero::after { animation: separator-in 1.1s var(--ease-out) both; transform-origin: top; }
  .hero-copy::after { animation: line-in .82s var(--ease-out) .37s both; }
  .hero-lockup .mark { animation: rise .9s var(--ease-out) .14s both; }
  .hero-lockup h1 { animation: rise .9s var(--ease-out) .25s both; }
  .hero-lockup p { animation: rise .9s var(--ease-out) .36s both; }
  .hero-copy > * { animation: rise .88s var(--ease-out) .38s both; }
  .hero-copy h2 { animation-delay: .46s; }
  .hero-copy > p { animation-delay: .54s; }
  .hero-copy .hero-cta { animation-delay: .61s; }
  .hero .scroll { animation: rise .9s var(--ease-out) .68s both; }
  .detail-hero img { animation: image-in 1.25s var(--ease-out) both; }
  .detail-hero .shell > *, .plain-title > * { animation: rise .75s var(--ease-out) both; }
  .detail-hero .shell h1, .plain-title h1 { animation-delay: .08s; }
  .detail-hero .shell p, .plain-title .intro { animation-delay: .16s; }
  [data-reveal].reveal-ready { transition: opacity .7s var(--ease-out), translate .85s var(--ease-out); }
  [data-reveal].reveal-ready:not(.is-visible):not(:focus-within) { opacity: 0; translate: 0 24px; }
  .nav[data-open] { animation: rise .38s var(--ease-out) both; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-photo { translate: var(--hero-x, 0px) var(--hero-y, 0px); transition: translate .55s var(--ease-out), transform .95s var(--ease-out), filter .55s; }
  .hero-side[data-active] .hero-photo { transform: scale(1.045); filter: brightness(.98) saturate(.92); }
  .hero-right[data-active] .hero-photo { filter: brightness(.92) saturate(.78); }
}

.statement { grid-template-columns: minmax(160px,.62fr) minmax(0,2fr); align-items: start; }
.statement-index { display: flex; align-items: center; gap: 17px; padding-top: 19px; color: #76552f; }
.statement-rule { width: clamp(20px,4vw,65px); height: 1px; background: #a99072; }
.statement h2 { max-width: 12ch; font-size: clamp(3.65rem,8.5vw,9rem); }
.statement .intro { max-width: 50ch; }

.service-explorer { background: var(--coal); color: var(--white); }
.explorer-grid { display: grid; grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); gap: clamp(28px,6vw,95px); align-items: center; }
.explorer-copy > .eyebrow { color: var(--gold); margin-bottom: 16px; }
.explorer-copy h2 { font-size: clamp(3rem,5.55vw,6.35rem); max-width: 11ch; text-wrap: balance; }
.explorer-tabs { margin-top: clamp(22px,4vw,55px); border-bottom: 1px solid #ffffff38; }
.explorer-tabs a {
  display: grid; align-items: center; grid-template-columns: 2ch minmax(0,1fr) auto; gap: 14px;
  border-top: 1px solid #ffffff38; padding: 15px 0; min-height: 58px;
  color: #ddd7cc; transition: color .25s, padding .35s var(--ease-out), background .25s;
}
.explorer-tabs a[data-selected=true] { color: #fff6e4; padding-inline: 12px; background: #f0d8b511; }
.explorer-tabs a:hover { color: var(--gold); }
.explorer-tabs a .arrow { transition: translate .32s var(--ease-out); }
.explorer-tabs a:hover .arrow { translate: 4px 0; }
.tab-index { color: var(--gold); font-size: .64rem; font-variant-numeric: tabular-nums; }
.explorer-preview { position: relative; min-height: clamp(390px,47vw,640px); background: #272925; overflow: hidden; }
.service-panel { position: absolute; inset: 0; display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.service-panel[hidden] { display: none; }
.service-panel img { position: absolute; inset: 0; z-index: -2; }
.service-panel[data-service-panel=design] img { object-position: center 63%; }
.service-panel[data-service-panel=construction] img { object-position: center 48%; }
.service-panel::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 29%, #18181348 50%, #181813e8 100%);
}
.service-panel-copy { padding: clamp(20px,3.6vw,53px); color: var(--white); }
.service-panel-copy p { margin-top: 10px; max-width: 34ch; color: #f3ecdf; }
.service-panel-copy .text-link { margin-top: 13px; }
.service-panel-copy .round { width: 38px; height: 38px; }
.service-panel.is-entering img { animation: media-in .8s var(--ease-out) both; }
.service-panel.is-entering .service-panel-copy { animation: rise .64s var(--ease-out) both; }

.showcase .section-head { margin-bottom: clamp(23px,4vw,50px); }
.showcase-stage { touch-action: pan-y; }
.showcase-slide { position: relative; display: grid; min-width: 0; }
.showcase-slide[hidden], .showcase-nav[hidden] { display: none; }
.showcase-image { position: relative; aspect-ratio: 1.91; overflow: hidden; background: #baad95; }
.showcase-image img { object-position: center 54%; }
.showcase-slide[data-concept=villa] img { object-position: center 54%; }
.showcase-slide figcaption {
  display: grid; grid-template-columns: minmax(0,1fr);
  padding: 20px 0 14px; min-height: 131px; border-bottom: 1px solid var(--line);
}
.showcase-slide figcaption .eyebrow { color: #76552f; margin-bottom: 7px; }
.showcase-slide figcaption h3 { font-size: clamp(2.1rem,3.9vw,4.65rem); }
.showcase-slide figcaption p:last-child { color: #585146; margin-top: 6px; }
.showcase-slide.is-entering img { animation: media-in .9s var(--ease-out) both; }
.showcase-slide.is-entering figcaption { animation: rise .5s var(--ease-out) both; }
.showcase-nav { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-top: 16px; }
.showcase-position { display: flex; gap: 16px; align-items: center; font-size: .79rem; font-variant-numeric: tabular-nums; color: #594d3a; }
.showcase-track { width: clamp(50px,11vw,160px); height: 2px; background: #cfc4b3; }
.showcase-track span { display: block; height: 100%; width: 100%; scale: var(--slide-progress,.5) 1; transform-origin: left; background: #72573a; transition: scale .4s var(--ease-out); }
.project-controls { display: flex; align-items: center; gap: 8px; }
.icon-button { color: inherit; background: transparent; padding: 0; font-size: 1.15rem; }
.icon-button:hover { background: var(--ink); color: var(--white); }
.icon-button[data-previous] .arrow { rotate: 180deg; }
.project-gallery .gallery-img { position: relative; }
.project-gallery figure:not([hidden]) { animation: rise .55s var(--ease-out) both; }
.project-expand { display: none; position: absolute; inset: auto 16px 16px auto; background: #211e19b5; color: var(--white); font-size: 1.4rem; backdrop-filter: blur(8px); }
.viewer-enabled .project-expand { display: grid; }
.project-expand:hover { background: var(--white); color: var(--ink); }
.project-viewer { width: min(100% - 24px,1140px); max-height: calc(100dvh - 24px); border: 0; padding: 0; background: var(--coal); color: var(--white); }
.project-viewer::backdrop { background: #111210c9; backdrop-filter: blur(8px); }
.project-viewer[open] { animation: rise .42s var(--ease-out) both; }
.viewer-layout { padding: clamp(12px,2.5vw,27px); }
.viewer-head, .viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 13px; }
.viewer-head { margin-bottom: 10px; color: var(--gold); }
.viewer-foot { margin-top: 12px; }
.viewer-foot h2 { font-size: clamp(2rem,4vw,3.8rem); }
.viewer-foot p { margin-top: 6px; font-size: .88rem; color: #e1d9cb; }
.viewer-image { height: min(58dvh,630px); background: #131411; }
.viewer-image img { object-fit: contain; animation: page-enter .4s var(--ease-out) both; }
.project-viewer .icon-button:hover { background: var(--white); color: var(--coal); }
.project-viewer .icon-button[data-close-project] { color: var(--white); }
.project-viewer .icon-button[data-close-project]:hover { color: var(--coal); }

.subnav { position: sticky; top: 0; z-index: 3; background: var(--paper); }
.subnav a { border-bottom: 1px solid transparent; transition: border-color .25s; }
.subnav a[aria-current=location] { border-color: #76552f; color: #76552f; }
.detail-grid[id], #interiors { scroll-margin-top: 100px; }
.project-form { box-shadow: 0 14px 40px #3e2e1810; }
.field :is(input,select,textarea) { transition: border-color .2s, background .2s; }
.field :is(input,select,textarea):focus { border-color: #5b462e; background: #fffdf8; }
.form-actions button { transition: background .25s, border-color .25s; }
.form-actions button:hover { background: #523f2d; border-color: #523f2d; }
.form-result:not([hidden]) { animation: rise .42s var(--ease-out) both; }

@media (max-width: 760px) {
  .statement { grid-template-columns: 1fr; }
  .statement-index { padding-top: 0; }
  .statement h2 { font-size: clamp(3.5rem,12.5vw,5.6rem); }
  .explorer-grid { grid-template-columns: minmax(0,1fr); }
  .explorer-preview { min-height: min(460px,106vw); }
  .explorer-copy h2 { max-width: 14ch; }
  .explorer-tabs a { padding-block: 10px; min-height: 48px; }
  .service-panel-copy .text-link { margin-top: 6px; }
  .showcase-image { aspect-ratio: 1.22; }
  .showcase-slide figcaption { min-height: 147px; }
  .viewer-foot { align-items: flex-start; flex-direction: column; }
  .viewer-image { height: min(46dvh,430px); }
  .subnav { gap: 7px 17px; padding-block: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.project-controls[hidden] { display: none; }
@media (min-width: 761px) {
  .project-gallery:not(:has([hidden])) figure:nth-child(3):last-child { grid-column: 1 / -1; }
  .project-gallery:not(:has([hidden])) figure:nth-child(3):last-child .gallery-img { aspect-ratio: 1.9; }
}
.project-gallery figcaption { border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.service-explorer { padding-block: clamp(66px,7vw,112px); }
.explorer-preview { min-height: clamp(390px,42vw,605px); }
@media (max-width: 760px) {
  .explorer-preview { min-height: min(460px,106vw); }
  .explorer-tabs {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px;
    border: 0; padding: 0; margin-top: 23px;
  }
  .explorer-tabs a, .explorer-tabs a[data-selected=true] {
    border: 1px solid #ffffff35; padding: 8px 10px; min-height: 48px;
    grid-template-columns: minmax(0,1fr); font-size: .8rem; line-height: 1.35;
  }
  .explorer-tabs a[data-selected=true] { border-color: #d8bc93a0; }
  .explorer-tabs a .tab-index, .explorer-tabs a .arrow { display: none; }
}
