/* Homepage proportions. Load after home-overhaul.css. */
.home-refined .world-rail {
  align-items: start;
}

.home-refined .world-card {
  margin-top: 0 !important;
}

.home-refined .world-index {
  display: flex;
  align-items: end;
  min-height: 26px;
}

.home-refined .world-card figure {
  height: auto;
  aspect-ratio: 4 / 5;
}

.home-refined .world-card figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.home-refined .world-card:nth-child(2) figure > img {
  object-position: 50% center;
}

.home-refined .world-card:nth-child(3) figure > img {
  object-position: center 36%;
}

/* The whole room stays visible; the choices sit beside it on desktop. */
@media (min-width: 901px) {
  .home-refined .material-studio {
    padding-block: 42px;
  }

  .home-refined .material-studio > .frame {
    max-width: 1328px;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(305px, 1fr);
    column-gap: 24px;
    row-gap: 26px;
    align-items: stretch;
  }

  .home-refined .studio-heading {
    grid-column: 1 / -1;
    gap: 48px;
    margin: 0;
    align-items: center;
  }

  .home-refined .studio-heading .eyeline {
    margin-bottom: 14px;
    font-size: 8px;
  }

  .complete-site.home-refined .studio-heading h2 {
    font-size: clamp(40px, 3.65vw, 49px);
    line-height: 1.08;
  }

  .home-refined .studio-heading > p {
    max-width: 345px;
    padding: 0;
    font-size: 12px;
    line-height: 1.8;
  }

  .home-refined .studio-stage {
    min-width: 0;
    align-self: start;
  }

  .home-refined .studio-panel {
    height: auto;
  }

  .home-refined .studio-panel > img {
    display: block;
    width: 100%;
    height: clamp(330px, 31vw, 380px);
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
  }

  .home-refined .studio-image-copy {
    min-height: 82px;
    padding: 17px 22px;
  }

  .home-refined .studio-image-copy > span {
    font-size: 8px;
    margin-bottom: 7px;
  }

  .home-refined .studio-image-copy > strong {
    font-size: 22px;
    line-height: 1.3;
    padding-right: 65px;
  }

  .home-refined .studio-page {
    right: 20px;
    bottom: 25px;
    gap: 8px;
  }

  .home-refined .studio-page > span:first-child {
    font-size: 32px;
  }

  .home-refined .studio-page > span:last-child {
    font-size: 9px;
  }

  .home-refined .studio-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    min-width: 0;
    gap: 18px;
    padding: 20px;
  }

  .home-refined .studio-tabs {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .home-refined .studio-tab {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    min-height: 82px;
    padding: 8px 28px 8px 8px;
    border-bottom: 2px solid #d2c8b5;
  }

  .home-refined .studio-tab[aria-selected="true"] {
    background: #f3eee5;
    border-bottom-color: #987020;
  }

  .home-refined .studio-tab img {
    display: block;
    width: 96px;
    height: 64px;
    object-fit: contain;
  }

  .home-refined .studio-tab > span:not(.studio-check) {
    margin: 0;
  }

  .home-refined .studio-tab strong {
    font-size: 12px;
  }

  .home-refined .studio-tab small {
    font-size: 10px;
    margin-top: 4px;
  }

  .home-refined .studio-check {
    right: 8px;
    top: 50%;
    margin-top: -10px;
    width: 20px;
    height: 20px;
  }

  .home-refined .studio-next {
    border: 0;
    border-top: 1px solid #d0c7b4;
    padding: 17px 0 0;
  }

  .home-refined .studio-next .ff-button {
    min-height: 49px;
    padding: 14px 15px;
    font-size: 10px;
    gap: 12px;
  }

  .home-refined .studio-next p {
    font-size: 9px;
    line-height: 1.65;
    margin-top: 10px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .home-refined .material-studio {
    padding-block: 44px;
  }

  .home-refined .studio-heading {
    gap: 26px;
    margin-bottom: 26px;
  }

  .complete-site.home-refined .studio-heading h2 {
    font-size: 38px;
  }

  .home-refined .studio-heading > p {
    max-width: 280px;
    font-size: 11px;
  }

  .home-refined .studio-panel > img {
    height: 320px;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .home-refined .studio-image-copy {
    padding: 16px 24px;
  }

  .home-refined .studio-image-copy > strong {
    font-size: 22px;
  }

  .home-refined .studio-bottom {
    padding: 20px;
    gap: 18px;
  }

  .home-refined .studio-tab img {
    height: 70px;
    object-fit: contain;
  }

  .home-refined .studio-next {
    padding-top: 18px;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  /* Keep the existing touch rail and its controls; only change image shape. */
  .home-refined .world-card {
    flex-basis: 86%;
  }

  .home-refined .world-card figure {
    aspect-ratio: 4 / 5;
  }

  .home-refined .world-index {
    min-height: 20px;
    margin-bottom: 12px;
  }

  .home-refined .material-studio {
    padding-block: 44px;
  }

  .home-refined .studio-heading {
    margin-bottom: 24px;
  }

  .home-refined .studio-heading > p {
    margin-top: 18px;
  }

  .home-refined .studio-panel > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
  }

  .home-refined .studio-image-copy {
    min-height: 88px;
    padding: 17px 16px;
  }

  .home-refined .studio-image-copy > strong {
    font-size: 18px;
    line-height: 1.35;
    padding-right: 52px;
  }

  .home-refined .studio-page {
    bottom: 25px;
  }

  .home-refined .studio-bottom {
    padding: 16px 12px;
    gap: 18px;
  }

  .home-refined .studio-tabs {
    gap: 8px;
  }

  .home-refined .studio-tab img {
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
  }

  .home-refined .studio-next {
    padding-top: 18px;
  }

  .home-refined .studio-next p {
    margin-top: 11px;
  }
}

/* Three real projects, one quiet and consistent gallery. */
.home-project-gallery{background:#e7e3d7;scroll-margin-top:114px;padding-block:64px}
.home-project-heading{display:flex;justify-content:space-between;align-items:end;gap:40px;margin-bottom:36px}
.home-project-heading .eyeline{font-size:9px;margin-bottom:20px;color:#666e5f}
.complete-site .home-project-heading h2{font-size:clamp(34px,3.5vw,52px);line-height:1.12}
.home-project-heading h2 em{color:#8a713e}
.home-project-intro{max-width:300px;padding-bottom:3px}
.home-project-intro p{font-size:12px;line-height:1.85;color:#646b5e;margin:0 0 14px}
.home-project-intro .text-link{font-size:12px}
.home-project-rail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;outline-offset:6px}
.home-project-card{min-width:0;display:flex;flex-direction:column;position:relative;border-bottom:1px solid #bbb7a6;padding-bottom:22px;outline-offset:6px}
.home-project-card figure{margin:0;position:relative;overflow:hidden;aspect-ratio:1/1.08;background:#d7d1bf}
.home-project-card img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .65s cubic-bezier(.2,.65,.2,1),filter .4s}
.home-project-open{position:absolute;bottom:16px;right:16px;width:43px;height:43px;display:grid;place-items:center;background:#f5f0e5;color:#202523;border-radius:50%;transition:background .25s,transform .3s}
.home-project-open svg{width:20px;height:20px}
.home-project-card:hover img,.home-project-card:focus-visible img{transform:scale(1.035);filter:brightness(1.035)}
.home-project-card:hover .home-project-open,.home-project-card:focus-visible .home-project-open{background:#f9a708;transform:rotate(45deg)}
.home-project-meta{display:flex;justify-content:space-between;gap:15px;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#6e705e;margin:20px 0 11px}
.complete-site .home-project-card h3{font-size:clamp(20px,2vw,27px);font-weight:500;letter-spacing:-.045em;line-height:1.22;margin:0 0 10px;max-width:300px}
.home-project-card>p{font-size:12px;color:#656c5e;line-height:1.7;margin:0 0 22px;max-width:270px}
.home-project-discover{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:11px;margin-top:auto}
.home-project-discover svg{width:20px;transition:transform .3s}
.home-project-card:hover .home-project-discover svg,.home-project-card:focus-visible .home-project-discover svg{transform:translateX(4px)}
.home-project-controls{display:none}
@media(min-width:901px){.home-refined .material-studio{padding-block:52px}.home-refined .material-studio>.frame{column-gap:30px}.home-refined .studio-panel>img{height:auto;aspect-ratio:3/2}.home-refined .studio-bottom{justify-content:center;gap:20px}}
@media(max-width:900px){.home-project-rail{gap:18px}.home-project-heading{gap:24px}.home-project-intro{max-width:230px}.home-project-card figure{aspect-ratio:3/4}}
@media(max-width:640px){
 .home-project-gallery{overflow:hidden;scroll-margin-top:100px}
 .home-project-heading{display:block;margin-bottom:26px}
 .complete-site .home-project-heading h2{font-size:34px}
 .home-project-intro{max-width:none;margin-top:20px;display:flex;align-items:end;justify-content:space-between;gap:18px}
 .home-project-intro p{font-size:11px;margin:0;max-width:190px}
 .home-project-intro .text-link{font-size:10px;gap:8px;white-space:nowrap}
 .home-project-rail{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:18px;padding:4px 17px 8px;margin:0 -17px;scroll-padding-inline:17px;scrollbar-width:none}
 .home-project-rail::-webkit-scrollbar{display:none}
 .home-project-card{flex:0 0 86%;scroll-snap-align:start;padding-bottom:18px}
 .home-project-card figure{aspect-ratio:4/5}
 .complete-site .home-project-card h3{font-size:24px}
 .home-project-card>p{font-size:12px;margin-bottom:18px}
 .home-project-controls{display:flex;align-items:center;justify-content:space-between;margin-top:18px;font-size:11px;font-variant-numeric:tabular-nums;color:#69705f}
 .home-project-controls>div{display:flex;gap:9px}
 .home-project-controls button{width:42px;height:42px;border:1px solid #b9bba9;border-radius:50%;display:grid;place-items:center;background:transparent;color:#202523}
 .home-project-controls button:disabled{opacity:.35}
 .home-project-controls button:not(:disabled):hover{background:#f9a708;border-color:#f9a708}
}
@media(prefers-reduced-motion:reduce){.home-project-card img,.home-project-open,.home-project-discover svg{transition:none!important;transform:none!important}}
