/* Homepage / warm stone, charcoal, walnut and olive. */
.home-hero {
    position: relative;
    height: calc(100svh - 102px);
    min-height: 700px;
    max-height: 1100px;
    overflow: hidden;
    color: white;
    background: #302e26;
}

.hero-slides,
.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-position: center 57%;
    opacity: 0;
    transform: scale(1.045);
    transition: opacity 1.6s ease, transform 8s linear;
}

.hero-image.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-shade {
    background: linear-gradient(90deg, rgba(19, 23, 17, .65), rgba(19, 23, 17, .12) 80%),
                linear-gradient(0deg, rgba(19, 23, 17, .55), transparent 30%);
    pointer-events: none;
}

.home-hero-copy {
    position: absolute;
    left: var(--gutter);
    top: 13%;
    right: 24px;
}

.home-hero-copy .eyebrow {
    color: #e4e5db;
    letter-spacing: .17em;
}

.hero-english {
    font: 700 clamp(62px, 6.7vw, 118px)/1.02 var(--serif);
    letter-spacing: -.045em;
    margin-bottom: 32px;
}

.home-hero h1 {
    font-size: clamp(23px, 2vw, 34px);
    font-family: 'Microsoft JhengHei', sans-serif;
    letter-spacing: .1em;
    margin-bottom: 20px;
}

.home-hero-copy > p:not(.hero-english):not(.eyebrow) {
    font-size: 15px;
    letter-spacing: .04em;
    line-height: 2;
}

.home-hero .button {
    margin-top: 10px;
    background: rgba(20, 24, 18, .15);
    backdrop-filter: blur(5px);
}

.hero-bottom {
    position: absolute;
    bottom: 28px;
    left: var(--gutter);
    right: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .28);
    font-size: 13px;
    letter-spacing: .05em;
}

.hero-controls,
.hero-dots {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-dot,
.hero-pause {
    min-width: 44px;
    min-height: 44px;
    color: #fff;
    background: transparent;
    border: 0;
    padding: 9px 8px;
    font-size: 13px;
}

.hero-dot {
    position: relative;
    opacity: .65;
}

.hero-dot::after {
    content: '';
    position: absolute;
    inset: auto 8px 2px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s;
}

.hero-dot.is-active {
    opacity: 1;
}

.hero-dot.is-active::after {
    transform: scaleX(1);
}

.hero-pause {
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, .4);
    padding-left: 20px;
}

/* A layered editorial introduction with material detail. */
.home-story {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: clamp(50px, 7vw, 130px);
    background: #e9e3d7;
    padding-top: 110px;
    padding-bottom: 125px;
    overflow: hidden;
}

.home-story::after {
    content: '';
    position: absolute;
    right: -60px;
    top: 60px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(137, 118, 88, .2);
    border-radius: 50%;
    pointer-events: none;
}

.story-visual {
    position: relative;
    padding: 0 35px 70px 0;
    min-width: 0;
}

.story-main-photo {
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(56, 42, 24, .12);
}

.story-main-photo img {
    aspect-ratio: .97;
    object-position: 45% center;
}

.story-detail-photo {
    position: absolute;
    width: 53%;
    bottom: -5px;
    right: -18px;
    margin: 0;
    border: 10px solid #e9e3d7;
    background: #e9e3d7;
    box-shadow: 12px 20px 28px rgba(64, 45, 23, .08);
}

.story-detail-photo img {
    aspect-ratio: 1.2;
}

.story-detail-photo figcaption {
    padding-top: 10px;
    font-size: 13px;
    letter-spacing: .07em;
}

.story-side-note {
    position: absolute;
    left: -34px;
    top: 0;
    writing-mode: vertical-rl;
    font-size: 13px;
    letter-spacing: .15em;
    color: #6c6456;
}

.story-seal {
    position: absolute;
    top: 32px;
    right: 0;
    display: grid;
    place-content: center;
    width: 91px;
    height: 110px;
    border: 1px solid #d3c3a7;
    outline: 5px solid #374033;
    background: #374033;
    color: #e7d9be;
    text-align: center;
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.6;
    letter-spacing: .18em;
}

.story-content {
    position: relative;
    z-index: 1;
}

.story-content .eyebrow {
    color: #716047;
}

.story-content h2 {
    font-size: clamp(31px, 3.2vw, 52px);
    line-height: 1.5;
    letter-spacing: .04em;
    margin-bottom: 26px;
}

.story-lead {
    font-size: 21px;
    line-height: 1.85;
    color: #5c5141;
}

.story-content > p:not(.eyebrow):not(.story-lead) {
    color: #656457;
    font-size: 15px;
    line-height: 2.1;
}

