/* UIUX-003: homepage composition below the global customer shell. */

.home .site-main {
    background: var(--surface-page);
}

.home .site-main > section,
.home .homepage-intelligence-cluster > section,
.home .homepage-guidance-cluster > section {
    padding-block: clamp(2.75rem, 5vw, 4.75rem);
}

.home .site-main > .homepage-hero {
    padding-block: 0;
}

.home .section-header,
.home .section-heading {
    max-width: 46rem;
    margin: 0 0 clamp(1.25rem, 2.5vw, 2rem);
    text-align: left;
}

.home .section-header h2,
.home .section-heading h2,
.home .section-title {
    max-width: 18ch;
    margin: 0;
    font-size: clamp(1.65rem, 2.8vw, 2.65rem);
    line-height: var(--line-height-heading, 1.15);
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.home .section-header p,
.home .section-heading p,
.home .section-description {
    max-width: 66ch;
    margin-top: 0.65rem;
    color: var(--text-secondary);
    line-height: var(--line-height-body, 1.6);
    text-wrap: pretty;
}

.home .section-eyebrow {
    display: none;
}

/* Opening thesis. */
.home .homepage-hero {
    overflow: clip;
    background: var(--surface-section-alt);
}

.home .homepage-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(24rem, 0.95fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: 29rem;
    padding-block: clamp(2rem, 4vw, 4rem);
}

.home .homepage-hero__copy {
    max-width: 42rem;
}

.home .homepage-hero__copy h1 {
    max-width: 11ch;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(2.55rem, 5vw, 4.75rem);
    font-weight: var(--font-weight-bold);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.home .homepage-hero__lead {
    max-width: 60ch;
    margin: 1.25rem 0 0;
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.65;
    text-wrap: pretty;
}

.home .homepage-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 1.5rem;
}

.home .homepage-hero__actions .btn {
    min-height: 3rem;
    padding-inline: 1.2rem;
    border-radius: var(--radius-control);
}

.home .homepage-hero__search-action {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-control);
    background: var(--surface-primary);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.home .homepage-hero__search-action:hover {
    border-color: var(--action-link);
    background: var(--surface-grouped);
}

.home .homepage-hero__search-action:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
}

.home .homepage-hero__search-action > svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--action-link);
}

.home .homepage-hero__search-action span {
    display: grid;
    gap: 0.05rem;
}

.home .homepage-hero__search-action strong {
    font-size: var(--font-size-control, 0.9rem);
    line-height: 1.2;
}

.home .homepage-hero__search-action small {
    color: var(--text-secondary);
    font-size: var(--font-size-caption, 0.72rem);
}

.home .homepage-hero__routes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 1.35rem;
}

.home .homepage-hero__routes a {
    min-height: 2.75rem;
    padding-block: 0.75rem;
    color: var(--action-link);
    font-size: var(--font-size-control, 0.9rem);
    font-weight: var(--font-weight-semibold);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25rem;
}

.home .homepage-hero__catalog {
    align-self: stretch;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--surface-primary);
    box-shadow: var(--shadow-card);
}

.home .homepage-hero__catalog .hero-slider-viewport,
.home .homepage-hero__catalog .hero-slider-track {
    height: 100%;
}

.home .homepage-hero .homepage-hero-feature {
    display: grid;
    flex: 0 0 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    min-height: 25rem;
    padding: 0 0 3.5rem;
    overflow: hidden;
    border: 0;
    background: var(--surface-primary);
    color: var(--text-primary);
    box-shadow: none;
}

.home .homepage-hero-feature__media {
    display: grid;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: var(--surface-grouped);
}

.home .homepage-hero-feature__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 17rem;
    object-fit: contain;
}

.home .homepage-hero-feature__placeholder {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    color: var(--action-link);
}

.home .homepage-hero-feature__placeholder svg {
    width: 3rem;
    height: 3rem;
}

.home .homepage-hero-feature__body {
    padding: 1.1rem 1.25rem 0;
}

.home .homepage-hero-feature__body h2 {
    margin: 0.25rem 0 0;
    color: var(--text-primary);
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.home .homepage-hero-feature__body > p {
    display: -webkit-box;
    margin: 0.45rem 0 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home .homepage-hero-feature__link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
    color: var(--action-link);
    font-size: var(--font-size-control, 0.9rem);
    font-weight: var(--font-weight-semibold);
}

.home .homepage-hero-feature__link svg {
    width: 1rem;
    height: 1rem;
}

.home .homepage-hero .hero-slider-controls {
    inset: auto 0 0;
    height: 3.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-primary);
}

