/* ============================================================
   YourStreamingTools — custom.css
   Matches BotOfTheSpecter home theme (hs-* + shared tokens)
   ============================================================ */

/* ----------------------------------------------------------
   1. Variables & Reset
   ---------------------------------------------------------- */
:root {
    --bg-base:        #0d0d0f;
    --bg-surface:     #141418;
    --bg-card:        #1a1a20;
    --bg-card-hover:  #1f1f28;
    --bg-input:       #111116;
    --border:         #2a2a35;
    --border-hover:   #3d3d50;
    --text-primary:   #e8e8f0;
    --text-secondary: #9090a8;
    --text-muted:     #5a5a72;
    --accent:         #7c5cbf;
    --accent-hover:   #9070d8;
    --accent-light:   rgba(124, 92, 191, 0.15);
    --green:          #3ecf8e;
    --green-bg:       rgba(62, 207, 142, 0.12);
    --amber:          #f0a500;
    --amber-bg:       rgba(240, 165, 0, 0.12);
    --blue:           #4aa3f0;
    --blue-bg:        rgba(74, 163, 240, 0.12);
    --red:            #f05050;
    --radius-sm:      4px;
    --radius:         8px;
    --radius-lg:      12px;
    --radius-pill:    999px;
    --shadow:         0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg:      0 8px 32px rgba(0, 0, 0, 0.6);
    --topnav-height:  60px;
    --transition:     0.2s ease;
    --container:      1100px;
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-base:        #f4f4f7;
    --bg-surface:     #ffffff;
    --bg-card:        #ffffff;
    --bg-card-hover:  #eeeef2;
    --bg-input:       #ffffff;
    --border:         #e2e2ea;
    --border-hover:   #c9c9d6;
    --text-primary:   #1a1a20;
    --text-secondary: #555567;
    --text-muted:     #6e6e84;
    --accent:         #6b48b0;
    --accent-hover:   #5a3a98;
    --accent-light:   rgba(124, 92, 191, 0.12);
    --green:          #1f9d6b;
    --green-bg:       rgba(31, 157, 107, 0.1);
    --amber:          #b67200;
    --amber-bg:       rgba(182, 114, 0, 0.1);
    --blue:           #2080d6;
    --blue-bg:        rgba(32, 128, 214, 0.1);
    --red:            #c84040;
    --shadow:         0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg:      0 8px 32px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background-color: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body { display: flex; flex-direction: column; min-height: 100vh; }

a { color: var(--accent-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { color: var(--text-primary); font-weight: 600; line-height: 1.3; }

::-webkit-scrollbar { width: 8px; background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

::selection {
    background: var(--accent-light);
    color: var(--text-primary);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top var(--transition);
    font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* ----------------------------------------------------------
   2. Top Navbar (hs-*)
   ---------------------------------------------------------- */
.hs-topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: var(--topnav-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.hs-topnav-inner {
    height: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hs-topnav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}
.hs-topnav-brand img { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.hs-topnav-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.hs-topnav-brand-name .accent { color: var(--accent-hover); }
.hs-topnav-brand:hover .hs-topnav-brand-name { color: var(--accent-hover); }

.hs-topnav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
}

.hs-topnav-link {
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.hs-topnav-link:hover { background: var(--accent-light); color: var(--text-primary); }
.hs-topnav-link.active { background: var(--accent-light); color: var(--accent-hover); font-weight: 600; }

.hs-topnav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.hs-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.hs-theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.hs-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    transition: border-color var(--transition);
}
.hs-hamburger:hover { border-color: var(--border-hover); }
.hs-hamburger span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}
.hs-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hs-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hs-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hs-mobile-nav {
    display: none;
    position: fixed;
    top: var(--topnav-height); left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    z-index: 190;
    padding: 0.5rem 1rem 0.75rem;
    flex-direction: column;
    gap: 0.1rem;
    box-shadow: var(--shadow);
}
.hs-mobile-nav.open { display: flex; }
.hs-mobile-nav .hs-topnav-link { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
.hs-mobile-nav-cta { padding-top: 0.5rem; margin-top: 0.25rem; border-top: 1px solid var(--border); }

/* ----------------------------------------------------------
   3. Layout
   ---------------------------------------------------------- */
.hs-main { flex: 1; padding-top: var(--topnav-height); }

.hs-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----------------------------------------------------------
   4. Buttons (hs-*)
   ---------------------------------------------------------- */
.hs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background var(--transition), opacity var(--transition), box-shadow var(--transition), border-color var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.hs-btn:disabled,
.hs-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.hs-btn-primary { background: var(--accent); color: #fff !important; }
.hs-btn-primary:not(:disabled):hover { background: var(--accent-hover); color: #fff !important; box-shadow: 0 0 0 3px var(--accent-light); }
.hs-btn-secondary { background: var(--blue-bg); color: var(--blue) !important; border: 1px solid rgba(74, 163, 240, 0.35); }
.hs-btn-secondary:not(:disabled):hover { background: rgba(74, 163, 240, 0.2); color: var(--blue) !important; }
.hs-btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.hs-btn-ghost:not(:disabled):hover { background: var(--accent-light); border-color: var(--border-hover); color: var(--text-primary); }
.hs-btn-sm { padding: 0.35rem 0.85rem; font-size: 0.82rem; }
.hs-btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.hs-btn-block { width: 100%; }

/* ----------------------------------------------------------
   5. Hero (yst-* extensions on hs-hero)
   ---------------------------------------------------------- */
.yst-hero {
    position: relative;
    min-height: calc(100vh - var(--topnav-height));
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding: 3rem 0 4rem;
}

.yst-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-light), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 80%, var(--blue-bg), transparent 55%);
}

.yst-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hs-hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-hover);
    background: var(--accent-light);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.hs-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.yst-gradient-text {
    color: var(--accent-hover);
}

.hs-hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.hs-hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.yst-hero-tech {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    flex-wrap: wrap;
    justify-content: center;
}
.yst-hero-tech .yst-tech-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.yst-hero-tech i { font-size: 1.1rem; transition: color var(--transition); }
.yst-hero-tech i:hover { color: var(--accent-hover); }

.yst-hero-scroll {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-surface);
    z-index: 1;
    transition: color var(--transition), border-color var(--transition);
}
.yst-hero-scroll:hover { color: var(--accent-hover); border-color: var(--accent); }

/* ----------------------------------------------------------
   6. Sections
   ---------------------------------------------------------- */
.yst-section {
    padding: 4.5rem 0;
}

.yst-section-alt {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.yst-section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.75rem;
}

.yst-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-hover);
    background: var(--accent-light);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.yst-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.yst-section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.65;
}

.muted { color: var(--text-muted); }

/* ----------------------------------------------------------
   7. Cards (hs-card + yst-*)
   ---------------------------------------------------------- */
.hs-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.hs-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }

.hs-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.yst-card-eyebrow {
    color: var(--accent-hover);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.yst-card-text {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex: 1;
}

.yst-grid {
    display: grid;
    gap: 1.25rem;
}
.yst-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yst-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Stats */
.yst-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.yst-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.yst-stat:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.yst-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    background: var(--accent-light);
    color: var(--accent-hover);
    font-size: 1.1rem;
}

.yst-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-hover);
    line-height: 1;
    letter-spacing: -0.02em;
}

.yst-stat-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 0.45rem;
    font-weight: 500;
}

/* Team */
.yst-team-card {
    text-align: center;
    align-items: center;
}

.yst-team-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-hover);
    font-size: 2.2rem;
    margin-bottom: 1.1rem;
}

.yst-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: auto;
}

.yst-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.yst-tag i { color: var(--accent-hover); font-size: 0.85rem; }

/* Projects */
.yst-project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.yst-project-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid var(--border);
}

.yst-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
}
.yst-status-pill i { font-size: 0.55rem; }
.yst-status-live { color: var(--green); border-color: rgba(62, 207, 142, 0.35); background: var(--green-bg); }
.yst-status-dev { color: var(--amber); border-color: rgba(240, 165, 0, 0.35); background: var(--amber-bg); }
.yst-status-soon { color: var(--accent-hover); border-color: rgba(124, 92, 191, 0.35); background: var(--accent-light); }
.yst-status-archived { color: var(--text-muted); }

/* Contact */
.yst-contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 2rem;
    align-items: center;
}

.yst-contact-blurb h3 {
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}
.yst-contact-blurb p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.65;
}

.yst-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.yst-contact-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: border-color var(--transition), background var(--transition);
}
.yst-contact-tile:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
}
.yst-contact-tile i {
    font-size: 1.3rem;
    color: var(--accent-hover);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.yst-contact-tile strong { display: block; font-size: 0.92rem; margin-bottom: 0.1rem; }
.yst-contact-tile span { color: var(--text-muted); font-size: 0.8rem; }

/* Reveal animation */
.yst-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.yst-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------------------------
   8. Footer (hs-*)
   ---------------------------------------------------------- */
.hs-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin-top: auto;
}

.yst-footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 1.5rem;
    align-items: center;
}

.yst-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.yst-footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.yst-footer-brand strong { display: block; font-size: 0.95rem; }
.yst-footer-brand .muted { font-size: 0.82rem; }

.yst-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.yst-footer-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
}
.yst-footer-links a:hover { color: var(--accent-hover); }

.yst-footer-meta {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}
.yst-footer-meta p { margin: 0; }
.yst-heart { color: var(--red); }

/* Back to top */
.yst-back-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    z-index: 90;
}
.yst-back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.yst-back-top:hover { background: var(--accent-hover); }

/* ----------------------------------------------------------
   9. SweetAlert2 overrides
   ---------------------------------------------------------- */
.swal2-popup {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}
.swal2-title,
.swal2-html-container { color: var(--text-primary) !important; }
.swal2-input,
.swal2-textarea {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
}
.swal2-input:focus,
.swal2-textarea:focus { border-color: var(--accent) !important; }
.swal2-styled.swal2-confirm {
    background: var(--accent) !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
}
.swal2-styled.swal2-deny,
.swal2-styled.swal2-cancel {
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
}
.swal2-validation-message {
    background: var(--bg-surface) !important;
    color: var(--amber) !important;
}

/* ----------------------------------------------------------
   10. Responsive
   ---------------------------------------------------------- */
@media (max-width: 960px) {
    .yst-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yst-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yst-contact-card { grid-template-columns: 1fr; gap: 1.5rem; }
    .yst-footer-inner { grid-template-columns: 1fr; text-align: center; gap: 1rem; }
    .yst-footer-brand { justify-content: center; }
    .yst-footer-meta { text-align: center; }
}

@media (max-width: 768px) {
    .hs-topnav-links { display: none; }
    .hs-hamburger { display: flex; }
    .yst-section { padding: 3.5rem 0; }
    .yst-grid-2,
    .yst-grid-3,
    .yst-stats,
    .yst-contact-grid { grid-template-columns: 1fr; }
    .hs-hero-ctas { flex-direction: column; align-items: stretch; }
    .hs-hero-ctas .hs-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .yst-reveal { opacity: 1; transform: none; }
}