/* =====================================================
   SieuThiCloud v2 — Trang chủ (home.css)
   Chỉ style đặc thù trang home; component chung nằm ở components.css
   ===================================================== */

/* =================== HERO =================== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--stc-gradient-hero);
    color: #fff;
}
.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--stc-space-12);
    min-height: 560px;
    padding-block: var(--stc-space-16);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--stc-space-2);
    padding: 8px 18px;
    border-radius: var(--stc-radius-pill);
    background: var(--stc-white-a14, rgba(255,255,255,.14));
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    font-size: var(--stc-text-md);
    font-weight: var(--stc-weight-medium);
    margin-bottom: var(--stc-space-6);
}
.hero__badge svg { color: #7fd4ff; }

.hero__title {
    color: #fff;
    font-size: var(--stc-text-5xl);
    font-weight: var(--stc-weight-extrabold);
    letter-spacing: -0.02em;
    margin-bottom: var(--stc-space-5);
}
.hero__title span {
    background: linear-gradient(90deg, #7fd4ff, #27a4f2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__desc {
    font-size: var(--stc-text-xl);
    line-height: var(--stc-leading-relaxed);
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin-bottom: var(--stc-space-8);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--stc-space-4); margin-bottom: var(--stc-space-8); }
.btn--outline-light {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    backdrop-filter: blur(6px);
}
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: rgba(255,255,255,.55); }

.hero__meta { display: flex; flex-wrap: wrap; gap: var(--stc-space-6); }
.hero__meta li {
    display: inline-flex;
    align-items: center;
    gap: var(--stc-space-2);
    font-size: var(--stc-text-md);
    color: rgba(255, 255, 255, 0.78);
}
.hero__meta svg { color: #7fd4ff; }

/* --- Hero visual (khung điện thoại viền mỏng + ảnh full, như bản web) --- */
.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__phone {
    position: relative;
    z-index: 2;
    width: clamp(250px, 22vw, 292px);
    padding: 3px;
    overflow: hidden;
    border: 3px solid #0a1835;
    border-radius: 24px;
    background: #0a1835;
    box-shadow: var(--stc-shadow-lg), 0 28px 70px var(--stc-primary-a25);
    transform: perspective(900px) rotateY(-20deg) rotateX(2deg);
    transform-origin: center;
    animation: hero-float 6s ease-in-out infinite;
}
.hero__phone img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 18px;
}

@keyframes hero-float {
    0%, 100% { transform: perspective(900px) rotateY(-20deg) rotateX(2deg) translateY(0); }
    50%      { transform: perspective(900px) rotateY(-20deg) rotateX(2deg) translateY(-14px); }
}

/* --- Float feature cards nhỏ gọn (icon + 2 dòng text) --- */
.hero__float {
    --float-accent: #27a4f2;
    --float-accent-strong: #0ea5e9;
    --float-border: rgba(39, 164, 242, 0.36);
    --float-overlay: rgba(39, 164, 242, 0.16);
    position: absolute;
    z-index: 4;
    isolation: isolate;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: var(--stc-space-2);
    width: max-content;
    max-width: 210px;
    padding: 8px 12px;
    overflow: hidden;
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius-md);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--stc-shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform var(--stc-duration-normal) var(--stc-ease),
                border-color var(--stc-duration-normal) var(--stc-ease),
                box-shadow var(--stc-duration-normal) var(--stc-ease);
}

/* Sọc accent màu bên trái card khi hover */
.hero__float::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(115deg, var(--float-overlay), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12%);
    transition: opacity var(--stc-duration-normal) var(--stc-ease), transform 320ms var(--stc-ease);
}

.hero__float-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--stc-radius-sm);
    background: linear-gradient(145deg, var(--float-accent), var(--float-accent-strong));
    color: #fff;
    box-shadow: 0 6px 14px var(--float-overlay);
    transition: transform var(--stc-duration-normal) var(--stc-ease);
}

.hero__float-text { display: grid; gap: 1px; }
.hero__float-text b {
    color: var(--stc-text-strong);
    font-size: var(--stc-text-xs);
    line-height: 1.3;
}
.hero__float-text small {
    color: var(--stc-text-muted);
    font-size: 11px;
    line-height: 1.35;
}