.story-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #b8b09e;
    border-bottom: 1px solid #b8b09e;
    gap: 20px;
    padding-block: 23px;
    margin: 30px 0 20px;
}

.story-pillars span {
    font-size: 13px;
    color: #73664f;
    letter-spacing: .015em;
}

.story-pillars h3 {
    font-size: 18px;
    margin: 12px 0 7px;
}

.story-pillars p {
    font-size: 13px;
    color: #666457;
    line-height: 1.8;
    margin: 0;
}

/* The project gallery is intentionally horizontal, with native touch scrolling. */
.featured {
    background: #242c28;
    color: #f5f0e6;
    overflow: hidden;
}

.featured .eyebrow {
    color: #c6b48f;
}

.featured h2 {
    font-size: clamp(28px, 3.1vw, 47px);
}

.section-note {
    font-size: 13px;
    color: #c1c6ba;
    margin: -15px 0 40px;
}

.featured-grid {
    display: flex;
    gap: 42px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #a79b7f #424b41;
    padding: 0 0 24px;
    margin-right: calc(-1 * var(--gutter));
    padding-right: var(--gutter);
    cursor: grab;
}

.featured-grid .case-card {
    flex: 0 0 62%;
    min-width: 0;
    scroll-snap-align: start;
}

.featured-grid .case-card:last-child {
    margin-right: 28%;
}

.featured-grid .case-card img {
    aspect-ratio: 1.64;
    pointer-events: none;
    user-select: none;
}

.featured-grid .case-card:nth-child(even) {
    padding-top: 62px;
}

.featured-grid .case-card h3 {
    font-size: clamp(19px, 1.8vw, 27px);
    letter-spacing: .035em;
    margin-bottom: 0;
}

.featured .card-meta {
    color: #c2c8ba;
    font-size: 13px;
    margin-top: 25px;
    border-bottom: 1px solid #596154;
    padding-bottom: 17px;
}

.featured .image-arrow {
    color: #252e27;
    background: #e6dcc4;
    width: 58px;
    height: 58px;
    font-size: 24px;
}

.featured-grid.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.featured-grid.is-dragging a {
    cursor: grabbing;
}

.case-slider-footer {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 32px;
}

.slider-hint {
    margin: 0;
    font-size: 13px;
    color: #c1c6ba;
}

.slider-hint span {
    padding-left: 13px;
}

.case-progress {
    flex: 1;
    height: 1px;
    background: #596154;
}

.case-progress span {
    display: block;
    width: 11.111%;
    height: 2px;
    background: #d3bd8f;
    transition: width .3s;
}

.case-slider-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

#case-position {
    margin-right: 16px;
}

.circle-button {
    width: 52px;
    height: 52px;
    border: 1px solid #929b89;
    border-radius: 50%;
    color: inherit;
    font-size: 23px;
    background: transparent;
    transition: color .25s, background .25s;
}

.circle-button:hover:not(:disabled) {
    color: #242c28;
    background: #d3bd8f;
}

.circle-button:disabled {
    opacity: .3;
    cursor: default;
}

/* Warm mineral tones, staggered photographic cards. */
.home-services {
    position: relative;
    background: #b7a58d;
    background-image: linear-gradient(90deg, transparent calc(50% - 1px), rgba(73, 52, 26, .12) 50%, transparent calc(50% + 1px));
    color: #292e25;
    padding-bottom: 120px;
}

.home-services .section-heading > p {
    color: #454639;
    font-size: 15px;
}

.home-services .service-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
    gap: 30px;
}

.home-services .service-card {
    grid-column: span 2;
    background: #eee8dc;
    box-shadow: 0 18px 36px rgba(63, 47, 29, .12);
    transition: transform .45s, box-shadow .45s;
}

.home-services .service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 40px rgba(63, 47, 29, .18);
}

.home-services .service-card img {
    aspect-ratio: 1.1;
}

.home-services .service-card-copy {
    padding: 26px;
    border: 0;
}

.home-services .service-card h3 {
    font-size: clamp(20px, 1.65vw, 27px);
}

.home-services .service-card .eyebrow {
    color: #6d5c43;
    letter-spacing: .045em;
}

.home-services .service-card p {
    color: #5b5b4e;
    font-size: 14px;
}

.home-services .round-arrow {
    right: 23px;
}

/* Oversized image layer allows gentle parallax without revealing an edge. */
.space-interlude {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 90px var(--gutter);
    background: #4e5044;
    color: #fff;
}

.interlude-image {
    position: absolute;
    inset: -110px 0;
    background: url('../images/case/01.jpg') center 57% / cover no-repeat;
    will-change: transform;
}

