/* =========================
   Home Page – editorial layout
   ========================= */

.home-page {
    --home-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --home-ink: #202521;
    --home-muted: #5d6660;
    --home-teal: #1d817e;
    --home-gutter: clamp(20px, 5vw, 72px);
    --home-section-gap: clamp(48px, 5vw, 80px);
    width: 100%;
    overflow-x: clip;
    color: var(--home-ink);
    background: linear-gradient(180deg, #f7f3eb 0%, #f6f4ee 40%, #f3f3eb 75%, #eef2e9 100%);
}

.home-page img {
    display: block;
    max-width: 100%;
    height: auto;
}

.home-page h1,
.home-page h2 {
    margin: 0;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

.home-eyebrow {
    margin: 0 0 14px;
    color: var(--home-teal);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
}

/* Buttons / links */
.home-btn {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 30px;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background-color 0.4s var(--home-ease), color 0.4s var(--home-ease), border-color 0.4s var(--home-ease);
}

.home-btn--primary {
    color: #fff;
    background: var(--home-teal);
    border: 1px solid var(--home-teal);
}

.home-btn--primary:hover,
.home-btn--primary:focus-visible {
    background: transparent;
    color: var(--home-teal);
}

.home-btn--text {
    padding: 0 2px;
    color: var(--home-ink);
    border-bottom: 1px solid currentColor;
    min-height: 44px;
}

.home-btn--text:hover,
.home-btn--text:focus-visible {
    color: var(--home-teal);
}

/* 01 Hero – photographic first screen */
.home-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: max(780px, 94svh);
    overflow: hidden;
    background: #233b33;
    color: #fffaf0;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
            180deg,
            transparent 0,
            transparent calc(100% - clamp(100px, 12vh, 160px)),
            #f7f3eb 100%
        ),
        linear-gradient(90deg, rgba(15, 32, 26, 0.76), rgba(15, 32, 26, 0.38) 55%, rgba(15, 32, 26, 0.1)),
        linear-gradient(0deg, rgba(15, 32, 26, 0.25), transparent 65%);
}

.home-hero-intro {
    position: relative;
    z-index: 2;
    width: calc(100% - 2 * clamp(24px, 8vw, 128px));
    margin: 0 auto;
    padding: clamp(88px, 9vw, 144px) 0;
    translate: 0 -18px;
}

.home-hero .home-eyebrow {
    color: #d7ece1;
}

.home-hero .home-btn--text {
    color: #fffaf0;
}

.home-hero .home-btn--primary:hover,
.home-hero .home-btn--primary:focus-visible {
    color: #fffaf0;
    border-color: #fffaf0;
    background: rgba(15, 32, 26, 0.3);
}

.home-hero .home-btn--text:hover,
.home-hero .home-btn--text:focus-visible {
    color: #d7ece1;
}

.home-hero-intro h1 {
    max-width: min(14ch, 50vw);
    font-size: clamp(2.8rem, 6.5vw, 6rem);
}

.home-hero-description {
    max-width: min(520px, 48vw);
    margin: 28px 0 0;
    color: #f0f0e6;
    font-size: 1.05rem;
    line-height: 1.8;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 36px;
    margin-top: 36px;
}

.home-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.home-page .home-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 60%;
    transform: scale(1.06);
    will-change: transform;
}

/* Statement – a calm, centred bridge from the photograph. */
.home-statement {
    padding: clamp(40px, 4.5vw, 68px) var(--home-gutter);
    padding-top: calc(clamp(40px, 4.5vw, 68px) + clamp(40px, 4vw, 56px));
    text-align: center;
}

