/* ============================================================
   Home page specific styles
   ============================================================ */

/* ---------- Hero slider ---------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    background: var(--c-bg-alt);
}
.hero-track { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.hero-slide {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide img {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, rgba(10,10,10,.5) 0%, rgba(10,10,10,.2) 40%, rgba(10,10,10,.7) 100%);
}
.hero-content {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    padding: 0 80px 86px;
    padding: 0 var(--pad-x) clamp(60px, 8vh, 120px);
    z-index: 3;
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
}
.hero-eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    color: var(--c-white);
    font-family: var(--font-head);
    font-size: 14px;
    letter-spacing: .05em;
    backdrop-filter: blur(4px);
    background: rgba(0,0,0,.2);
}
.hero-content h1 {
    font-size: 82.8px;
    font-size: clamp(39.6px, 5.4vw, 82.8px);
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--c-white);
    text-shadow: 0 16px 50px rgba(0,0,0,.4);
}
.hero-sub {
    margin: 24px 0 0;
    font-family: var(--font-head);
    font-size: 24px;
    font-size: clamp(18px, 1.6vw, 24px);
    color: rgba(255,255,255,.95);
    text-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.hero-actions {
    margin-top: 44px;
    margin-top: clamp(28px, 3.5vw, 44px);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Slider arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    display: grid;
    place-items: center;
    width: 54px; height: 54px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    background: rgba(0,0,0,.3);
    backdrop-filter: blur(4px);
    transition: background .2s, transform .2s;
}
.slider-arrow img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.slider-arrow:hover { background: rgba(0,0,0,.6); transform: translateY(-50%) scale(1.06); }
.slider-prev { left: 40px; left: clamp(16px, 3vw, 40px); }
.slider-next { right: 40px; right: clamp(16px, 3vw, 40px); }

/* Slider dots */
.slider-dots {
    position: absolute;
    left: 50%; bottom: 28px;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    gap: 10px;
}
.slider-dots button {
    width: 10px; height: 10px;
    padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: all .2s;
}
.slider-dots button.is-active { background: var(--c-white); transform: scale(1.3); }

/* ---------- Trust anchors (compact cards) ---------- */
.trust-section { padding: 60px 0; padding: clamp(40px, 4vw, 60px) 0; }
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.trust-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s, border-color .25s;
}
.trust-mini:hover { transform: translateY(-3px); border-color: var(--c-accent); }
.trust-mini__icon {
    width: 40px; height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}
.trust-mini__body strong {
    display: block;
    font-family: var(--font-head);
    font-size: 24px;
    font-size: clamp(18px, 1.6vw, 24px);
    color: var(--c-text);
    line-height: 1.2;
}
.trust-mini__body span {
    display: block;
    margin-top: 4px;
    color: var(--c-text-mute);
    font-size: 14px;
}

/* ---------- Product showcase ---------- */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 72px;
    gap: clamp(32px, 5vw, 72px);
}
.product-info h2 {
    font-size: 72px;
    font-size: clamp(36px, 4.5vw, 72px);
    margin-bottom: 16px;
}
.product-tagline {
    font-family: var(--font-head);
    font-size: 32px;
    font-size: clamp(20px, 2vw, 32px);
    color: var(--c-accent-2);
    margin-bottom: 12px;
}
.product-features {
    color: var(--c-text-soft);
    font-size: 18px;
    margin-bottom: 20px;
}
.product-specs {
    margin-bottom: 24px;
}
.spec-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--c-line);
}
.spec-label {
    color: var(--c-text-mute);
    font-size: 15px;
    align-self: center;
}
.spec-value {
    font-family: var(--font-head);
    font-size: 32px;
    font-size: clamp(22px, 2.2vw, 32px);
    color: var(--c-text);
    text-align: right;
    white-space: nowrap;
}
.spec-value small { font-size: 14px; color: var(--c-text-mute); }
.spec-note {
    grid-column: 1 / -1;
    font-size: 13px;
    color: var(--c-text-mute);
}
.product-visual img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ---------- Scene cards ---------- */
.scenes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.scene-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-line);
    background: var(--c-bg-card);
    box-shadow: var(--shadow);
    transition: transform .3s, border-color .3s;
}
.scene-card:hover { transform: translateY(-6px); border-color: var(--c-accent); }
.scene-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}
.scene-body { padding: 20px 22px 22px; }
.scene-body h3 {
    font-size: 44px;
    font-size: clamp(28px, 2.8vw, 44px);
    margin-bottom: 12px;
    color: var(--c-text);
}
.scene-line {
    color: var(--c-text-soft);
    font-size: 15px;
    margin-bottom: 18px;
}
.scene-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(45,125,110,.15);
    color: var(--c-accent-2);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Clean air standard ---------- */
