/* =========================================================================
   AGL Directory — landing.css
   Front page only: hero ad slider, search band, browse tiles, rails,
   teaser, guides, advertise banner.
   ========================================================================= */

/* -------- Hero slider -------- */
.agl-lp-slider {
    position: relative;
    background: var(--bg-dark);
    color: var(--bg-primary);
    overflow: hidden;
}
.agl-lp-slider::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(218, 119, 86, 0.22) 0%, rgba(28, 25, 23, 0) 60%);
    pointer-events: none;
}
/* All slides share one grid cell, so the band is as tall as the tallest slide. */
.agl-lp-slides {
    position: relative;
    display: grid;
    grid-template-areas: "slide";
    max-width: 1440px;
    margin: 0 auto;
}
.agl-lp-slide {
    grid-area: slide;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 48px;
    padding: 56px 96px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0s linear .5s;
}
.agl-lp-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s;
}
.agl-lp-slide-badge {
    display: inline-block;
    background: var(--accent-coral);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.agl-lp-slide-kicker {
    margin: 0 0 6px;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(250, 249, 246, 0.65);
}
.agl-lp-slide-title {
    font-size: clamp(30px, 4.4vw, 54px);
    line-height: 1.08;
    margin: 0 0 20px;
    color: #fff;
}
.agl-lp-slide-specs {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.agl-lp-slide-specs li {
    border: 1px solid rgba(250, 249, 246, 0.28);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    color: var(--bg-primary);
}
.agl-lp-slide-media {
    background: var(--bg-secondary);
    border-radius: 16px;
    height: clamp(240px, 30vw, 380px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
/* Product photos mostly ship on white, so match it and avoid a box-in-a-box. */
.agl-lp-slide--listing .agl-lp-slide-media { background: #fff; }
.agl-lp-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.agl-lp-slide-media--house {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-coral-dark) 55%, var(--accent-gold) 100%);
    color: var(--bg-primary);
}
.agl-lp-slide-media--house svg { width: 38%; height: auto; max-width: 160px; opacity: 0.92; }

/* Arrows + dots (hidden until JS adds .is-ready, since they do nothing without it). */
.agl-lp-slider:not(.is-ready) .agl-lp-slider-prev,
.agl-lp-slider:not(.is-ready) .agl-lp-slider-next,
.agl-lp-slider:not(.is-ready) .agl-lp-dots { display: none; }
.agl-lp-slider-prev,
.agl-lp-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(250, 249, 246, 0.35);
    background: rgba(28, 25, 23, 0.55);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: background .18s ease, border-color .18s ease;
}
.agl-lp-slider-prev { left: 24px; }
.agl-lp-slider-next { right: 24px; }
.agl-lp-slider-prev:hover,
.agl-lp-slider-next:hover { background: var(--accent-coral); border-color: var(--accent-coral); }
.agl-lp-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 3;
}
.agl-lp-dot {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.agl-lp-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: rgba(250, 249, 246, 0.4);
    transition: background .18s ease, transform .18s ease;
}
.agl-lp-dot.is-active::after { background: var(--accent-coral); transform: scale(1.3); }

@media (max-width: 900px) {
    .agl-lp-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 36px 24px 56px;
    }
    .agl-lp-slide-media { height: 220px; }
    .agl-lp-slider-prev,
    .agl-lp-slider-next { top: auto; bottom: 8px; transform: none; width: 40px; height: 40px; font-size: 26px; }
    .agl-lp-slider-prev { left: 12px; }
    .agl-lp-slider-next { right: 12px; }
}

