/* ========================================
   XAUMaster EA — Design System
   Component-based, easy to update
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e0e0e0;
    background: #0a0a0f;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

/* --- Design Tokens --- */
:root {
    --gold: #d4a017;
    --gold-light: #f0c040;
    --gold-dark: #a07b10;
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: rgba(212, 160, 23, 0.12);
    --border-light: rgba(255,255,255,0.06);
    --text-primary: #f0f0f0;
    --text-secondary: #9a9ab0;
    --text-muted: #6a6a80;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 60px rgba(212,160,23,0.08);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1140px;
}

/* --- Container --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
}
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-md { padding: 12px 28px; font-size: 0.9375rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; text-align: center; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0a0a0f;
    border-color: var(--gold);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(212,160,23,0.3);
}

.btn-ghost {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: rgba(255,255,255,0.04);
}
.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(212,160,23,0.06);
}

.btn-outline {
    color: var(--gold);
    border-color: var(--gold);
    background: transparent;
}
.btn-outline:hover {
    background: rgba(212,160,23,0.1);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}
.navbar.scrolled {
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}
.logo-icon { color: var(--gold); }
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.lang-flag { font-size: 1rem; }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212,160,23,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,160,23,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}
.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(212,160,23,0.08) 0%, transparent 70%);
}
.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(212,160,23,0.1);
    border: 1px solid rgba(212,160,23,0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 24px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}
.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold-light);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* --- Section Base --- */
.section {
    padding: 100px 0;
}
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}
.section-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(212,160,23,0.08);
    border: 1px solid rgba(212,160,23,0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Features --- */
.features { background: var(--bg-secondary); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: all var(--transition);
}
.feature-card:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212,160,23,0.08);
    border: 1px solid rgba(212,160,23,0.15);
    border-radius: var(--radius-sm);
    color: var(--gold-light);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Performance --- */
.performance-embed { max-width: 900px; margin: 0 auto; }
.embed-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.embed-wrapper iframe {
    width: 100%;
    height: 600px;
    border: none;
}
.embed-fallback {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.embed-fallback .btn { margin-top: 8px; }

/* --- How It Works --- */
.how-it-works { background: var(--bg-secondary); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    position: relative;
}
.step-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), rgba(212,160,23,0.2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}
.step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}
.step-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    transition: color var(--transition);
}
.step-link:hover { color: var(--gold-light); }

/* --- Get Started --- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}
.option-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    position: relative;
    transition: all var(--transition);
}
.option-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-glow);
}
.option-featured {
    border-color: rgba(212,160,23,0.3);
    background: linear-gradient(180deg, rgba(212,160,23,0.04) 0%, var(--bg-card) 40%);
}
.option-badge {
    position: absolute;
    top: -12px;
    left: 32px;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0a0a0f;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.option-icon {
    color: var(--gold-light);
    margin-bottom: 20px;
}
.option-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.option-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}
.option-features {
    list-style: none;
    margin-bottom: 28px;
}
.option-features li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 6px 0;
}
.option-actions { display: flex; flex-direction: column; gap: 12px; }
.option-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}
.option-note strong { color: var(--gold); }

/* --- FAQ --- */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--border-light);
}
.faq-item summary {
    padding: 20px 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color var(--transition);
}
.faq-item summary:hover { color: var(--gold-light); }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--gold);
}
.faq-item p {
    padding: 0 0 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 280px;
}
.footer-links h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.footer-links a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 4px 0;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.footer-copy { margin-top: 8px; }

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 999;
    transition: all var(--transition);
    animation: wa-pulse 3s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 32px rgba(37,211,102,0.6); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10,10,15,0.98);
        backdrop-filter: blur(16px);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .btn-sm.nav-cta { display: none; }

    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 24px; }
    .stat-value { font-size: 1.25rem; }

    .section { padding: 64px 0; }
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .options-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .embed-wrapper iframe { height: 400px; }

    .whatsapp-float { bottom: 20px; right: 20px; width: 52px; height: 52px; }
    .whatsapp-float svg { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }
    .option-card { padding: 28px 20px; }
}

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
    .feature-card, .step-card, .option-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease, border-color var(--transition), background var(--transition), box-shadow var(--transition);
    }
    .feature-card.visible, .step-card.visible, .option-card.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   XAUMaster — Quick Fix Improvements (2026-03-14)
   Designer Agent Optimization v1
   ======================================== */