/* Vị trí 4 góc quanh điện thoại */
.hero__float--control  { --float-accent: #27a4f2; --float-accent-strong: #0ea5e9; --float-border: rgba(39,164,242,.44);  --float-overlay: rgba(39,164,242,.18);  top: 92px;  left: 0; }
.hero__float--android  { --float-accent: #16a34a; --float-accent-strong: #4ade80; --float-border: rgba(22,163,74,.42);   --float-overlay: rgba(22,163,74,.17);   top: 118px; right: 0; }
.hero__float--sync     { --float-accent: #7c3aed; --float-accent-strong: #c084fc; --float-border: rgba(124,58,237,.42);  --float-overlay: rgba(124,58,237,.17);  bottom: 96px; left: 0; }
.hero__float--security { --float-accent: #ea580c; --float-accent-strong: #fbbf24; --float-border: rgba(234,88,12,.42);   --float-overlay: rgba(234,88,12,.17);   bottom: 72px; right: 0; }

@media (hover: hover) and (pointer: fine) {
    .hero__float:hover {
        border-color: var(--float-border);
        box-shadow: var(--stc-shadow-lg), 0 16px 34px var(--float-overlay);
        transform: translateY(-6px) scale(1.02);
    }
    .hero__float:hover::before { opacity: 1; transform: translateX(0); }
    .hero__float:hover .hero__float-icon { transform: scale(1.08); }
}

@media (max-width: 1024px) {
    .hero__float { display: none; }
}

/* --- Hero background decor --- */
.hero__bg { position: absolute; inset: 0; z-index: 1; }
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
}
.hero__orb--1 {
    width: 480px; height: 480px;
    background: #27a4f2;
    top: -160px; right: -80px;
}
.hero__orb--2 {
    width: 380px; height: 380px;
    background: #0f7ac4;
    bottom: -140px; left: -100px;
}
/* ---------- Dải ngân hà (galaxy band) + trường sao canvas ---------- */
.hero__galaxy {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Dải nebula sáng chéo qua hero */
.hero__galaxy::before {
    content: "";
    position: absolute;
    left: -15%;
    right: -15%;
    top: 18%;
    height: 46%;
    transform: rotate(-14deg);
    background: linear-gradient(
        90deg,
        transparent 4%,
        rgba(39, 164, 242, 0.16) 22%,
        rgba(127, 212, 255, 0.28) 42%,
        rgba(255, 255, 255, 0.20) 50%,
        rgba(127, 212, 255, 0.28) 58%,
        rgba(39, 164, 242, 0.16) 78%,
        transparent 96%
    );
    border-radius: 50%;
    filter: blur(38px);
    animation: galaxy-drift 14s ease-in-out infinite;
    z-index: 0;
}

/* Canvas trường sao (particle network) phủ toàn hero */
.hero__galaxy canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@keyframes galaxy-drift {
    0%, 100% { transform: rotate(-14deg) translateY(0);    opacity: 0.75; }
    50%      { transform: rotate(-14deg) translateY(18px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__galaxy::before { animation: none; }
}

/* =================== STATS =================== */
.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--stc-space-6);
    background: var(--stc-surface);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius-lg);
    box-shadow: var(--stc-shadow-sm);
    padding: var(--stc-space-10) var(--stc-space-8);
    margin-top: calc(-1 * var(--stc-space-16));
    position: relative;
    z-index: 3;
}
.stats__item { text-align: center; }
.stats__value {
    font-size: var(--stc-text-4xl);
    font-weight: var(--stc-weight-extrabold);
    background: var(--stc-gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--stc-space-1);
}
.stats__label { color: var(--stc-text-muted); font-size: var(--stc-text-md); }

/* =================== FEATURES =================== */
.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--stc-space-6);
}
.feature-card { padding: var(--stc-space-8) var(--stc-space-6); }
.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: var(--stc-radius-md);
    background: var(--stc-primary-soft);
    color: var(--stc-primary);
    margin-bottom: var(--stc-space-5);
}
.feature-card__title { font-size: var(--stc-text-lg); margin-bottom: var(--stc-space-2); }
.feature-card__desc { color: var(--stc-text-muted); font-size: var(--stc-text-md); line-height: var(--stc-leading-relaxed); }

/* =================== PRODUCTS =================== */
.products__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--stc-space-6);
}
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card__media {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--stc-space-6);
    background: linear-gradient(150deg, var(--stc-primary-softer), var(--stc-primary-soft));
    color: var(--stc-primary);
    border-bottom: 1px solid var(--stc-border);
}
.product-card__body { padding: var(--stc-space-5) var(--stc-space-6); flex: 1; }
.product-card__title { font-size: var(--stc-text-lg); margin-bottom: var(--stc-space-2); }
.product-card__desc { color: var(--stc-text-muted); font-size: var(--stc-text-md); margin-bottom: var(--stc-space-4); }
.product-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--stc-space-2);
}
.product-card__specs li {
    font-size: var(--stc-text-xs);
    font-weight: var(--stc-weight-medium);
    color: var(--stc-text);
    background: var(--stc-neutral-100);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius-pill);
    padding: 3px 10px;
}
.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--stc-space-4) var(--stc-space-6);
    border-top: 1px solid var(--stc-border);
    background: var(--stc-surface-subtle);
}
.product-card__price strong { font-size: var(--stc-text-xl); color: var(--stc-primary-hover); font-weight: var(--stc-weight-bold); }
.product-card__price span { font-size: var(--stc-text-sm); color: var(--stc-text-muted); }
.products__empty { text-align: center; }
.products__more { text-align: center; margin-top: var(--stc-space-10); }

