/* VGM Agency — brand site + dashboard */

:root {
    --bg: #0A0E18;
    --surface: #131828;
    --surface-2: #1C2338;
    --surface-3: #252D48;
    --border: #252D48;
    --text: #9AA3B5;
    --text-dim: #64748B;
    --text-faint: #475569;
    --white: #F1F5F9;
    --accent: #F59E0B;
    --accent-2: #EC4899;
    --accent-3: #6366F1;
    --accent-dim: rgba(245,158,11,.15);
    --green: #10B981;
    --red: #EF4444;
    --radius: 10px;
    --radius-lg: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.contain { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* Header */

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,14,24,.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--white); font-weight: 700; font-size: 1.05rem; letter-spacing: .02em;
}
.logo-mark {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .95rem;
}
.nav-links {
    list-style: none; display: flex; align-items: center; gap: 28px;
}
.nav-links a { color: var(--text); font-size: .95rem; }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-signin {
    padding: 7px 16px; border-radius: 8px;
    background: var(--accent); color: #0a0e18 !important; font-weight: 600;
}
.nav-signin:hover { opacity: .9; text-decoration: none; }
.nav-user { display: none; align-items: center; gap: 10px; position: relative; cursor: pointer; }
.nav-user-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface-2); color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .8rem;
}
.nav-user-name { color: var(--white); font-size: .9rem; }
.nav-user-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 180px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 6px;
}
/* Invisible bridge over the 8px gap so the cursor can reach the dropdown without losing :hover */
.nav-user-dropdown::before {
    content: ""; position: absolute;
    top: -8px; left: 0; right: 0; height: 8px;
}
.nav-user:hover .nav-user-dropdown,
.nav-user:focus-within .nav-user-dropdown { display: block; }
.nav-user-dropdown a {
    display: block; padding: 8px 12px; color: var(--text); border-radius: 6px; font-size: .9rem;
}
.nav-user-dropdown a:hover { background: var(--surface-2); color: var(--white); text-decoration: none; }

/* Hero */

.hero {
    padding: 100px 0 80px;
    background: radial-gradient(ellipse at top, rgba(245,158,11,.08), transparent 60%);
    text-align: center;
}
.hero-badge {
    display: inline-block; padding: 6px 14px; margin-bottom: 24px;
    background: var(--accent-dim); color: var(--accent);
    border-radius: 999px; font-size: .8rem; font-weight: 600;
    border: 1px solid rgba(245,158,11,.25);
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800;
    color: var(--white); line-height: 1.1; margin-bottom: 20px;
    letter-spacing: -.02em;
}
.gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
    max-width: 640px; margin: 0 auto 32px;
    font-size: 1.1rem; color: var(--text);
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    padding: 12px 24px; border-radius: var(--radius);
    background: var(--accent); color: #0a0e18 !important;
    font-weight: 600; font-size: .95rem;
}
.btn-primary:hover { opacity: .9; text-decoration: none; }
.btn-ghost {
    padding: 12px 24px; border-radius: var(--radius);
    border: 1px solid var(--border); color: var(--white) !important;
    font-weight: 500; font-size: .95rem;
}
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }

/* Section */

.section { padding: 80px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700;
    color: var(--white); margin-bottom: 12px; letter-spacing: -.01em;
}
.section-header p { color: var(--text); font-size: 1.05rem; }

/* Mission */

.mission-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.mission-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
}
.mission-card h3 { color: var(--white); font-size: 1.15rem; margin-bottom: 10px; }
.mission-card p { font-size: .95rem; }
@media (max-width: 800px) { .mission-grid { grid-template-columns: 1fr; } }

/* Apps grid */

.apps-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.app-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    display: flex; gap: 14px; align-items: center;
    transition: transform .15s ease, border-color .15s ease;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--surface-3); text-decoration: none; }
.app-initial {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: .95rem; flex-shrink: 0;
}
.app-meta h4 { color: var(--white); font-size: 1rem; margin-bottom: 2px; }
.app-meta p { color: var(--text-dim); font-size: .85rem; line-height: 1.4; }

/* Footer */

.site-footer {
    padding: 48px 0 40px; border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: .9rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--white); text-decoration: none; }

/* Signin / Callback pages */