.home-statement-text {
    max-width: 30ch;
    margin: 0 auto;
    font-size: clamp(1.7rem, 3.1vw, 3rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.home-statement-accent {
    display: inline-block;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.42em;
    line-height: 1.15;
    color: var(--home-teal);
}

/* Ritual – a connected editorial spread, with the full photograph. */
.home-ritual {
    box-sizing: border-box;
    display: grid;
    width: min(1180px, calc(100% - 2 * var(--home-gutter)));
    margin: calc(var(--home-section-gap) / 4) auto 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
    padding: 12px 0 var(--home-section-gap);
}

.home-ritual-media,
.home-ritual-text {
    min-width: 0;
}

.home-ritual-media img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.home-ritual-text h2 {
    font-size: clamp(2rem, 3.5vw, 3.3rem);
    max-width: 18ch;
}

.home-ritual-text p:not(.home-eyebrow) {
    max-width: 38ch;
    margin: 24px 0 28px;
    font-size: 1.075rem;
    color: var(--home-muted);
    line-height: 1.85;
}

.home-editorial-cta {
    gap: 22px;
    padding: 8px 0;
    color: var(--home-ink);
}

.home-editorial-cta::after {
    content: "→";
    display: inline-block;
    padding-left: 18px;
    border-left: 1px solid var(--home-teal);
    color: var(--home-teal);
    transition: transform 0.7s var(--home-ease), padding-left 0.7s var(--home-ease);
}

.home-editorial-cta:focus-visible {
    outline: 2px solid var(--home-teal);
    outline-offset: 8px;
}

.home-editorial-cta:focus-visible::after {
    transform: translateX(6px);
    padding-left: 30px;
}

@media (hover: hover) and (pointer: fine) {
    .home-editorial-cta:hover::after {
        transform: translateX(6px);
        padding-left: 30px;
    }

}

/* Tea Showcase – a dominant photograph and a quiet interactive presentation. */
.home-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: calc(100% - 2 * var(--home-gutter));
    margin: var(--home-section-gap) auto;
}

.home-showcase-media {
    overflow: hidden;
}

.home-showcase-media img {
    width: 100%;
    height: clamp(460px, 44vw, 660px);
    object-fit: cover;
    object-position: center;
}

.home-showcase-content {
    min-width: 0;
    padding: 36px 0 36px clamp(84px, 9vw, 144px);
}

.home-showcase-copy .home-eyebrow {
    font-size: 1rem;
}

.home-showcase-copy h2 {
    font-size: clamp(2.4rem, 3.7vw, 3.6rem);
}

.home-showcase-description {
    max-width: 36ch;
    margin: 22px 0 30px;
    color: var(--home-muted);
    font-size: 1.15rem;
    line-height: 1.8;
}

.home-showcase-media img,
.home-showcase-copy {
    transition: opacity 0.25s var(--home-ease);
}

.home-showcase.is-changing .home-showcase-media img,
.home-showcase.is-changing .home-showcase-copy {
    opacity: 0.25;
}

.home-showcase-selectors {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(16px, 1.5vw, 24px);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 250px;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--home-teal) transparent;
}

.home-showcase-selector {
    flex: 0 0 144px;
    align-self: flex-start;
    appearance: none;
    min-width: 0;
    min-height: 44px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--home-muted);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
}

.home-showcase-selector img {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 0 auto 10px;
}

.home-showcase-selector[aria-pressed="true"] {
    border-bottom-color: var(--home-teal);
    color: var(--home-teal);
}

.home-showcase-selector:focus-visible {
    outline: 2px solid var(--home-teal);
    outline-offset: 5px;
}

.home-showcase-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Letter – text lives in the photograph's existing right-side negative space. */
.home-letter {
    display: grid;
    align-items: center;
    width: min(1280px, calc(100% - 2 * var(--home-gutter)));
    margin: calc(var(--home-section-gap) * 1.4) auto var(--home-section-gap);
}

.home-letter-media,
.home-letter-text {
    grid-area: 1 / 1;
    min-width: 0;
}

.home-letter-media img {
    width: 100%;
    height: auto;
}

.home-letter-text {
    position: relative;
    z-index: 1;
    width: 41%;
    margin-left: 57%;
    padding: 24px 0;
}

.home-letter-text .home-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.24em;
}

.home-letter-text .home-eyebrow::before {
    content: "";
    flex: 0 0 28px;
    height: 1px;
    background: var(--home-teal);
}

.home-letter-text h2 {
    font-size: clamp(2.2rem, 3vw, 3.2rem);
    line-height: 1.1;
}

.home-letter-text p:not(.home-eyebrow) {
    max-width: 35ch;
    margin: 22px 0 26px;
    color: #454e48;
    font-size: 1.1rem;
    line-height: 1.75;
}

/* A separate arrow keeps the closing link free of the shared underline sweep. */
.home-letter-cta {
    font-size: 1rem;
    font-weight: 500;
    gap: 12px;
    padding: 8px 0;
    color: var(--home-ink);
    transition: color 0.3s var(--home-ease);
}

.home-letter-arrow {
    display: inline-block;
    transition: transform 0.3s var(--home-ease);
}

.home-letter-cta:hover,
.home-letter-cta:focus-visible {
    color: var(--home-teal);
}

.home-letter-cta:hover .home-letter-arrow,
.home-letter-cta:focus-visible .home-letter-arrow {
    transform: translateX(4px);
}

.home-letter-cta:focus-visible {
    outline: 2px solid var(--home-teal);
    outline-offset: 5px;
}

/* Real horizontal movement, independent of reveal transforms; mobile stays unchanged. */
@media (min-width: 721px) {
    .home-hero-intro {
        translate: clamp(25px, 2vw, 40px) -18px;
    }
}

/* A modest desktop widening preserves the uncropped photograph's proportions. */
@media (min-width: 961px) {
    .home-letter {
        width: min(1360px, calc(100% - 1.5 * var(--home-gutter)));
    }

    .home-letter-text {
        background: radial-gradient(ellipse at 42% 50%, rgba(247, 243, 235, 0.24), rgba(247, 243, 235, 0) 72%);
    }
}

/* Scroll reveal – only active once JS has confirmed support */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--home-ease), transform 0.9s var(--home-ease);
    transition-delay: var(--delay, 0ms);
}

