/* ZHE'S COFFEE · v0.9 homepage & catalog refinement */

:root {
    --mist-white: #F6F7F4;
    --quartz-milk: #FBFAF4;
    --oat-sand: #E2DED0;
    --graphite: #303638;
    --rain-blue: #C4D0D4;
    --sage-mist: #CBD3C9;
    --stone-blush: #D8C4C1;
    --v09-line: rgba(48, 54, 56, 0.14);
    --v09-line-strong: rgba(48, 54, 56, 0.28);
    --v09-shadow: 0 26px 70px -48px rgba(48, 54, 56, 0.56);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
}

body.v09-home,
body.v09-catalog {
    overflow-x: hidden;
    color: var(--graphite);
    background-color: var(--mist-white);
    background-image:
        radial-gradient(circle at 8% 5%, rgba(196, 208, 212, 0.24), transparent 28rem),
        radial-gradient(circle at 92% 24%, rgba(216, 196, 193, 0.16), transparent 22rem),
        linear-gradient(rgba(48, 54, 56, 0.025) 1px, transparent 1px);
    background-size: auto, auto, 100% 88px;
}

body.v09-home *,
body.v09-catalog * {
    box-sizing: border-box;
}

body.v09-home a,
body.v09-catalog a,
body.v09-home button,
body.v09-catalog button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(90, 107, 117, 0.14);
}

body.v09-home :focus-visible,
body.v09-catalog :focus-visible {
    outline: 3px solid #5A6B75;
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.7rem 1rem;
    color: var(--quartz-milk);
    background: var(--graphite);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

body.v09-home .home-header,
body.v09-catalog .home-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
    padding:
        0.75rem max(1.25rem, env(safe-area-inset-right))
        0.75rem max(1.25rem, env(safe-area-inset-left));
    background: rgba(246, 247, 244, 0.88);
    border-bottom-color: rgba(48, 54, 56, 0.1);
}

body.v09-home .home-logo,
body.v09-catalog .home-logo {
    width: 4.5rem;
    height: 4.5rem;
}

body.v09-home .home-nav,
body.v09-catalog .home-nav {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-end;
    padding: 0.25rem 0;
    scrollbar-width: none;
}

body.v09-home .home-nav::-webkit-scrollbar,
body.v09-catalog .home-nav::-webkit-scrollbar {
    display: none;
}

body.v09-home .home-nav a,
body.v09-catalog .home-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    border-color: rgba(48, 54, 56, 0.14);
    background: rgba(251, 250, 244, 0.58);
}

body.v09-home .home-nav a:hover,
body.v09-catalog .home-nav a:hover {
    border-color: rgba(90, 107, 117, 0.46);
    background: var(--quartz-milk);
}

body.v09-home .home-nav a[aria-current="page"]::after,
body.v09-catalog .home-nav a[aria-current="page"]::after {
    background: #5A6B75;
}

.home-hero-v09 {
    width: min(1320px, calc(100% - 3rem));
    min-height: calc(100svh - 6rem);
    margin: 0 auto;
    padding: clamp(3.5rem, 8vw, 8rem) 0;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5.5rem);
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.home-kicker,
.v09-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    color: #5A6B75;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.home-kicker::before,
.v09-kicker::before {
    content: "";
    width: 2.5rem;
    height: 1px;
    background: #7B8C96;
}

.home-hero-title {
    max-width: 8.4em;
    margin: 0;
    color: var(--graphite);
    font-size: clamp(3.3rem, 6.8vw, 7rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.065em;
    text-wrap: balance;
}

.home-hero-title .light-word {
    display: inline-block;
    color: #5A6B75;
    text-shadow: 0.045em 0.045em 0 rgba(196, 208, 212, 0.62);
}

.home-hero-lead {
    max-width: 42rem;
    margin: 2rem 0 0;
    color: rgba(48, 54, 56, 0.74);
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    line-height: 1.9;
    text-wrap: pretty;
}

.home-hero-lead strong {
    color: var(--graphite);
    font-weight: 800;
}

.home-hero-v09 .hero-cta-row {
    margin-top: 2rem;
}

.home-hero-v09 .cta-primary,
body.v09-catalog .cta-primary {
    min-height: 48px;
    border: 1px solid var(--graphite);
    color: var(--quartz-milk);
    background: var(--graphite);
    box-shadow: 0 18px 42px -28px rgba(48, 54, 56, 0.9);
}

.home-hero-v09 .cta-primary:hover,
body.v09-catalog .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px -24px rgba(48, 54, 56, 0.8);
}