.signin-wrap, .callback-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 40px 20px;
    background: radial-gradient(ellipse at top, rgba(99,102,241,.08), transparent 60%);
}
.signin-card, .callback-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 48px 40px;
    max-width: 440px; width: 100%; text-align: center;
}
.signin-logo { margin-bottom: 24px; }
.signin-card h1 { color: var(--white); font-size: 1.6rem; margin-bottom: 12px; font-weight: 700; }
.signin-card p { color: var(--text); margin-bottom: 32px; font-size: .95rem; }
.apple-btn {
    width: 100%; padding: 14px; border-radius: var(--radius);
    background: #fff; color: #000; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font); font-weight: 600; font-size: 1rem;
}
.apple-btn:hover { opacity: .92; }
.signin-footer { margin-top: 24px; font-size: .8rem; color: var(--text-dim); }
.signin-footer a { color: var(--text); }
.signin-back {
    margin-top: 20px; color: var(--text-dim); font-size: .9rem;
}
.spinner {
    width: 40px; height: 40px; margin: 0 auto 24px;
    border: 3px solid var(--surface-2); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.callback-card h2 { color: var(--white); font-size: 1.3rem; margin-bottom: 8px; font-weight: 700; }
.callback-card p { font-size: .95rem; }
.callback-card .error { color: var(--red); }
.callback-card .success { color: var(--green); }

/* Dashboard */

.dash-wrap { padding: 40px 0 80px; min-height: 100vh; }
.dash-title { color: var(--white); font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.dash-subtitle { color: var(--text); margin-bottom: 40px; }
.dash-section { margin-bottom: 48px; }
.dash-section h2 {
    color: var(--white); font-size: 1.15rem; margin-bottom: 16px;
    font-weight: 600; letter-spacing: .01em;
}
.dash-empty {
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: var(--radius); padding: 32px;
    text-align: center; color: var(--text-dim); font-size: .95rem;
}
.dash-empty button {
    margin-top: 12px; padding: 10px 20px; border-radius: var(--radius);
    background: var(--accent-3); color: #fff; border: 0; cursor: pointer;
    font-family: var(--font); font-weight: 600; font-size: .9rem;
}
.email-list { display: flex; flex-direction: column; gap: 10px; }
.email-row {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.email-row .addr { color: var(--white); font-weight: 500; }
.email-row .provider { color: var(--text-dim); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.email-row .remove-btn {
    padding: 6px 12px; border-radius: 6px; background: transparent;
    border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: .85rem;
}
.email-row .remove-btn:hover { border-color: var(--red); color: var(--red); }
.link-buttons { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.link-btn {
    padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface-2); color: var(--white); cursor: pointer;
    font-family: var(--font); font-weight: 500; font-size: .9rem;
}
.link-btn:hover { background: var(--surface-3); }

/* Modal */

.modal-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 460px;
    max-height: calc(100vh - 40px); overflow: auto;
    animation: modalIn 160ms ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { color: var(--white); font-size: 1.1rem; font-weight: 600; }
.modal-close {
    background: transparent; border: 0; color: var(--text-dim);
    font-size: 1.4rem; cursor: pointer; line-height: 1;
    padding: 4px 10px; border-radius: 6px;
}
.modal-close:hover { background: var(--surface-2); color: var(--white); }
.modal-body { padding: 20px 24px 24px; }
.form-field { margin-bottom: 16px; }
.form-field label {
    display: block; color: var(--white); font-size: .85rem;
    margin-bottom: 6px; font-weight: 500;
}
.form-field input, .form-field select {
    width: 100%; padding: 10px 12px;
    background: var(--bg); color: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font); font-size: .95rem;
}
.form-field input:focus, .form-field select:focus {
    outline: 0; border-color: var(--accent-3);
}
.form-field input::placeholder { color: var(--text-faint); }
.form-help {
    color: var(--text-dim); font-size: .8rem; margin-top: 6px; line-height: 1.5;
}
.form-help a { color: var(--accent); }
.form-row { display: flex; gap: 12px; }
.form-row .form-field { flex: 1; }
.modal-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.modal-error {
    background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
    color: var(--red); padding: 10px 12px; border-radius: var(--radius);
    margin-bottom: 14px; font-size: .85rem;
    display: none;
}
.modal-error.visible { display: block; }

/* Legal pages */

.legal-wrap { padding: 80px 20px; max-width: 720px; margin: 0 auto; }
.legal-wrap h1 { color: var(--white); font-size: 2rem; margin-bottom: 16px; font-weight: 700; }
.legal-wrap h2 { color: var(--white); font-size: 1.2rem; margin-top: 32px; margin-bottom: 10px; font-weight: 600; }
.legal-wrap p { margin-bottom: 14px; }
.legal-wrap .last-updated { color: var(--text-dim); font-size: .9rem; margin-bottom: 32px; }