.home .homepage-hero .hero-slider-prev,
.home .homepage-hero .hero-slider-next,
.home .homepage-hero .hero-slider-pause {
    top: 0.45rem;
    bottom: auto;
    width: var(--touch-target-preferred, 44px);
    height: var(--touch-target-preferred, 44px);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.home .homepage-hero .hero-slider-prev { left: 0.5rem; }
.home .homepage-hero .hero-slider-next { right: 0.5rem; }
.home .homepage-hero .hero-slider-pause { right: 3.1rem; }

.home .homepage-hero .hero-slider-dots {
    bottom: 0.5rem;
}

.home .homepage-hero .hero-slider-dot {
    width: var(--touch-target-compact, 40px);
    height: var(--touch-target-compact, 40px);
}

.home .hero-trust-strip {
    border-block: 1px solid var(--border-subtle);
    background: var(--surface-primary);
}

.home .hero-trust-strip__list {
    max-width: var(--container-wide, 85rem);
    padding-block: 0.55rem;
}

.home .hero-trust-strip__link,
.home .hero-trust-strip__static {
    min-height: 3rem;
}

/* Compact discovery taxonomy. */
.home .category-showcase {
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.home .category-showcase__header {
    margin-bottom: 0.8rem;
}

.home .category-showcase__view-all {
    color: var(--text-primary);
}

.home .category-showcase__title {
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    letter-spacing: -0.025em;
}

.home .category-showcase__tile {
    min-width: clamp(7.25rem, 10vw, 9rem);
}

.home .category-showcase__link {
    min-height: 7.25rem;
    padding: 0.75rem;
    border-radius: var(--radius-card);
}

.home .category-showcase__link svg {
    max-height: 3.4rem;
}

.home .discovery-section {
    background: var(--surface-primary);
}

.home .discovery-section .section-header {
    display: block;
}

.home .discovery-section .section-header p {
    text-align: left;
}

.home .discovery-card-title {
    font-size: 0.92rem;
}

.home .discovery-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Commerce comes early; canonical product cards remain unchanged. */
.home .new-products {
    background: var(--surface-section-alt);
}

.home .new-products__header {
    margin-bottom: 1.25rem;
}

.home .new-products-rail__item {
    position: relative;
    align-self: stretch;
}

/* UIUX-008R product cards: the card's own missing-media state already shows
   "Image not available" in the plate. The rail-level status line duplicated
   it and, with the Details toggle now in the plate's top-right corner, it
   wrapped onto the glyph and intercepted the toggle. It stays for assistive
   technology (it precedes the card in reading order) but is visually hidden. */
.home .new-products-rail__media-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

/* UIUX-008R product cards: a missing catalog image keeps exactly the media
   geometry of a real image (the canonical --pc-ratio), so a carousel that
   mixes both never turns jagged. The status line sits over the plate's top
   edge, clear of the centred missing-media glyph. */
.home .new-products-rail__item.is-media-missing .product-card .product-image {
    aspect-ratio: var(--pc-ratio, 3 / 2);
    min-height: 0;
    padding: 0;
}

/* Evidence-led middle journey. */
.home .homepage-intelligence-cluster {
    background: var(--surface-primary);
}

.home .homepage-intelligence-cluster > section:nth-child(2) {
    background: var(--surface-section-alt);
}

.home .why-trust .section-heading {
    max-width: 52rem;
}

.home .trust-icon {
    grid-row: 1 / span 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-control);
}

.home .trust-card h3,
.home .trust-card p {
    margin: 0;
}

.home .trust-card h3 {
    font-size: 1rem;
}

.home .trust-card p {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.home .ingredient-discovery-rail__track {
    --rail-visible-count: 4;
}

.home .ingredient-discovery-rail .ingredient-card {
    border: 0;
    border-radius: var(--radius-card);
    box-shadow: none;
}

.home .ingredient-discovery-rail .ingredient-card__image {
    aspect-ratio: 16 / 10;
}

.home .certification-link {
    min-height: 100%;
    padding: 1rem;
}

.home .certification-heading {
    align-items: flex-start;
}

.home .certification-title {
    font-size: 0.96rem;
    line-height: 1.35;
}

.home .certification-description {
    font-size: 0.8rem;
    line-height: 1.45;
}

.home .homepage-section-footer,
.home .health-goals-footer,
.home .buying-guides-footer,
.home .featured-brands-footer,
.home .faq-section-footer {
    justify-content: flex-start;
    margin-top: 1.25rem;
}

/* Suitability is framed as neutral catalog organization. */
.home .health-goals {
    background: var(--surface-section-alt);
}

.home .health-goal-link {
    min-height: 100%;
    padding: 1rem;
}

.home .health-goal-heading {
    gap: 0.55rem;
}

.home .health-goal-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-control);
}