.interlude-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 28, 21, .64), rgba(20, 28, 21, .1));
}

.interlude-content {
    position: relative;
    z-index: 1;
}

.interlude-english {
    font: 700 clamp(62px, 6.6vw, 108px)/1.05 var(--serif);
    letter-spacing: -.035em;
    margin: 22px 0 28px;
}

.interlude-content h2 {
    font-size: clamp(24px, 2vw, 33px);
    margin-bottom: 30px;
}

.interlude-caption {
    position: absolute;
    bottom: 30px;
    right: var(--gutter);
    font-size: 13px;
    letter-spacing: .1em;
}

/* A darker technical rhythm for the project process. */
.process {
    position: relative;
    background: #414b39;
    background-image: linear-gradient(rgba(220, 226, 203, .045) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(220, 226, 203, .045) 1px, transparent 1px);
    background-size: 80px 80px;
    color: #f0efdf;
}

.process .eyebrow {
    color: #d0c19c;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin-top: 65px;
}

.process-grid article {
    border-top: 1px solid #8a9478;
    position: relative;
    padding-top: 28px;
}

.process-grid article::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #d9c295;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: 0;
}

.process-grid span {
    font: 57px var(--serif);
    color: #c4b78f;
}

.process-grid h3 {
    margin: 22px 0 14px;
    font-size: 20px;
}

.process-grid p {
    font-size: 14px;
    color: #d6dacb;
}

.home-news {
    background: #efece3;
}

.home-news .news-card {
    padding-bottom: 25px;
    border-bottom: 1px solid #bbb29f;
}

.home-news .eyebrow {
    color: #736047;
}

.home-news .news-card h3 {
    font-size: 23px;
}

.home-news .news-card > p:not(.eyebrow) {
    color: #64665a;
    font-size: 15px;
}

.page-index .contact-band {
    padding-block: 85px;
}


/* Applied only after IntersectionObserver is available. */
.reveal-pending {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .65, .3, 1);
}

.reveal-pending.is-revealed {
    opacity: 1;
    transform: none;
}

@media (min-width: 1700px) {
    .story-visual {
        max-width: 790px;
    }

    .story-content {
        max-width: 710px;
    }
}

@media (max-width: 1200px) {
    .home-story {
        gap: 50px;
        padding-block: 85px 100px;
    }

    .story-pillars {
        gap: 12px;
    }

    .story-pillars span {
        letter-spacing: -.025em;
    }

    .hero-bottom > span {
        display: none;
    }
}

@media (max-width: 1050px) {
    .home-hero {
        height: calc(100svh - 80px);
    }

    .home-story {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .story-visual {
        width: 85%;
        max-width: 680px;
        margin-inline: auto;
    }

    .story-main-photo img {
        aspect-ratio: 1.35;
    }

    .story-content {
        max-width: 760px;
        margin-inline: auto;
    }

    .story-content h2 {
        font-size: 40px;
    }

    .story-pillars {
        gap: 25px;
    }

    .home-services .service-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 20px;
    }

    .home-services .service-card-copy {
        padding: 22px 18px;
    }

    .home-services .service-card p {
        padding-right: 0;
    }

    .home-services .round-arrow {
        position: static;
        display: block;
        margin-top: 12px;
    }

    .home-services .service-card .eyebrow {
        letter-spacing: 0;
    }

    .featured-grid .case-card {
        flex-basis: 76%;
    }

    .featured-grid .case-card:last-child {
        margin-right: 20%;
    }

    .process-grid {
        gap: 18px;
    }
}

@media (max-width: 850px) {
    .home-services .service-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .home-services .service-card:nth-child(n) {
        grid-column: auto;
        margin-top: 0;
    }

    .home-services .service-card > a {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        height: 100%;
        align-items: center;
    }

    .home-services .service-card img {
        height: 100%;
        min-height: 250px;
    }

    .home-services .service-card-copy {
        padding: 26px;
    }

    .space-interlude {
        min-height: 600px;
    }

    .interlude-image {
        inset: 0;
        will-change: auto;
    }

    .process-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 38px;
    }

    .case-slider-footer {
        gap: 24px;
    }

    .slider-hint {
        display: none;
    }

    .home-news .news-grid {
        gap: 35px;
    }

    .home-news .news-card {
        padding: 0 0 30px;
    }
}