/* -------- Search band -------- */
.agl-lp-search {
    background: var(--bg-secondary);
    border-top: 4px solid var(--accent-coral);
    border-bottom: 1px solid #E7E0D5;
    padding: 32px 0 28px;
    text-align: center;
}
.agl-lp-search .agl-hero-search {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    box-shadow: 0 6px 20px rgba(28, 25, 23, 0.08);
}
.agl-lp-chips {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.agl-lp-chips a {
    display: inline-block;
    border: 1px solid #D6CCBC;
    background: var(--bg-card);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color .18s ease, background .18s ease;
}
.agl-lp-chips a:hover { color: var(--text-primary); border-color: var(--accent-coral); background: var(--accent-coral-light); }
.agl-lp-statline {
    margin: 18px 0 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}
.agl-lp-statline strong { color: var(--text-primary); }

/* -------- Shared section rhythm -------- */
.agl-lp-section { padding: 64px 0; }
@media (max-width: 720px) { .agl-lp-section { padding: 40px 0; } }

/* -------- Shop by need -------- */
.agl-lp-needs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.agl-lp-need {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.agl-lp-need:hover {
    transform: translateY(-3px);
    border-color: var(--accent-coral);
    box-shadow: 0 8px 22px rgba(28, 25, 23, 0.08);
}
.agl-lp-need-title { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.agl-lp-need-sub { font-size: 14px; color: var(--text-secondary); }
@media (max-width: 860px) { .agl-lp-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .agl-lp-needs { grid-template-columns: 1fr; } }

/* -------- Listing rails -------- */
.agl-lp-rail-section { background: var(--bg-secondary); }
.agl-lp-rail-section + .agl-lp-rail-section { background: var(--bg-primary); }
.agl-lp-rail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.agl-lp-rail-head .agl-section-title { margin-bottom: 0; }
.agl-lp-viewall { font-weight: 600; color: var(--accent-coral-dark); white-space: nowrap; }
.agl-lp-viewall:hover { color: var(--accent-coral); }
.agl-lp-rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 16px;
    -webkit-overflow-scrolling: touch;
}
.agl-lp-rail > .agl-card {
    flex: 0 0 300px;
    max-width: 300px;
    scroll-snap-align: start;
}
/* Hovering arrows, styled like the hero slider's. */
.agl-lp-rail-wrap { position: relative; }
.agl-lp-rail-prev,
.agl-lp-rail-next {
    position: absolute;
    top: 80px; /* centre of the card photo, clear of the names */
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(250, 249, 246, 0.35);
    background: rgba(28, 25, 23, 0.78);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(28, 25, 23, 0.25);
    transition: background .18s ease, border-color .18s ease;
}
.agl-lp-rail-prev { left: -20px; }
.agl-lp-rail-next { right: -20px; }
.agl-lp-rail-prev:hover,
.agl-lp-rail-next:hover { background: var(--accent-coral); border-color: var(--accent-coral); }
.agl-lp-rail-prev[hidden],
.agl-lp-rail-next[hidden] { display: none; }
@media (max-width: 900px) {
    .agl-lp-rail-prev,
    .agl-lp-rail-next { width: 40px; height: 40px; font-size: 26px; }
    .agl-lp-rail-prev { left: -8px; }
    .agl-lp-rail-next { right: -8px; }
}

/* Landing page only: don't label most listings "UNVERIFIED" in the browse rails. */
.agl-lp-rail .agl-badge--unverified { display: none; }
/* comparison.js only loads on directory pages, so Compare would be a dead button here. */
.agl-lp-rail .agl-compare-add { display: none; }
.agl-lp-rail .agl-card-actions .agl-btn-green { flex: 1; text-align: center; }

/* -------- Grow Logic teaser -------- */
.agl-lp-teaser-section { background: var(--accent-coral-light); }
.agl-lp-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.agl-lp-teaser > div { flex: 1 1 420px; max-width: 720px; }
.agl-lp-teaser .agl-section-sub { margin-bottom: 0; }

/* -------- Guides & articles -------- */
.agl-lp-guides {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.agl-lp-guide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 20px;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease;
}
.agl-lp-guide:hover { transform: translateY(-3px); border-color: var(--accent-coral); }
.agl-lp-guide-img { width: calc(100% + 40px); max-width: none; margin: -20px -20px 4px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.agl-lp-guide-kind {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-coral-dark);
}
.agl-lp-guide-title { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.25; }
.agl-lp-guide-excerpt { font-size: 14px; color: var(--text-secondary); }

.agl-lp-guides-head { margin-bottom: 16px; }
.agl-lp-guides + .agl-lp-guides-head { margin-top: 40px; }
.agl-lp-guides-subhead { margin: 0; font-size: 22px; }
.agl-lp-guides--pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agl-lp-guide-art {
    display: block;
    width: calc(100% + 40px);
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
    margin: -20px -20px 4px;
}
@media (max-width: 860px) { .agl-lp-guides--pages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .agl-lp-guides--pages { grid-template-columns: 1fr; } }

/* -------- Advertise banner -------- */
.agl-lp-advertise { background: var(--bg-dark); color: var(--bg-primary); padding: 56px 0; }
.agl-lp-advertise-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.agl-lp-advertise h2 { color: #fff; margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); }
.agl-lp-advertise p { margin: 0; color: rgba(250, 249, 246, 0.75); max-width: 560px; }
.agl-lp-advertise-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.agl-lp-advertise-link { font-size: 14px; color: rgba(250, 249, 246, 0.75); text-decoration: underline; }
.agl-lp-advertise-link:hover { color: #fff; }

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
    .agl-lp-slide,
    .agl-lp-slide.is-active,
    .agl-lp-need,
    .agl-lp-guide,
    .agl-lp-dot::after { transition: none; }
    .agl-lp-need:hover,
    .agl-lp-guide:hover { transform: none; }
}