/* =================== STEPS =================== */
.steps__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--stc-space-6);
    counter-reset: step;
    list-style: none;
    padding: 0;
}
.step {
    position: relative;
    padding: var(--stc-space-6);
    background: var(--stc-surface);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius-lg);
}
.step__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--stc-radius-sm);
    background: var(--stc-gradient-primary);
    color: #fff;
    font-weight: var(--stc-weight-bold);
    font-size: var(--stc-text-lg);
    margin-bottom: var(--stc-space-4);
    box-shadow: var(--stc-shadow-primary);
}
.step__title { font-size: var(--stc-text-lg); margin-bottom: var(--stc-space-2); }
.step__desc { color: var(--stc-text-muted); font-size: var(--stc-text-md); }

/* =================== FAQ =================== */
.faq__list { max-width: 780px; margin-inline: auto; display: grid; gap: var(--stc-space-3); }
.faq__item {
    background: var(--stc-surface);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius-md);
    overflow: hidden;
    transition: border-color var(--stc-duration-fast) var(--stc-ease);
}
.faq__item[open] { border-color: var(--stc-primary-a40); }
.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--stc-space-4);
    padding: var(--stc-space-5) var(--stc-space-6);
    font-weight: var(--stc-weight-semibold);
    color: var(--stc-text-strong);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__chevron { flex-shrink: 0; color: var(--stc-text-muted); transition: transform var(--stc-duration-fast) var(--stc-ease); }
.faq__item[open] .faq__chevron { transform: rotate(180deg); color: var(--stc-primary); }
.faq__answer {
    padding: 0 var(--stc-space-6) var(--stc-space-5);
    color: var(--stc-text-muted);
    line-height: var(--stc-leading-relaxed);
}

/* =================== CTA =================== */
.cta { padding-bottom: var(--stc-space-20); }
.cta__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--stc-space-8);
    padding: var(--stc-space-12) var(--stc-space-12);
    border-radius: var(--stc-radius-xl);
    background: var(--stc-gradient-primary);
    color: #fff;
    box-shadow: var(--stc-shadow-primary);
    position: relative;
    overflow: hidden;
}
.cta__box::before {
    content: "";
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    top: -200px; right: -100px;
    pointer-events: none;
}
.cta__title { color: #fff; font-size: var(--stc-text-3xl); margin-bottom: var(--stc-space-2); }
.cta__desc { color: rgba(255, 255, 255, 0.88); font-size: var(--stc-text-lg); }
.cta__actions { display: flex; gap: var(--stc-space-4); flex-shrink: 0; }
.cta__btn {
    background: #fff;
    color: var(--stc-primary-active);
    box-shadow: 0 8px 24px rgba(6, 34, 56, 0.25);
}
.cta__btn:hover { color: var(--stc-primary-active); transform: translateY(-1px); }
.cta__btn--outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.cta__btn--outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* =================== REVEAL ON SCROLL =================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--stc-ease), transform 0.6s var(--stc-ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =================== RESPONSIVE =================== */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; padding-block: var(--stc-space-12); }
    .hero__content { display: flex; flex-direction: column; align-items: center; }
    .hero__visual { display: none; }
    .features__grid, .products__grid { grid-template-columns: repeat(2, 1fr); }
    .steps__grid { grid-template-columns: repeat(2, 1fr); }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .cta__box { flex-direction: column; text-align: center; padding: var(--stc-space-10) var(--stc-space-6); }
}

@media (max-width: 640px) {
    .features__grid, .products__grid, .steps__grid { grid-template-columns: 1fr; }
    .hero__title { font-size: var(--stc-text-4xl); }
    .hero__desc { font-size: var(--stc-text-lg); }
    .stats__grid { padding: var(--stc-space-8) var(--stc-space-4); }
    .cta__actions { flex-direction: column; width: 100%; }
    .cta__btn { width: 100%; }
}

/* Màn rất nhỏ: ẩn danh sách check-list trong hero */
@media (max-width: 500px) {
    .hero__meta { display: none; }
}

/* Màn siêu nhỏ: căn giữa các nút CTA của hero */
@media (max-width: 450px) {
    .hero__actions { justify-content: center; }
}
