/* =========================================================
   Arcpoly — Website Design System
   Dark theme · Accent #f54d2d
   ========================================================= */

:root {
    --bg-base:       #0a0a0b;
    --bg-elevated:   #131315;
    --bg-panel:      #1a1a1c;
    --bg-panel-2:    #222226;
    --bg-overlay:    rgba(14, 14, 14, 0.92);

    --accent:        #f54d2d;
    --accent-soft:   #ff6b4f;
    --accent-deep:   #c43a1f;
    --accent-glow:   rgba(245, 77, 45, 0.18);

    --success:       #10b981;
    --warning:       #f59e0b;
    --info:          #3b82f6;
    --danger:        #ef4444;

    --text-primary:  #ffffff;
    --text-body:     #e5e7eb;
    --text-muted:    #a0a0a0;
    --text-faint:    #6b7280;

    --border:        #2a2a2e;
    --border-soft:   rgba(255,255,255,0.06);

    --radius-sm:  6px;
    --radius:     12px;
    --radius-lg:  20px;

    --shadow:    0 8px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 24px 48px rgba(0,0,0,0.4);

    --container: 1280px;
    --header-h:  72px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-body);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-soft); }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1em; }

/* =================== Layout ==================== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 920px; }
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }

.text-center { text-align: center; }
.text-accent { color: var(--accent) !important; }
.text-muted  { color: var(--text-muted) !important; }
.lead { font-size: 1.15rem; color: var(--text-body); max-width: 740px; margin: 0 auto 32px; }
.eyebrow {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

/* =================== Header ==================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    transition: all 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.site-header .inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; color: white;
    letter-spacing: 0.5px;
    font-size: 1.05rem;
}
.brand img { height: 32px; }
.brand-text { font-family: 'Inter', sans-serif; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
    color: var(--text-body);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: 0.2s var(--ease);
}
.nav a:hover { background: rgba(255,255,255,0.05); color: white; }
.nav a.active { color: var(--accent); }

.header-tools { display: flex; gap: 10px; align-items: center; }

.menu-toggle {
    display: none;
    background: none; border: 0;
    color: white; font-size: 1.3rem;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 900px) {
    .menu-toggle { display: inline-block; }
    .nav {
        position: fixed;
        top: var(--header-h); left: 0; right: 0;
        background: var(--bg-panel);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-110%);
        transition: transform 0.25s var(--ease);
    }
    .nav.open { transform: translateY(0); }
    .header-tools .lang-switch { display: none; }
}

/* =================== Buttons =================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit; font-size: 0.92rem; font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-ghost { background: transparent; color: var(--text-body); border-color: var(--border); }
.btn-ghost:hover { color: white; border-color: var(--border-soft); background: rgba(255,255,255,0.04); }

.btn-soft { background: var(--bg-panel-2); color: white; border-color: var(--border); }
.btn-soft:hover { background: var(--bg-panel); border-color: var(--accent); }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.btn-google {
    background: white; color: #1f2937;
    border: 1px solid #dadce0;
    font-weight: 500;
}
.btn-google:hover {
    background: #f8fafc;
    border-color: #c1c7cd;
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    color: #1f2937;
}
.btn-google img { width: 18px; height: 18px; }

/* =================== Hero / Callout =================== */
.callout {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--text-body);
    font-size: 0.92rem;
}

/* =================== Grid =================== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.25s var(--ease);
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.feature-card .icon {
    width: 48px; height: 48px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.15rem; margin: 0 0 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* =================== Footer ==================== */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h5 {
    color: white;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a { color: var(--text-muted); font-size: 0.9rem; }
.site-footer ul li a:hover { color: var(--accent); }
.site-footer .social { display: flex; gap: 10px; }
.site-footer .social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text-body);
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s var(--ease);
}
.site-footer .social a:hover { background: var(--accent); color: white; border-color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
    display: flex; justify-content: space-between;
    font-size: 0.82rem; color: var(--text-faint);
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: 8px; } }

/* =================== Breadcrumbs =================== */
.breadcrumbs {
    padding-top: calc(var(--header-h) + 20px);
    color: var(--text-faint);
    font-size: 0.85rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs .sep { margin: 0 8px; }

/* Padding-top body cho phần đầu trang khỏi bị header che */
body.has-header > main,
body.has-header > section:first-of-type {
    padding-top: var(--header-h);
}

/* =================== Spinner =================== */
.spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