.standard-section {
    background: var(--c-bg);
}
.container-narrow { max-width: 820px; }
.standard-body {
    text-align: center;
}
.standard-body p {
    font-size: 22px;
    font-size: clamp(16px, 1.4vw, 22px);
    line-height: 2.2;
    color: var(--c-text-soft);
    margin: 0;
}
.standard-body p:first-child { color: var(--c-text-mute); }
.standard-line {
    font-family: var(--font-head);
    color: var(--c-text) !important;
}
.standard-final {
    margin-top: 32px !important;
    color: var(--c-accent-2) !important;
    font-family: var(--font-head);
    font-size: 26px !important;
    font-size: clamp(18px, 1.8vw, 26px) !important;
}

/* ---------- Home news section ---------- */
.home-news__layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.home-news__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.home-news__cards .news-card {
    display: flex;
    flex-direction: column;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .3s, border-color .3s;
}
.home-news__cards .news-card:hover { transform: translateY(-4px); border-color: var(--c-accent); text-decoration: none; }
.home-news__cards .news-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.home-news__cards .news-body { padding: 20px 18px 22px; flex: 1; }
.home-news__cards .news-body h3 { font-size: 16px; margin-bottom: 8px; color: var(--c-text); }
.home-news__cards .news-body p { font-size: 13px; color: var(--c-text-soft); margin: 0; }

/* Right-side industry knowledge list */
.home-news__list {
    padding: 20px 22px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.home-news__list h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--c-accent);
    color: var(--c-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.home-news__more {
    font-size: 13px;
    font-weight: 400;
    color: var(--c-accent);
}
.home-news__list ul { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.home-news__list li { border-bottom: 1px solid var(--c-line); }
.home-news__list li:last-child { border-bottom: 0; }
.home-news__list li a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 14px 0;
    transition: color .2s;
}
.home-news__list li a:hover { text-decoration: none; }
.home-news__list li a:hover .home-news__title { color: var(--c-accent); }
.home-news__date {
    color: var(--c-text-mute);
    font-size: 13px;
    flex-shrink: 0;
    font-family: var(--font-head);
}
.home-news__title {
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.5;
    transition: color .2s;
}

/* ---------- Scroll reveal animation ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .scenes-grid { grid-template-columns: repeat(3, 1fr); }
    .home-news__layout { grid-template-columns: 1fr; }
    .home-news__cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .hero { height: 88vh; min-height: 520px; }
    .product-showcase { grid-template-columns: 1fr; }
    .product-visual { order: -1; }
    .scenes-grid { grid-template-columns: repeat(3, 1fr); }
    .home-news__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    /* Mobile banner: set height by image aspect ratio, cover center-cropped, core content fully visible */
    .hero {
        height: 52vh;
        min-height: 280px;
        max-height: 420px;
    }
    .hero-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    .hero-overlay { background: linear-gradient(180deg, rgba(10,10,10,.15) 0%, rgba(10,10,10,.25) 50%, rgba(10,10,10,.7) 100%); }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .spec-item { grid-template-columns: 1fr; }
    .spec-value { text-align: left; }
    .scenes-grid { grid-template-columns: 1fr; }
    .home-news__cards { grid-template-columns: 1fr; }
    .home-news__list { order: -1; }
}

/* ============================================================
   Home product accordion
   ============================================================ */
.product-accordion {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    height: 605px;
    height: clamp(420px, 56vh, 620px);
    padding-left: 80px;
    padding-left: var(--pad-x);
    padding-right: 80px;
    padding-right: var(--pad-x);
}
.acc-item {
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--c-bg-alt);
    transition: flex-grow .6s cubic-bezier(.22,.61,.36,1);
    box-shadow: var(--shadow);
}
.acc-item.is-open { flex-grow: 5; }
.acc-item__img {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s ease, filter .4s ease;
}
.acc-item.is-open .acc-item__img { transform: scale(1.04); }
.acc-item__overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, rgba(10,10,10,.15) 0%, rgba(10,10,10,.05) 35%, rgba(10,10,10,.82) 100%);
    transition: background .4s ease;
}
.acc-item:not(.is-open) .acc-item__overlay {
    background: linear-gradient(180deg, rgba(10,10,10,.25) 0%, rgba(10,10,10,.55) 100%);
}
.acc-item__body {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    padding: 28px 26px;
    z-index: 2;
    color: var(--c-white);
}
.acc-item__num {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 13px;
    letter-spacing: .12em;
    color: rgba(255,255,255,.7);
    margin-bottom: 8px;
}
.acc-item__title {
    font-family: var(--font-head);
    font-size: 32px;
    font-size: clamp(22px, 2.4vw, 32px);
    color: var(--c-white);
    line-height: 1.1;
    text-shadow: 0 6px 20px rgba(0,0,0,.5);
    white-space: nowrap;
}
.acc-item__detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .6s ease, opacity .5s ease .1s, margin .5s ease;
}
.acc-item.is-open .acc-item__detail {
    max-height: 400px;
    opacity: 1;
    margin-top: 18px;
}
.acc-item__tagline {
    font-family: var(--font-head);
    font-size: 20px;
    font-size: clamp(16px, 1.5vw, 20px);
    color: rgba(255,255,255,.95);
    margin-bottom: 14px;
}
.acc-item__params {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-bottom: 18px;
}
.acc-item__params span {
    font-size: 14px;
    color: rgba(255,255,255,.85);
}
.acc-item__params strong {
    color: var(--c-white);
    font-family: var(--font-head);
    font-size: 16px;
}
.acc-item__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 999px;
    color: var(--c-white);
    font-size: 14px;
    transition: background .2s, border-color .2s;
}
.acc-item__cta:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-white);
}
/* Vertical title (shown at the bottom of the card when collapsed) */
.acc-item__vertical {
    display: none;
}