/* FIX 1: Text-Muted Contrast (AA Compliance) */
:root {
    --text-muted: #7a7a94; /* Improved from #6a6a80 */
}

/* FIX 2: Hero min-height on Mobile */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 100px 0 48px;
    }
}

/* FIX 3: Hamburger Accessibility */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* FIX 4: WhatsApp Tooltip */
.whatsapp-float::before {
    content: 'Chat with us';
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 15, 0.95);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    border: 1px solid var(--border-light);
}
.whatsapp-float:hover::before {
    opacity: 1;
}
@media (max-width: 768px) {
    .whatsapp-float::before { display: none; }
}

/* FIX 5: Footer Link Touch Targets */
.footer-links a {
    padding: 8px 0;
}

/* FIX 6: iframe Loading Skeleton */
.embed-wrapper {
    position: relative;
}
.embed-wrapper.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    z-index: 1;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* FIX 7: Enhanced Button Hover States */
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.2);
}
.btn-ghost:active {
    background: rgba(255, 255, 255, 0.08);
}
.btn-outline:active {
    background: rgba(212, 160, 23, 0.15);
}

/* FIX 8: Feature Icon Hover Animation */
.feature-card:hover .feature-icon {
    transform: scale(1.05);
    background: rgba(212, 160, 23, 0.12);
    border-color: rgba(212, 160, 23, 0.25);
}
.feature-icon {
    transition: all var(--transition);
}

/* FIX 9: Skip to Content */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--gold);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 16px;
}

/* FIX 10: WhatsApp Clearance in Footer */
.footer-bottom {
    padding-bottom: 80px;
}
@media (min-width: 769px) {
    .footer-bottom {
        padding-bottom: 24px;
    }
}

/* ========================================
   PRODUCT BOX COMPONENT
   Premium showcase section
   ======================================== */

.product-box {
    margin: 60px 0;
    padding: 0 24px;
}

.product-box-container {
    max-width: 920px;
    margin: 0 auto;
    background: linear-gradient(135deg, #16161f 0%, #0f0f14 100%);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 16px;
    padding: 48px 40px;
    display: flex;
    align-items: center;
    gap: 48px;
    box-shadow: 0 10px 40px rgba(212,160,23,0.08);
    transition: all 0.3s ease;
}

.product-box-container:hover {
    border-color: rgba(212,160,23,0.4);
    box-shadow: 0 15px 50px rgba(212,160,23,0.15);
}

.product-box-icon {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.product-box-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(212,160,23,0.3));
}

.glow-ring {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { r: 50; opacity: 0.2; }
    50% { r: 52; opacity: 0.5; }
}

.product-box-content {
    flex: 1;
}

.product-box-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d4a017;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.product-box-tagline {
    font-size: 1rem;
    color: #9a9ab0;
    margin: 0 0 24px 0;
    font-weight: 500;
}

.product-box-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(212,160,23,0.12);
}

.product-box-stats .stat {
    text-align: center;
}

.product-box-stats .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #d4a017;
    display: block;
    margin-bottom: 4px;
}

.product-box-stats .stat-label {
    font-size: 0.85rem;
    color: #9a9ab0;
    font-weight: 500;
}

.product-box-description {
    font-size: 0.95rem;
    color: #c0c0d0;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.product-box-subinfo {
    font-size: 0.8rem;
    color: #7a7a94;
    margin: 12px 0 0 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-box-container {
        flex-direction: column;
        gap: 32px;
        padding: 32px 24px;
    }

    .product-box-icon {
        width: 100px;
        height: 100px;
    }

    .product-box-title {
        font-size: 1.4rem;
    }

    .product-box-stats {
        gap: 24px;
    }

    .product-box-stats .stat-value {
        font-size: 1.3rem;
    }
}