.home .health-goal-title {
    font-size: 0.96rem;
}

.home .health-goal-description {
    font-size: 0.8rem;
    line-height: 1.45;
}

.home .goal-cta {
    font-size: 0.75rem;
}

/* Decision support and brand context share one close. */
.home .homepage-guidance-cluster {
    background: var(--surface-primary);
}

.home .homepage-guidance-cluster > .featured-brands {
    background: var(--surface-section-alt);
}

.home .buying-guides-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.home .guide-card {
    border: 0;
    border-radius: var(--radius-card);
    background: var(--surface-grouped);
    box-shadow: none;
}

.home .guide-card::before {
    display: none;
}

.home .guide-image {
    aspect-ratio: 16 / 9;
}

.home .guide-content {
    padding: 1rem;
}

.home .guide-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home .brand-content {
    min-width: 0;
    padding: 0;
}

.home .brand-title {
    font-size: 1rem;
}

.home .brand-country,
.home .brand-certifications {
    display: none;
}

.home .brand-card-cta {
    margin-top: 0.3rem;
    font-size: 0.78rem;
}

.home .faq-section {
    background: var(--surface-primary);
}

/* Process, heading and questions share normal document flow. The former
   two-column sticky-heading layout is not part of the R3.2 composition. */

@media (max-width: 1023px) {
    .home .homepage-hero__layout {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr);
        gap: 2rem;
    }

    .home .homepage-hero__copy h1 {
        font-size: clamp(2.4rem, 6vw, 3.75rem);
    }

    .home .homepage-hero .hero-slider-dots {
        display: none;
    }

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

    .home .discovery-card:first-child,
    .home .discovery-card:nth-child(7) {
        grid-column: auto;
    }

    .home .certifications-grid,
    .home .health-goals-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home .buying-guides-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home .site-main > section,
    .home .homepage-intelligence-cluster > section,
    .home .homepage-guidance-cluster > section {
        padding-block: 2.25rem;
    }

    .home .site-main > .homepage-hero {
        padding-block: 0;
    }

    .home .container {
        padding-inline: 1rem;
    }

    .home .homepage-hero__layout {
        display: flex;
        min-height: 0;
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
        padding-block: 1.5rem;
    }

    .home .homepage-hero__copy h1 {
        max-width: 12ch;
        font-size: clamp(2rem, 10vw, 2.75rem);
        line-height: 1;
    }

    .home .homepage-hero__lead {
        margin-top: 0.85rem;
        font-size: 0.96rem;
        line-height: 1.5;
    }

    .home .homepage-hero__actions {
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        gap: 0.55rem;
        margin-top: 1rem;
    }

    .home .homepage-hero__actions .btn,
    .home .homepage-hero__search-action {
        width: 100%;
        min-width: 0;
        min-height: 3.25rem;
        padding-inline: 0.75rem;
    }

    .home .homepage-hero__search-action small {
        display: none;
    }

    .home .homepage-hero__routes {
        gap: 0 0.8rem;
        margin-top: 0.75rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .home .homepage-hero__routes a {
        flex: 0 0 auto;
        min-height: 2.75rem;
        white-space: nowrap;
    }

    .home .homepage-hero__catalog {
        width: 100%;
        align-self: auto;
    }

    .home .homepage-hero .homepage-hero-feature {
        grid-template-columns: minmax(8rem, 0.85fr) minmax(0, 1.15fr);
        grid-template-rows: 1fr;
        min-height: 11.75rem;
        padding: 0 0 3.25rem;
    }

    .home .homepage-hero-feature__media img {
        max-height: none;
        object-fit: cover;
    }

    .home .homepage-hero-feature__body {
        align-self: center;
        padding: 0.85rem;
    }

    .home .homepage-hero-feature__body h2 {
        font-size: 1rem;
    }

    .home .homepage-hero-feature__body > p {
        font-size: 0.76rem;
        -webkit-line-clamp: 2;
    }

    .home .homepage-hero-feature__link {
        min-height: 2.5rem;
        margin-top: 0.2rem;
        font-size: 0.78rem;
    }

    .home .homepage-hero .hero-slider-prev,
    .home .homepage-hero .hero-slider-next,
    .home .homepage-hero .hero-slider-pause {
        top: 0.35rem;
    }

    .home .hero-trust-strip__list {
        padding-inline: 0.75rem;
    }

    .home .hero-trust-strip__item {
        flex-basis: min(72%, 15rem);
    }

    .home .hero-trust-strip__link,
    .home .hero-trust-strip__static {
        min-height: 2.75rem;
        padding-block: 0.2rem;
    }

    .home .hero-trust-strip__subtitle {
        display: none;
    }

    .home .discovery-grid {
        grid-template-columns: 1fr;
    }

    .home .discovery-card {
        min-height: 4.5rem;
        border-right: 0;
    }

    .home .discovery-card-description {
        -webkit-line-clamp: 1;
    }

    .home .trust-grid {
        grid-template-columns: 1fr;
    }

    .home .trust-card {
        border-right: 0;
    }

    .home .ingredient-discovery-rail__track {
        --rail-visible-count: 1.45;
    }

    .home :is(.homepage-section-footer, .health-goals-footer, .buying-guides-footer, .featured-brands-footer, .faq-section-footer) .btn {
        width: auto;
        max-width: 100%;
    }
}

