/* ================================================
   HOANG GIANG SOLAR — Tesla-Inspired Landing V2
   Ultra-minimal, premium, high-conversion
   ================================================ */

/* Hide old footer floating buttons when landing is active */
body:has(.lp) .floating-buttons { display: none !important; }

/* ===== Design Tokens ===== */
:root {
    --white: #ffffff;
    --off-white: #fafafa;
    --gray-50: #f5f5f5;
    --gray-100: #ebebeb;
    --gray-200: #d6d6d6;
    --gray-400: #999999;
    --gray-600: #666666;
    --gray-800: #333333;
    --black: #111111;
    --green: #00a86b;
    --green-dark: #008c59;
    --green-light: rgba(0,168,107,.08);
    --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: .4s cubic-bezier(.25,.46,.45,.94);
    --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ===== Global Reset for Landing ===== */
.lp * { box-sizing: border-box; }
.lp { overflow-x: hidden; }

/* ===== Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ===== HERO — Fullscreen Cinematic ===== */
.lp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.5) 100%),
                url('../images/hero-landing-bg.png') center/cover no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}
.lp-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 160px;
    background: linear-gradient(to top, var(--white), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: heroFadeIn 1.2s var(--ease-out) both;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
    font-family: var(--font);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}
.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,.8);
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-primary-lp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--white);
    color: var(--black);
    font-family: var(--font);
    font-size: .92rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary-lp:hover {
    background: var(--green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,168,107,.3);
}
.btn-secondary-lp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: transparent;
    color: var(--white);
    font-family: var(--font);
    font-size: .92rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.4);
    transition: var(--transition);
}
.btn-secondary-lp:hover {
    background: rgba(255,255,255,.12);
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.5);
    font-size: .7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2s infinite;
}
.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== TRUST METRICS ===== */
.lp-trust {
    padding: 80px 0;
    background: var(--white);
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}
.trust-item .trust-number {
    font-family: var(--font);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--black);
    line-height: 1;
    margin-bottom: 4px;
}
.trust-item .trust-number span {
    color: var(--green);
}
.trust-item .trust-label {
    font-size: .82rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* ===== SECTION COMMON ===== */
.lp-section {
    padding: 100px 24px;
}
.lp-section.bg-alt {
    background: var(--gray-50);
}
.lp-section.bg-dark {
    background: var(--black);
    color: var(--white);
}
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}
.section-header .label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 12px;
}
.section-header h2 {
    font-family: var(--font);
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--black);
    line-height: 1.15;
    letter-spacing: -.015em;
    margin: 0 0 12px;
}
.bg-dark .section-header h2 { color: var(--white); }
.section-header p {
    font-size: .95rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}
.bg-dark .section-header p { color: var(--gray-400); }

/* ===== SOLUTION CARDS ===== */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.solution-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    cursor: pointer;
}
.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,.08);
    border-color: transparent;
}
.solution-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .6s var(--ease-out);
}
.solution-card:hover img {
    transform: scale(1.05);
}
.solution-card .card-img-wrap {
    overflow: hidden;
}
.solution-card-body {
    padding: 24px;
}
.solution-card-body h3 {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 6px;
}
.solution-card-body p {
    font-size: .85rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 12px;
}
.solution-card-body .card-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .3s;
}
.solution-card-body .card-link:hover { gap: 10px; }

/* ===== STORY SECTIONS (Alternating) ===== */
.story-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 0;
}
.story-row + .story-row {
    border-top: 1px solid var(--gray-100);
}
.story-row.reverse .story-img { order: 2; }
.story-row.reverse .story-text { order: 1; }

.story-img img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.story-text h3 {
    font-family: var(--font);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--black);
    line-height: 1.25;
    margin: 0 0 16px;
}
.story-text p {
    font-size: .92rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0 0 20px;
}
.story-stat {
    display: flex;
    gap: 32px;
}
.story-stat-item .ss-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
}
.story-stat-item .ss-label {
    font-size: .75rem;
    color: var(--gray-400);
}

/* ===== PROCESS — Tesla Timeline ===== */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}
.process-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--gray-200);
}
.process-step {
    text-align: center;
    position: relative;
    padding: 0 16px;
}
.step-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    color: var(--gray-600);
    transition: var(--transition);
}
.process-step:hover .step-dot {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 0 8px var(--green-light);
}
.process-step h4 {
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 4px;
}
.process-step p {
    font-size: .78rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* ===== PROJECT GALLERY ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}
.project-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}
.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease-out);
}
.project-item:hover img {
    transform: scale(1.08);
}
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity .4s;
}
.project-item:hover .project-overlay { opacity: 1; }
.project-overlay h4 {
    font-size: .88rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 4px;
}
.project-overlay span {
    font-size: .72rem;
    color: rgba(255,255,255,.7);
}

/* ===== FINAL CTA ===== */
.lp-final-cta {
    padding: 100px 24px;
    background: var(--black);
    text-align: center;
}
.final-cta-inner {
    max-width: 560px;
    margin: 0 auto;
}
.final-cta-inner h2 {
    font-family: var(--font);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin: 0 0 12px;
}
.final-cta-inner p {
    font-size: .92rem;
    color: var(--gray-400);
    margin: 0 0 32px;
}
.cta-form {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}
.cta-form input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: var(--white);
    font-family: var(--font);
    font-size: .92rem;
    transition: var(--transition);
}
.cta-form input::placeholder { color: var(--gray-600); }
.cta-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(0,168,107,.15);
}
.cta-form button {
    padding: 16px 32px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-family: var(--font);
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cta-form button:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,168,107,.25);
}
#ctaMsg {
    margin-top: 16px;
    font-size: .85rem;
}

/* ===== FLOATING BUTTONS ===== */
.lp-floating {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}
.lp-float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.lp-float-btn:hover {
    transform: scale(1.12);
    color: var(--white);
}
.float-zalo { background: #0068ff; }
.float-phone {
    background: var(--green);
    animation: phonePulse 2s infinite;
}
@keyframes phonePulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,168,107,.5); }
    70%  { box-shadow: 0 0 0 14px rgba(0,168,107,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,168,107,0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
    .solution-grid { grid-template-columns: 1fr; max-width: 440px; }
    .story-row { grid-template-columns: 1fr; gap: 32px; }
    .story-row.reverse .story-img { order: 0; }
    .story-row.reverse .story-text { order: 0; }
    .process-timeline { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .process-timeline::before { display: none; }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-section { padding: 64px 20px; }
    .lp-hero { background-attachment: scroll; }
}

@media (max-width: 575px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
    .trust-item .trust-number { font-size: 1.8rem; }
    .process-timeline { grid-template-columns: 1fr 1fr; gap: 24px; }
    .project-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-primary-lp, .btn-secondary-lp { width: 100%; max-width: 280px; justify-content: center; }
    .cta-form { flex-direction: column; }
    .cta-form button { width: 100%; }
    .hero-scroll { display: none; }
    .lp-trust { padding: 48px 20px; }
    .lp-section { padding: 48px 16px; }
    .section-header { margin-bottom: 36px; }
    .lp-floating { bottom: 16px; right: 16px; }
    .lp-float-btn { width: 46px; height: 46px; font-size: 1.05rem; }
}