.home-hero-v09 .cta-ghost {
    min-height: 48px;
    border-color: rgba(48, 54, 56, 0.26);
    color: var(--graphite);
    background: rgba(251, 250, 244, 0.7);
}

.home-hero-v09 .cta-ghost:hover {
    border-color: rgba(48, 54, 56, 0.5);
    color: var(--graphite);
    background: var(--quartz-milk);
}

.home-hero-window {
    position: relative;
    min-height: clamp(34rem, 67vw, 46rem);
    margin: 0;
    overflow: hidden;
    background: var(--oat-sand);
    clip-path: polygon(9% 0, 100% 0, 100% 88%, 86% 100%, 0 100%, 0 13%);
    box-shadow: 0 42px 90px -58px rgba(48, 54, 56, 0.78);
}

.home-hero-window::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(246, 247, 244, 0.1), transparent 48%),
        linear-gradient(0deg, rgba(48, 54, 56, 0.18), transparent 46%);
    pointer-events: none;
}

.home-hero-window img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    object-position: 54% center;
}

.home-hero-window figcaption {
    position: absolute;
    right: 1.6rem;
    bottom: 1.35rem;
    z-index: 1;
    color: rgba(251, 250, 244, 0.86);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-system-map,
.home-section-v09 {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.home-system-map {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--v09-line);
    background: var(--v09-line);
}

.home-system-intro,
.home-system-routes {
    background: rgba(251, 250, 244, 0.9);
}

.home-system-intro {
    padding: clamp(2rem, 4vw, 3.6rem);
}

.home-system-intro h2 {
    max-width: 10em;
    margin: 0;
    color: var(--graphite);
    font-size: clamp(1.9rem, 3.6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.home-system-routes {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.home-system-route {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 4vw, 3.4rem);
    color: inherit;
    text-decoration: none;
    border-left: 1px solid var(--v09-line);
    transition: background-color 180ms ease;
}

.home-system-route:hover {
    background: var(--mist-white);
}

.home-system-route span {
    color: #5A6B75;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-system-route h3 {
    margin: 0.45rem 0 0.6rem;
    color: var(--graphite);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.home-system-route p {
    margin: 0;
    color: rgba(48, 54, 56, 0.66);
    font-size: 14px;
    line-height: 1.8;
    text-wrap: pretty;
}

.home-system-route strong {
    color: var(--graphite);
    font-size: 1.4rem;
    font-weight: 500;
}

.home-section-v09 {
    padding-top: clamp(5rem, 10vw, 9rem);
    scroll-margin-top: 7rem;
}

.home-section-head {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 0.55fr);
    align-items: end;
    gap: 2rem;
    margin-bottom: 2.4rem;
}

.home-section-head h2 {
    max-width: 15em;
    margin: 0;
    color: var(--graphite);
    font-size: clamp(2.2rem, 4.8vw, 5rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.home-section-head > p {
    margin: 0;
    color: rgba(48, 54, 56, 0.68);
    font-size: 15px;
    line-height: 1.85;
    text-wrap: pretty;
}

.home-light-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.home-light-card {
    grid-column: span 3;
    min-width: 0;
    min-height: 25rem;
    overflow: hidden;
    border: 1px solid var(--v09-line);
    background: rgba(251, 250, 244, 0.88);
    box-shadow: var(--v09-shadow);
}

.home-light-card:nth-child(n + 5) {
    grid-column: span 4;
}

.home-light-link {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.home-light-art {
    position: relative;
    width: 88%;
    height: 11.5rem;
    margin-left: auto;
    overflow: hidden;
    clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%, 0 25%);
    background: var(--oat-sand);
}

.home-light-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-light-card:nth-child(1) img { object-position: 72% 68%; }
.home-light-card:nth-child(2) img { object-position: 24% 62%; }
.home-light-card:nth-child(3) img { object-position: 58% 64%; }
.home-light-card:nth-child(4) img { object-position: 66% 52%; }
.home-light-card:nth-child(5) img { object-position: 72% 48%; }
.home-light-card:nth-child(6) img { object-position: 44% 46%; }
.home-light-card:nth-child(7) img { object-position: 28% 56%; }

.home-light-number {
    position: absolute;
    right: 0.8rem;
    top: 0.7rem;
    z-index: 1;
    color: rgba(251, 250, 244, 0.92);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-shadow: 0 1px 8px rgba(48, 54, 56, 0.6);
}

.home-light-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    padding: 1.4rem 1.4rem 1.5rem;
}

.home-light-english {
    margin: 0;
    color: #5A6B75;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.home-light-copy h3 {
    margin: 0.35rem 0 0.7rem;
    color: var(--graphite);
    font-size: 1.75rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.home-light-promise {
    margin: 0;
    color: rgba(48, 54, 56, 0.78);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-wrap: pretty;
}

.home-light-flavor {
    margin: 0.85rem 0 1.1rem;
    color: rgba(48, 54, 56, 0.56);
    font-size: 12px;
    line-height: 1.65;
}

.home-light-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    color: #5A6B75;
    font-size: 12px;
    font-weight: 800;
}

.home-light-action::after {
    content: "↗";
    transition: transform 180ms ease;
}

.home-light-link:hover .home-light-art img {
    transform: scale(1.045);
}

.home-light-link:hover .home-light-action::after {
    transform: translate(2px, -2px);
}

.home-spectrum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.home-spectrum-card {
    --spectrum-accent: var(--rain-blue);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--v09-line);
    border-top: 3px solid var(--spectrum-accent);
    background: rgba(251, 250, 244, 0.9);
    box-shadow: var(--v09-shadow);
}

.home-spectrum-card[data-spectrum="honey"] { --spectrum-accent: var(--oat-sand); }
.home-spectrum-card[data-spectrum="forest"] { --spectrum-accent: var(--sage-mist); }
.home-spectrum-card[data-spectrum="mountain"] { --spectrum-accent: var(--stone-blush); }

.home-spectrum-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.home-spectrum-art {
    width: 90%;
    height: clamp(15rem, 28vw, 22rem);
    margin-left: auto;
    overflow: hidden;
    clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%, 0 18%);
    background: var(--oat-sand);
}

.home-spectrum-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-spectrum-card[data-spectrum="flower"] img { object-position: 61% 58%; }
.home-spectrum-card[data-spectrum="honey"] img { object-position: 64% 62%; }
.home-spectrum-card[data-spectrum="forest"] img { object-position: 34% 58%; }
.home-spectrum-card[data-spectrum="mountain"] img { object-position: 62% 64%; }

.home-spectrum-copy {
    padding: clamp(1.5rem, 3.5vw, 2.4rem);
}

.home-spectrum-copy h3 {
    margin: 0;
    color: var(--graphite);
    font-size: clamp(2rem, 3.6vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.home-spectrum-meaning {
    margin: 0.9rem 0 0;
    color: rgba(48, 54, 56, 0.72);
    font-size: 15px;
    line-height: 1.8;
    text-wrap: pretty;
}

.home-spectrum-examples {
    margin: 1.1rem 0 0;
    color: #5A6B75;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.65;
}

.home-spectrum-link:hover .home-spectrum-art img {
    transform: scale(1.035);
}

body.v09-home .founder-panel,
body.v09-home .aarrr-step {
    border-color: var(--v09-line);
    border-left-color: var(--rain-blue);
    background: rgba(251, 250, 244, 0.82);
}

body.v09-home .section-label {
    color: rgba(48, 54, 56, 0.58);
}

body.v09-home .section-label::before {
    background: var(--rain-blue);
}

body.v09-home .section-title {
    color: var(--graphite);
    text-wrap: balance;
}

body.v09-home .aarrr-step .aarrr-num,
body.v09-home .light-chip,
body.v09-catalog .light-card .stage-num,
body.v09-catalog .light-card .role-tag {
    color: #5A6B75;
}

body.v09-home .light-chip:hover,
body.v09-catalog .light-chip:hover {
    border-color: rgba(90, 107, 117, 0.46);
    background: rgba(196, 208, 212, 0.28);
}

body.v09-catalog .page-hero {
    padding-top: clamp(4.5rem, 9vw, 8rem);
}

body.v09-catalog .page-title,
body.v09-catalog .blends-section-title h2 {
    color: var(--graphite);
}

body.v09-catalog .page-title {
    font-size: clamp(2.7rem, 6vw, 6rem);
    letter-spacing: -0.055em;
    text-wrap: balance;
}

body.v09-catalog .eyebrow {
    color: #5A6B75;
    border-color: rgba(90, 107, 117, 0.28);
    background: rgba(251, 250, 244, 0.74);
}

body.v09-catalog .blends-section-title .num {
    color: var(--graphite);
    background: var(--rain-blue);
}

body.v09-catalog .light-card {
    border-color: rgba(48, 54, 56, 0.12);
    border-left-color: var(--rain-blue);
    background: rgba(251, 250, 244, 0.84);
}

body.v09-catalog .light-card .light-actions a.primary {
    border-color: var(--graphite);
    background: var(--graphite);
}

.spectrum-catalog-section {
    width: min(1200px, calc(100% - 3rem));
    margin: 2rem auto 0;
    padding: 0;
    scroll-margin-top: 7rem;
}

.spectrum-catalog-intro {
    --spectrum-accent: var(--rain-blue);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--v09-line);
    border-top: 3px solid var(--spectrum-accent);
    background: rgba(251, 250, 244, 0.9);
    box-shadow: var(--v09-shadow);
}

.spectrum-catalog-section[data-spectrum="honey"] .spectrum-catalog-intro { --spectrum-accent: var(--oat-sand); }
.spectrum-catalog-section[data-spectrum="forest"] .spectrum-catalog-intro { --spectrum-accent: var(--sage-mist); }
.spectrum-catalog-section[data-spectrum="mountain"] .spectrum-catalog-intro { --spectrum-accent: var(--stone-blush); }

.spectrum-catalog-figure {
    margin: 0;
    padding: clamp(0.8rem, 1.6vw, 1.25rem);
    background: rgba(226, 222, 208, 0.25);
}

.spectrum-catalog-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    background: var(--mist-white);
}

.spectrum-catalog-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3.6rem);
}