/* Responsive: switch to vertically stacked expandable layout on mobile */
@media (max-width: 768px) {
    .product-accordion {
        flex-direction: column;
        height: auto;
        gap: 14px;
    }
    .acc-item {
        flex: none;
        height: 120px;
        transition: height .5s ease;
    }
    .acc-item.is-open { height: auto; min-height: 360px; }
    .acc-item__body { padding: 20px 20px; }
    .acc-item__detail { max-height: 0; }
    .acc-item.is-open .acc-item__detail { max-height: 600px; }
}

/* ---------- Home product card brand mark ---------- */
/* Icon positioned relative to the h3 title, bottom-aligned with the model title line, height set to half of the product center */
.home-card__title-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 4em;
    width: auto;
    opacity: .9;
    pointer-events: none;
    user-select: none;
    object-fit: contain;
    z-index: 3;
}

/* ---------- Sleep tech accordion ---------- */
.tiiiair-stats:has(.sleep-tech-accordion) h2 {
    margin-bottom: 8px !important;
}
.tiiiair-stats:has(.sleep-tech-accordion) > p {
    margin-bottom: 0 !important;
}
.sleep-tech-accordion {
    width: 100%;
    margin: 24px auto 0;
    display: flex;
    gap: 16px;
    height: 520px;
    height: clamp(380px, 50vh, 520px);
}
.sleep-tech-item {
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--c-bg-alt);
    transition: flex-grow .6s cubic-bezier(.22,.61,.36,1);
    box-shadow: var(--shadow);
}
.sleep-tech-item.is-open { flex-grow: 4; }
.sleep-tech-item__media {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
}
.sleep-tech-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s ease;
}
.sleep-tech-item.is-open .sleep-tech-item__media img { transform: scale(1.04); }
.sleep-tech-item__media::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.4) 100%);
}
.sleep-tech-item__body {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    padding: 24px;
    z-index: 2;
    color: #fff;
}
.sleep-tech-accordion .sleep-tech-item .sleep-tech-item__body h3 {
    font-family: var(--font-head) !important;
    font-size: 15px !important;
    color: #fff !important;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
    transition: font-size .4s ease;
}
.sleep-tech-accordion .sleep-tech-item.is-open .sleep-tech-item__body h3 {
    font-size: 22px !important;
    font-size: clamp(18px, 1.6vw, 22px) !important;
    white-space: normal;
}
.sleep-tech-accordion .sleep-tech-item__body p {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .6s ease, opacity .5s ease .1s, margin .5s ease;
    font-size: 13px !important;
    line-height: 1.6;
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.sleep-tech-accordion .sleep-tech-item.is-open .sleep-tech-item__body p {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 16px;
    white-space: normal;
    width: 66%;
}
.sleep-tech-accordion .sleep-tech-item__body .btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    text-align: center;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .5s ease .2s, opacity .4s ease .2s;
}
.sleep-tech-accordion .sleep-tech-item.is-open .sleep-tech-item__body .btn {
    max-height: 50px;
    opacity: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content !important;
    margin: 0 !important;
    background: rgba(0,0,0,.7);
    border-color: rgba(255,255,255,.3);
    line-height: 1.4;
}
.sleep-tech-accordion .sleep-tech-item.is-open .sleep-tech-item__body .btn:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
}
@media (max-width: 768px) {
    .sleep-tech-accordion {
        flex-direction: column;
        height: auto;
        gap: 14px;
    }
    .sleep-tech-item {
        flex: none;
        height: 120px;
    }
    .sleep-tech-item.is-open { height: auto; min-height: 320px; }
    .sleep-tech-item__body p { max-height: 200px; opacity: 1; margin-top: 10px; margin-bottom: 12px; white-space: normal; }
    .sleep-tech-item__body .btn { max-height: 50px; opacity: 1; }
}
