@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================================
   Scarmonit — Homepage redesign (VS Code Dark)
   Loaded only on "/" via front-matter `styles`. Loads AFTER style.css +
   enhanced.css, so these rules override the global neon theme on the home
   route only. Other pages are untouched.
   ========================================================================== */

:root {
    /* Surfaces (VS Code-inspired) */
    --vs-bg:          #1e1e1e;
    --vs-bg-sunken:   #181818;
    --vs-surface:     #252526;
    --vs-surface-2:   #2d2d30;
    --vs-surface-3:   #34343a;
    --vs-border:      #3a3a3d;
    --vs-border-soft: #2b2b2d;

    /* Text */
    --vs-text:        #d4d4d4;
    --vs-text-strong: #f3f3f3;
    --vs-text-dim:    #9a9a9d;
    --vs-text-faint:  #6e7681;

    /* Accents (blues / soft purples / greens / grays only) */
    --vs-blue:        #4fc1ff;
    --vs-blue-2:      #569cd6;
    --vs-purple:      #c586c0;
    --vs-green:       #4ec9b0;
    --vs-string:      #98c379;
    --vs-btn:         #0e639c;
    --vs-btn-hover:   #1177bb;
    --vs-focus:       #007acc;

    /* Depth & shape (subtle shadows, no glow) */
    --vs-shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
    --vs-shadow:      0 4px 14px rgba(0, 0, 0, .35);
    --vs-shadow-lg:   0 14px 34px rgba(0, 0, 0, .45);
    --vs-radius:      10px;
    --vs-radius-lg:   14px;

    --vs-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --vs-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Re-point the global theme tokens so any leftover reference (scrollbar,
       stray gradients, accents) resolves to the new palette on the homepage. */
    --accent-gold:        #4fc1ff;
    --gold:               #4fc1ff;
    --gold-light:         #79d0ff;
    --gold-glow:          transparent;
    --accent-fire:        #c586c0;
    --fire:               #c586c0;
    --color-accent-gold:  #3a3a3d;
    --color-accent-purple:#4a4a4f;
    --color-bg-darker:    #181818;
}

/* ---- Strip the old neon theme on this page ---- */
.bg-wrapper { display: none !important; }                 /* glowing blobs + grid overlay */
h1, h2, h3, .logo { text-shadow: none !important; }       /* text glow */

/* The global main.js adds a `.reveal` scroll animation (opacity:0 +
   translateY) to headings/cards; its IntersectionObserver can leave elements
   stuck invisible. Keep all homepage content reliably visible. */
.reveal { opacity: 1 !important; transform: none !important; }

/* Neutralize the global gradient-gold text fill + Orbitron font on every
   heading/label, and enforce the Inter stack. The global theme paints text
   with `-webkit-text-fill-color: transparent` over a gold gradient, which
   beats plain `color`, so these need !important. */
.hero h1, .hero h1 .accent, .hero-subtitle, .hero-eyebrow,
.section-title, .about-text h2, .feature-card h3, .feature-link,
.channel-details h3, .video-title, .stat-number, .stat-label,
.logo, .footer-logo, .footer-heading, .footer-tagline,
.nav-links a, .nav-dropdown-trigger {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    -webkit-background-clip: border-box !important;
            background-clip: border-box !important;
}
.hero h1, .hero-subtitle, .section-title, .about-text h2, .feature-card h3,
.channel-details h3, .video-title, .logo, .footer-logo, .footer-heading,
.nav-links a, .nav-dropdown-trigger, .hero-eyebrow, .feature-link, .stat-label {
    font-family: var(--vs-sans) !important;
}
.logo::before { -webkit-text-fill-color: var(--vs-blue) !important; }
.hero h1 .accent { color: var(--vs-blue) !important; }
.stat-number { font-family: var(--vs-mono) !important; }