@media (max-width: 359px) {
    .home .container {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        padding-inline: 1rem;
    }

    .home .homepage-hero__actions {
        grid-template-columns: 1fr;
    }

    .home .homepage-hero__search-action {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home .homepage-hero__search-action,
    .home .homepage-hero .hero-slider-track {
        transition: none;
    }
}

/* UIUX-007 — homepage as the opening plate of the Seasonal Evidence Folio. */
.home .site-main > section,
.home .homepage-intelligence-cluster > section,
.home .homepage-guidance-cluster > section {
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-primary);
}

.home .homepage-hero {
    border-top: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-canvas);
}

.home .homepage-hero__layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(25rem, .85fr);
    gap: clamp(2rem, 6vw, 6rem);
    min-height: 34rem;
    padding-block: clamp(3rem, 6vw, 6rem);
}

.home .homepage-hero__copy {
    max-width: 48rem;
}

.home .homepage-hero__copy h1 {
    max-width: 12ch;
    font-size: var(--font-size-display);
    font-weight: 700;
    line-height: var(--line-height-display);
    letter-spacing: -.045em;
}

.home .homepage-hero__lead {
    max-width: 56ch;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.home .homepage-hero__catalog {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    background: var(--surface-primary);
    box-shadow: none;
}

.home .homepage-hero .homepage-hero-feature {
    min-height: 29rem;
}

.home .homepage-hero-feature__media {
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-section-alt);
}

.home .homepage-hero-feature__body h2 {
    font-family: var(--font-heading-sans);
}

.home .homepage-hero__routes {
    padding-top: .75rem;
    border-top: 1px solid var(--border-subtle);
}

.home .section-header,
.home .section-heading {
    max-width: 55rem;
}

.home .section-header h2,
.home .section-heading h2,
.home .section-title {
    max-width: 20ch;
    font-size: var(--font-size-h2);
    font-weight: 700;
    letter-spacing: -.03em;
}

.home :is(.category-showcase, .why-trust-section, .certifications-section, .featured-brands-section) {
    background: var(--surface-section-alt);
}

.home :is(.discovery-card, .trust-card, .certification-card, .health-goal-card, .guide-card, .brand-card) {
    border-color: var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: none;
}

.home :is(.discovery-card, .trust-card) {
    background: transparent;
}

.home :is(.discovery-card, .trust-card, .certification-card, .health-goal-card, .guide-card, .brand-card):hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.home .new-products-section {
    background: var(--surface-primary);
}

.home .buying-guides-section {
    background: color-mix(in srgb, var(--guidance-accent) 7%, var(--surface-primary));
}

.home .faq-section {
    background: var(--surface-canvas);
}

@media (max-width: 1023px) {
    .home .homepage-hero__layout {
        min-height: 0;
        padding-block: 3.5rem;
    }
}

@media (max-width: 767px) {
    .home .homepage-hero__layout {
        gap: 2rem;
        padding-block: 2.5rem;
    }

    .home .homepage-hero__copy h1 {
        max-width: 11ch;
        font-size: clamp(2.75rem, 14vw, 4rem);
    }

    .home .homepage-hero .homepage-hero-feature {
        min-height: 12rem;
        border-radius: 0;
    }
}
