*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary:   #0D0D15;
    --bg-secondary: #1A1A2E;
    --bg-card:      rgba(26,26,46,0.8);
    --gold-primary: #D4A853;
    --gold-light:   #F0C674;
    --gold-dark:    #B8942D;
    --gold-glow:    rgba(212,168,83,0.2);
    --text-primary: #EAEAEA;
    --text-secondary:#A0A0B0;
    --border-glass: 1px solid rgba(212,168,83,0.2);
    --font:         'Inter', 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
/* Bấm "Mẫu Ảnh" / "Bảng Giá": tiêu đề mục không bị menu cố định che */
section[id] { scroll-margin-top: 64px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.btn-nav {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-ghost {
    background: transparent;
    border: var(--border-glass);
    color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--gold-primary); color: var(--gold-primary); }

/* ─── Hero ────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 60%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(212,168,83,0.1);
    border: 1px solid rgba(212,168,83,0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--gold-light);
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}
.hero-title span {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary-hero {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #0D0D15;
}
.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212,168,83,0.4);
}
.btn-secondary-hero {
    background: rgba(255,255,255,0.06);
    border: var(--border-glass);
    color: var(--text-primary);
}
.btn-secondary-hero:hover { background: rgba(255,255,255,0.1); }

/* ─── Features ────────────────────────────────────── */
.section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.section-sub {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212,168,83,0.1);
}
.feature-card.featured {
    border-color: var(--gold-primary);
    box-shadow: 0 0 25px rgba(212,168,83,0.12);
    background: linear-gradient(135deg, rgba(212,168,83,0.06), rgba(26,26,46,0.9));
}
.feature-card.featured:hover {
    box-shadow: 0 12px 40px rgba(212,168,83,0.25);
}
.hero-update {
    display: inline-block;
    margin-top: 1.75rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(212,168,83,0.4);
    border-radius: 100px;
    background: rgba(212,168,83,0.08);
    color: var(--gold-light);
    font-size: 0.9rem;
    line-height: 1.5;
    text-decoration: none;
    transition: background 0.2s;
}
.hero-update:hover { background: rgba(212,168,83,0.16); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── Pricing ─────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.pricing-card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    transition: transform 0.2s;
}
.pricing-card.popular {
    border-color: var(--gold-primary);
    box-shadow: 0 0 30px rgba(212,168,83,0.2);
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-badge {
    display: inline-block;
    background: var(--gold-primary);
    color: #0D0D15;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}
.pricing-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.pricing-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gold-light);
    margin-bottom: 0.25rem;
}
.pricing-credits { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.25rem; }
.pricing-btn {
    display: block;
    padding: 0.65rem 1rem;
    background: rgba(212,168,83,0.1);
    border: 1px solid rgba(212,168,83,0.3);
    border-radius: 8px;
    color: var(--gold-light);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.pricing-btn:hover { background: var(--gold-primary); color: #0D0D15; }
.pricing-validity { font-size: 0.8rem; color: var(--gold-light); margin-bottom: 1rem; }
.pricing-note {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: var(--border-glass);
    border-radius: 12px;
    background: rgba(212,168,83,0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.pricing-note strong { color: var(--text-primary); }
.price-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-size: 0.88rem; }
.price-table th, .price-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid rgba(212,168,83,0.15); text-align: left; }
.price-table th { color: var(--gold-light); font-weight: 600; }
.price-table td:last-child { color: var(--text-secondary); }

/* ─── Gallery trước / sau ─────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.demo-card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
}
.demo-card.wide { grid-column: 1 / -1; }
.demo-cap { padding: 1rem 1.25rem 1.25rem; }
.demo-cap .demo-tool { font-size: 0.75rem; color: var(--gold-light); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.demo-cap .demo-title { font-weight: 600; margin: 0.25rem 0 0.35rem; }
.demo-cap .demo-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.ba {
    position: relative;
    overflow: hidden;
    background: #111;
    --pos: 50%;
    user-select: none;
    touch-action: pan-y;
}
.ba img { display: block; width: 100%; height: auto; }
.ba .ba-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba .ba-before img { width: 100%; height: 100%; object-fit: cover; }
.ba .ba-line {
    position: absolute;
    top: 0; bottom: 0;
    left: var(--pos);
    width: 2px;
    background: var(--gold-light);
    transform: translateX(-1px);
    pointer-events: none;
}
.ba .ba-line::after {
    content: '⇆';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: #0D0D15;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.ba input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
}
.ba-tag {
    position: absolute;
    top: 10px;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: rgba(13,13,21,0.75);
    font-size: 0.72rem;
    font-weight: 600;
    pointer-events: none;
}
.ba-tag.l { left: 10px; }
.ba-tag.r { right: 10px; color: var(--gold-light); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #111; }
.duo.stack { grid-template-columns: 1fr; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
    .grid-4, .gallery-grid { grid-template-columns: 1fr; }
    .demo-card.wide .duo { grid-template-columns: 1fr; }
}
.duo figure { position: relative; margin: 0; }
.duo img { display: block; width: 100%; height: auto; }
.gallery-note { text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 1.5rem; }

/* ─── Các bước & FAQ ──────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; counter-reset: step; }
.step {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: #0D0D15;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.88rem; color: var(--text-secondary); }
.faq details {
    border: var(--border-glass);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--bg-card);
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.tool-group-title { font-size: 1rem; color: var(--gold-light); margin: 2rem 0 1rem; font-weight: 600; }
.tool-group-title:first-of-type { margin-top: 0; }

/* ─── Footer ──────────────────────────────────────── */
footer {
    border-top: var(--border-glass);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
}
footer a { color: var(--gold-primary); text-decoration: none; }

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .hero { padding: 6.5rem 1.25rem 3rem; min-height: auto; }
    .hero-title { letter-spacing: -1px; }
    .hero-sub { font-size: 0.95rem; margin-bottom: 2rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-hero { width: 100%; max-width: 340px; text-align: center; }
    .section { padding: 3rem 1.25rem; }
    .section-title { font-size: 1.5rem; }
    .grid-3 { grid-template-columns: 1fr; gap: 1rem; }
    .feature-card { padding: 1.5rem; }
    footer { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
    .hero { padding: 6rem 1rem 2rem; }
    .hero-title { font-size: 2rem; }
    .btn-hero { padding-left: 1rem; padding-right: 1rem; }
    .hero-badge { font-size: 0.7rem; padding: 0.3rem 0.75rem; }
    .section { padding: 2rem 1rem; }
    .feature-card { padding: 1.25rem; }
    .feature-title { font-size: 1rem; }
    .feature-desc { font-size: 0.82rem; }
}