/* Dark, neutral scrollbar (global theme tints it gold) */
* { scrollbar-color: #3a3a3d var(--vs-bg-sunken); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--vs-bg-sunken); }
::-webkit-scrollbar-thumb {
    background: #3a3a3d;
    border-radius: 6px;
    border: 3px solid var(--vs-bg-sunken);
}
::-webkit-scrollbar-thumb:hover { background: #4a4a4f; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    background: var(--vs-bg-sunken);
    color: var(--vs-text);
    font-family: var(--vs-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

a:focus-visible,
button:focus-visible,
.cta-button:focus-visible {
    outline: 2px solid var(--vs-focus);
    outline-offset: 2px;
    border-radius: 6px;
}

/* The navigation bar is defined ONCE, in theme.css (shared by every page).
   It is intentionally NOT styled here so the homepage uses the exact same nav
   as every other page. */

/* ============================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    display: block;
    max-width: none;
    min-height: 0;
    text-align: left;
    padding: clamp(7rem, 11vw, 9.5rem) 1.5rem clamp(4rem, 8vw, 6rem);
    background:
        radial-gradient(1100px 480px at 82% -8%, rgba(79, 193, 255, .07), transparent 60%),
        radial-gradient(900px 480px at -5% 5%, rgba(197, 134, 192, .05), transparent 55%),
        var(--vs-bg);
    border-bottom: 1px solid var(--vs-border-soft);
}

.hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--vs-mono);
    font-size: .8rem;
    color: var(--vs-green);
    background: var(--vs-surface);
    border: 1px solid var(--vs-border);
    padding: .35rem .8rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vs-green); }

.hero h1 {
    font-family: var(--vs-sans);
    font-size: clamp(2.6rem, 5.4vw, 4.1rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.04;
    color: var(--vs-text-strong);
    margin: 0 0 1rem;
    -webkit-text-fill-color: currentColor;
    background: none;
}
.hero h1 .accent { color: var(--vs-blue); -webkit-text-fill-color: var(--vs-blue); }

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 600;
    color: var(--vs-text);
    letter-spacing: normal;
    margin: 0 0 1rem;
}
.hero-lead {
    font-size: 1.05rem;
    color: var(--vs-text-dim);
    max-width: 48ch;
    margin: 0 0 2rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--vs-sans);
    font-weight: 600;
    font-size: .98rem;
    padding: .8rem 1.4rem;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    background: var(--vs-btn);
    color: #fff;
    box-shadow: var(--vs-shadow-sm);
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.cta-button:hover { background: var(--vs-btn-hover); transform: translateY(-1px); }
.cta-button.secondary {
    background: var(--vs-surface-2);
    color: var(--vs-text-strong);
    border-color: var(--vs-border);
    box-shadow: none;
}
.cta-button.secondary:hover { background: var(--vs-surface-3); }

/* Hero "editor window" visual */
.hero-visual { position: relative; }
.code-window {
    background: var(--vs-bg);
    border: 1px solid var(--vs-border);
    border-radius: var(--vs-radius-lg);
    box-shadow: var(--vs-shadow-lg);
    overflow: hidden;
    font-family: var(--vs-mono);
    font-size: .92rem;
}
.code-titlebar {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1rem;
    background: var(--vs-surface);
    border-bottom: 1px solid var(--vs-border-soft);
}
.code-dots { display: flex; gap: .45rem; }
.code-dots span { width: 12px; height: 12px; border-radius: 50%; }
.code-dots .r { background: #ff5f56; }
.code-dots .y { background: #ffbd2e; }
.code-dots .g { background: #27c93f; }
.code-filename { margin-left: .4rem; color: var(--vs-text-faint); font-size: .82rem; }
.code-body { padding: 1.15rem 1.3rem; overflow-x: auto; }
.code-body pre { margin: 0; font-family: inherit; line-height: 1.75; color: var(--vs-text); }
.tok-kw   { color: var(--vs-blue-2); }
.tok-var  { color: #9cdcfe; }
.tok-prop { color: #9cdcfe; }
.tok-str  { color: var(--vs-string); }
.tok-num  { color: #b5cea8; }
.tok-bool { color: var(--vs-blue-2); }
.tok-punc { color: var(--vs-text); }
.tok-com  { color: #6a9955; font-style: italic; }

/* ============================================================================
   SECTIONS
   ========================================================================== */
.features-section,
.about-section,
.youtube-section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.features-section { background: var(--vs-bg-sunken); }
.about-section {
    background: var(--vs-bg);
    border-top: 1px solid var(--vs-border-soft);
    border-bottom: 1px solid var(--vs-border-soft);
}
.youtube-section { background: var(--vs-bg-sunken); }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-title {
    font-family: var(--vs-sans);
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--vs-text-strong);
    margin: 0 0 .6rem;
}
.section-subtitle { color: var(--vs-text-dim); font-size: 1.05rem; margin: 0; }

/* Force section titles bright (global paints them with a gradient fill that
   wins on specificity) */
.section-header .section-title {
    color: var(--vs-text-strong) !important;
    -webkit-text-fill-color: var(--vs-text-strong) !important;
    background-image: none !important;
}

/* Feature cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    display: block;
    text-decoration: none;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border-soft);
    border-radius: var(--vs-radius);
    padding: 1.6rem;
    box-shadow: var(--vs-shadow-sm);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    background: var(--vs-surface-2);
    border-color: var(--vs-blue);
    box-shadow: var(--vs-shadow);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: rgba(79, 193, 255, .1);
    border: 1px solid rgba(79, 193, 255, .2);
    color: var(--vs-blue);
    margin-bottom: 1.1rem;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 {
    font-family: var(--vs-sans);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--vs-text-strong);
    margin: 0 0 .5rem;
}
.feature-card p { color: var(--vs-text-dim); font-size: .95rem; margin: 0 0 1.1rem; }
.feature-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--vs-blue);
    font-weight: 600;
    font-size: .9rem;
    transition: gap .15s ease;
}
.feature-card:hover .feature-link { gap: .65rem; }
.feature-link svg { width: 15px; height: 15px; }

/* Cycle accent colors across cards for tasteful variety (within palette) */
.feature-card:nth-child(3n+2) .feature-icon { background: rgba(197, 134, 192, .1); border-color: rgba(197, 134, 192, .22); color: var(--vs-purple); }
.feature-card:nth-child(3n+3) .feature-icon { background: rgba(78, 201, 176, .1);  border-color: rgba(78, 201, 176, .22);  color: var(--vs-green); }
.feature-card:nth-child(3n+2):hover { border-color: var(--vs-purple); }
.feature-card:nth-child(3n+3):hover { border-color: var(--vs-green); }
.feature-card:nth-child(3n+2) .feature-link { color: var(--vs-purple); }
.feature-card:nth-child(3n+3) .feature-link { color: var(--vs-green); }

/* About + stats */
.about-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.about-text h2 {
    font-family: var(--vs-sans);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--vs-text-strong);
    margin: 0 0 1.2rem;
}
.about-text p { color: var(--vs-text-dim); margin: 0 0 1rem; max-width: 62ch; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-item {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border-soft);
    border-radius: var(--vs-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--vs-shadow-sm);
}
.stat-number {
    font-family: var(--vs-mono);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--vs-blue);
    margin-bottom: .25rem;
    text-shadow: none;
}
.stat-item:nth-child(2) .stat-number { color: var(--vs-purple); }
.stat-item:nth-child(3) .stat-number { color: var(--vs-green); }
.stat-label { color: var(--vs-text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

/* Videos */
.channel-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border-soft);
    border-radius: var(--vs-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--vs-shadow-sm);
}
.channel-info { display: flex; align-items: center; gap: 1rem; }
.channel-avatar img { border-radius: 10px; display: block; }
.channel-details h3 { font-family: var(--vs-sans); margin: 0; color: var(--vs-text-strong); font-size: 1.1rem; font-weight: 600; }
.channel-details p { margin: .15rem 0 0; color: var(--vs-text-dim); font-size: .9rem; }
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--vs-surface-2);
    color: var(--vs-text-strong);
    border: 1px solid var(--vs-border);
    border-radius: 8px;
    padding: .6rem 1.1rem;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s ease;
}
.subscribe-btn:hover { background: var(--vs-surface-3); }
.subscribe-btn svg { width: 18px; height: 18px; color: #ff4d4d; }

.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.video-card {
    background: var(--vs-surface);
    border: 1px solid var(--vs-border-soft);
    border-radius: var(--vs-radius);
    overflow: hidden;
    box-shadow: var(--vs-shadow-sm);
    transition: transform .18s ease, border-color .18s ease;
}
.video-card:hover { transform: translateY(-4px); border-color: var(--vs-border); }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-info { padding: 1rem 1.1rem; }
.video-title { font-family: var(--vs-sans); margin: 0; color: var(--vs-text-strong); font-size: 1rem; font-weight: 600; }
.video-meta { margin: .2rem 0 0; color: var(--vs-text-dim); font-size: .85rem; }
.view-all-videos { text-align: center; margin-top: 2.5rem; }
.view-all-videos .cta-button { background: var(--vs-surface-2); color: var(--vs-text-strong); border-color: var(--vs-border); box-shadow: none; }
.view-all-videos .cta-button:hover { background: var(--vs-surface-3); }
.view-all-videos .cta-button svg { color: #ff4d4d; }

/* ============================================================================
   FOOTER (shared chrome — restyled)
   ========================================================================== */
.site-footer { background: var(--vs-bg); border-top: 1px solid var(--vs-border-soft); }
.footer-logo { font-family: var(--vs-sans); font-weight: 800; color: var(--vs-text-strong); -webkit-text-fill-color: currentColor; background: none; }
.footer-tagline { color: var(--vs-text-dim); }
.footer-brand-accent { height: 3px; width: 48px; border-radius: 2px; background: linear-gradient(90deg, var(--vs-blue), var(--vs-purple)); }
.footer-heading { font-family: var(--vs-sans); color: var(--vs-text-strong); }
.footer-links a { color: var(--vs-text-dim); transition: color .15s ease; }
.footer-links a:hover { color: var(--vs-blue); }
.footer-bottom { border-top: 1px solid var(--vs-border-soft); border-image: none; }
.footer-bottom a { color: var(--vs-blue); }
.footer-social-link { color: var(--vs-text-dim); border: 1px solid var(--vs-border); border-radius: 8px; transition: color .15s ease, background .15s ease; }
.footer-social-link:hover { color: var(--vs-text-strong); background: var(--vs-surface-2); }
.back-to-top { background: var(--vs-btn); color: #fff; border: none; box-shadow: var(--vs-shadow); }
.back-to-top:hover { background: var(--vs-btn-hover); }

/* ============================================================================
   MOTION (subtle, progressive — content is fully visible without it)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .hero-content > *,
    .hero-visual { animation: hxFadeUp .6s ease both; }
    .hero-content > *:nth-child(2) { animation-delay: .05s; }
    .hero-content > *:nth-child(3) { animation-delay: .1s; }
    .hero-content > *:nth-child(4) { animation-delay: .15s; }
    .hero-content > *:nth-child(5) { animation-delay: .2s; }
    .hero-visual { animation-delay: .15s; }
}
@keyframes hxFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero { padding-top: 6.5rem; }
    .about-content { grid-template-columns: 1fr; }
    .about-stats { max-width: 460px; }
}

@media (max-width: 560px) {
    .hero-visual { display: none; }          /* declutter on small screens */
    .hero-buttons .cta-button { flex: 1; justify-content: center; }
    .about-stats { grid-template-columns: 1fr; max-width: none; }
}