.spectrum-catalog-copy h3 {
    margin: 0;
    color: var(--graphite);
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.spectrum-catalog-copy .spectrum-kind {
    margin: 0.8rem 0 0;
    color: #5A6B75;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.spectrum-catalog-copy .spectrum-description {
    margin: 1rem 0 0;
    color: rgba(48, 54, 56, 0.7);
    font-size: 14px;
    line-height: 1.85;
    text-wrap: pretty;
}

.spectrum-catalog-copy .spectrum-count {
    margin: 1.25rem 0 0;
    color: rgba(48, 54, 56, 0.5);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.spectrum-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

body.v09-home footer,
body.v09-catalog footer {
    background: rgba(251, 250, 244, 0.6) !important;
    border-top-color: var(--v09-line) !important;
}

@media (hover: hover) and (pointer: fine) {
    .home-light-link:hover,
    .home-spectrum-link:hover,
    .home-system-route:hover {
        cursor: pointer;
    }
}

@media (max-width: 1020px) {
    .home-hero-v09 {
        grid-template-columns: 1fr 0.86fr;
        gap: 2.5rem;
    }

    .home-light-card,
    .home-light-card:nth-child(n + 5) {
        grid-column: span 6;
    }

    .home-light-card:last-child {
        grid-column: 4 / span 6;
    }
}

@media (max-width: 800px) {
    body.v09-home .home-header,
    body.v09-catalog .home-header {
        gap: 0.75rem;
        padding-top: max(0.6rem, env(safe-area-inset-top));
    }

    body.v09-home .home-logo,
    body.v09-catalog .home-logo {
        width: 3.7rem;
        height: 3.7rem;
    }

    body.v09-home .home-nav,
    body.v09-catalog .home-nav {
        justify-content: flex-start;
    }

    .home-hero-v09 {
        width: min(100% - 2rem, 42rem);
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 3.2rem 0 4.5rem;
    }

    .home-hero-title {
        max-width: 7.8em;
        font-size: clamp(3.2rem, 16vw, 5.6rem);
    }

    .home-hero-window {
        min-height: 31rem;
    }

    .home-system-map,
    .home-section-v09 {
        width: min(100% - 2rem, 42rem);
    }

    .home-system-map,
    .home-system-routes,
    .home-section-head,
    .home-spectrum-grid,
    .spectrum-catalog-intro {
        grid-template-columns: 1fr;
    }

    .home-system-route {
        border-left: 0;
        border-top: 1px solid var(--v09-line);
    }

    .home-section-head {
        align-items: start;
    }

    .home-spectrum-art {
        height: clamp(15rem, 70vw, 22rem);
    }

    .spectrum-catalog-section {
        width: min(100% - 2rem, 42rem);
    }

    .spectrum-catalog-copy {
        padding: 1.8rem;
    }
}

@media (max-width: 560px) {
    .home-light-card,
    .home-light-card:nth-child(n + 5),
    .home-light-card:last-child {
        grid-column: 1 / -1;
    }

    .home-light-art {
        width: 91%;
        height: 12.5rem;
    }

    .home-spectrum-copy {
        padding: 1.5rem;
    }

    body.v09-home .aarrr-grid {
        grid-template-columns: 1fr;
    }

    body.v09-catalog .blends-section-title {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .skip-link,
    .home-light-art img,
    .home-spectrum-art img,
    .home-light-action::after,
    .home-system-route,
    .home-hero-v09 .cta-primary,
    .home-hero-v09 .cta-ghost {
        transition: none;
    }

    .light-reveal {
        opacity: 1;
        transform: none;
    }
}