@media (max-width: 560px) {
    .home-hero {
        min-height: 710px;
        max-height: 940px;
    }

    .hero-image {
        object-position: 62% center;
    }

    .hero-shade {
        background: linear-gradient(90deg, rgba(19, 23, 17, .57), rgba(19, 23, 17, .22)),
                    linear-gradient(0deg, rgba(19, 23, 17, .64), transparent 50%);
    }

    .home-hero-copy {
        top: 12%;
    }

    .hero-english {
        font-size: clamp(43px, 12.9vw, 68px);
        margin-bottom: 30px;
    }

    .home-hero h1 {
        font-size: 21px;
        letter-spacing: .025em;
        max-width: 330px;
    }

    .home-hero-copy > p:not(.hero-english):not(.eyebrow) {
        font-size: 14px;
        letter-spacing: 0;
    }

    .home-hero-copy .eyebrow {
        letter-spacing: .08em;
    }

    .hero-bottom {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 15px;
        bottom: 20px;
    }

    .hero-bottom > a {
        font-size: 13px;
        letter-spacing: 0;
    }

    .hero-controls {
        justify-content: space-between;
        width: 100%;
    }

    .hero-pause {
        padding-left: 16px;
    }

    .home-story {
        padding-block: 60px 65px;
        gap: 40px;
    }

    .story-visual {
        width: 100%;
        padding-right: 22px;
        padding-bottom: 55px;
    }

    .story-main-photo img {
        aspect-ratio: 1.05;
    }

    .story-side-note {
        left: -18px;
        font-size: 13px;
        letter-spacing: 0;
    }

    .story-detail-photo {
        width: 57%;
        right: -6px;
        border-width: 7px;
    }

    .story-detail-photo figcaption {
        font-size: 13px;
        letter-spacing: 0;
    }

    .story-seal {
        width: 65px;
        height: 84px;
        top: 22px;
        font-size: 18px;
    }

    .story-content h2 {
        font-size: 31px;
        letter-spacing: .025em;
    }

    .story-lead {
        font-size: 19px;
    }

    .story-pillars {
        grid-template-columns: 1fr;
        gap: 17px;
        padding-block: 20px;
    }

    .story-pillars > div {
        display: grid;
        grid-template-columns: 112px 1fr;
        column-gap: 10px;
        align-items: center;
    }

    .story-pillars span {
        grid-row: span 2;
        letter-spacing: 0;
    }

    .story-pillars h3 {
        margin: 0 0 3px;
    }

    .featured h2 {
        font-size: 30px;
    }

    .section-note {
        margin-top: 0;
        margin-bottom: 28px;
    }

    .featured-grid {
        gap: 20px;
    }

    .featured-grid .case-card {
        flex-basis: 88%;
    }

    .featured-grid .case-card:last-child {
        margin-right: 8%;
    }

    .featured-grid .case-card:nth-child(even) {
        padding-top: 0;
    }

    .featured-grid .case-card img {
        aspect-ratio: 1.12;
    }

    .featured-grid .case-card h3 {
        font-size: 20px;
    }

    .featured .card-meta {
        flex-wrap: wrap;
        gap: 8px;
        letter-spacing: 0;
    }

    .case-slider-footer {
        margin-top: 22px;
        gap: 15px;
    }

    .case-slider-controls {
        gap: 8px;
    }

    #case-position {
        margin-right: 7px;
    }

    .circle-button {
        width: 46px;
        height: 46px;
    }

    .home-services {
        padding-bottom: 65px;
    }

    .home-services .service-card > a {
        display: block;
    }

    .home-services .service-card img {
        min-height: 0;
        height: auto;
        aspect-ratio: 1.35;
    }

    .home-services .service-card-copy {
        padding: 25px;
    }

    .home-services .round-arrow {
        position: absolute;
        right: 25px;
        bottom: 25px;
        margin-top: 0;
    }

    .home-services .service-card p {
        padding-right: 28px;
    }

    .space-interlude {
        min-height: 580px;
        padding-block: 60px;
    }

    .interlude-image {
        background-position: 60% center;
    }

    .interlude-english {
        font-size: 61px;
    }

    .interlude-content h2 {
        font-size: 22px;
    }

    .interlude-caption {
        font-size: 13px;
        bottom: 22px;
        letter-spacing: 0;
    }

    .process-grid {
        grid-template-columns: 1fr 1fr;
        margin-top: 38px;
        gap: 32px 23px;
    }

    .process-grid span {
        font-size: 47px;
    }

    .process-grid h3 {
        font-size: 18px;
    }

    .process-grid p {
        font-size: 13px;
    }

    .home-news .news-card h3 {
        font-size: 22px;
    }

    .page-index .contact-band {
        padding-block: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-image,
    .interlude-image,
    .reveal-pending,
    .home-services .service-card:hover {
        transform: none !important;
    }

    .reveal-pending {
        opacity: 1;
    }

    .featured-grid {
        scroll-behavior: auto;
    }
}