.js-reveal [data-reveal="image"] {
    transform: none;
    clip-path: inset(0 0 12% 0);
    transition: opacity 1s var(--home-ease), clip-path 1.1s var(--home-ease);
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.js-reveal [data-reveal="image"].is-visible {
    clip-path: inset(0 0 0 0);
}

/* Preserve the photograph's existing track width while adding desktop breathing room. */
@media (min-width: 1101px) {
    .home-ritual {
        grid-template-columns: calc((100% - clamp(32px, 4vw, 64px)) / 1.88) minmax(0, 1fr);
        column-gap: calc(clamp(32px, 4vw, 64px) + 12px);
    }
}

/* Tablet – keep image/copy relationships while reducing stagger and gaps. */
@media (max-width: 1100px) {
    .home-ritual {
        gap: 32px;
    }

}

/* Tablet: deliberate editorial stacks, without desktop offsets or clipped controls. */
@media (max-width: 960px) {
    .home-page {
        --home-gutter: clamp(20px, 4vw, 32px);
        --home-section-gap: clamp(32px, 4vw, 40px);
    }

    .home-hero {
        min-height: max(620px, 78svh);
    }

    .home-hero-intro {
        box-sizing: border-box;
        width: calc(100% - 2 * var(--home-gutter));
        padding: 64px 0 100px;
        translate: none;
    }

    .home-hero-intro h1 {
        max-width: min(14ch, 62%);
        font-size: clamp(2.8rem, 6vw, 3.6rem);
    }

    .home-hero-description {
        max-width: min(38ch, 62%);
    }

    .home-hero-actions {
        max-width: 100%;
        gap: 16px 24px;
    }

    .home-statement {
        padding: 52px var(--home-gutter) 32px;
    }

    .home-statement-text {
        font-size: clamp(1.65rem, 3.6vw, 2.2rem);
    }

    .home-ritual {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 0;
        padding: 0 0 var(--home-section-gap);
    }

    .home-ritual-media,
    .home-ritual-text {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .home-ritual-media img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .home-ritual-text h2 {
        font-size: clamp(2rem, 4.5vw, 2.6rem);
    }

    .home-ritual-text p:not(.home-eyebrow) {
        max-width: 42ch;
        margin: 18px 0 20px;
        font-size: 1rem;
        line-height: 1.75;
    }

    .home-showcase {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-showcase-media {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .home-showcase-media img {
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .home-showcase-content {
        padding: 24px 0 0;
    }

    .home-showcase-copy h2 {
        font-size: clamp(2rem, 4.5vw, 2.6rem);
    }

    .home-showcase-description {
        max-width: 42ch;
        margin: 18px 0 24px;
        font-size: 1rem;
        line-height: 1.75;
    }

    .home-showcase-selectors {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        height: auto;
        overflow: visible;
    }

    .home-showcase-selector {
        width: 100%;
        min-height: 44px;
        font-size: 0.95rem;
        overflow-wrap: anywhere;
    }

    .home-showcase-selector img {
        max-width: 100px;
    }

    .home-letter {
        display: block;
        margin-top: var(--home-section-gap);
    }

    .home-letter-text {
        box-sizing: border-box;
        width: 100%;
        margin-left: 0;
        padding: 24px 0 0;
        background: none;
    }

    .home-letter-text h2 {
        font-size: clamp(2rem, 4.5vw, 2.6rem);
    }

    .home-letter-text p:not(.home-eyebrow) {
        max-width: 40ch;
        margin: 18px 0 20px;
        font-size: 1rem;
    }
}

/* Mobile: readable hero, full Ritual/Showcase photos and a subject-led Letter viewport. */
@media (max-width: 720px) {
    .home-hero {
        min-height: max(560px, 76svh);
    }

    .home-hero-intro {
        padding: 56px 0 100px;
    }

    .home-hero-intro h1 {
        max-width: 14ch;
        font-size: clamp(2.35rem, 9vw, 3.2rem);
    }

    .home-hero-description {
        max-width: 34ch;
        margin-top: 22px;
        font-size: 1rem;
    }

    .home-hero-actions {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 26px;
        gap: 12px;
    }

    .home-hero-actions .home-btn--primary {
        box-sizing: border-box;
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    .home-hero::after {
        background: linear-gradient(180deg, transparent calc(100% - clamp(100px, 12vh, 160px)), #f7f3eb 100%),
            linear-gradient(90deg, rgba(15, 32, 26, 0.82), rgba(15, 32, 26, 0.62));
    }

    .home-statement {
        padding: 44px var(--home-gutter) 28px;
    }

    .home-statement-text {
        font-size: clamp(1.4rem, 5.7vw, 1.7rem);
    }

    .home-statement-accent {
        font-size: 1.25em;
        white-space: normal;
    }

    .home-showcase-selectors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 20px;
    }

    .home-letter-media {
        overflow: hidden;
    }

    .home-letter-media img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: left center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-page *,
    .home-page *::before,
    .home-page *::after {
        transition: none !important;
        animation: none !important;
    }

    .home-editorial-cta::after,
    .home-letter-cta .home-letter-arrow {
        transform: none !important;
    }

    .home-editorial-cta::after {
        padding-left: 18px !important;
    }

    .home-page .home-hero-image {
        transform: none;
    }
}
