@import url("../fonts/fonts.css");
@import url("tokens.css");
@import url("foundation.css");

:root {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #463edc 0%, #42228b 100%);
    --navbar-bg: rgba(15, 23, 42, 0.8);
    --border-color: #334155;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    line-height: 1.7;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--text-main) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    margin: 0 0.5rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1), 0 2px 4px -1px rgba(99, 102, 241, 0.06);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline-light:hover {
    background-color: var(--bg-card);
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}

/* Background elements for hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(to right, #fff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Cards (Categories & Products) */
.section-title {
    text-align: center;
    position: relative;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.custom-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.custom-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background-color: var(--bg-card-hover);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1.5rem 0;
}

.product-price small {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0;
    /* margin-top: auto; removed to fix gap */
    border-bottom: 1px solid var(--border-color);
}

/* Footer */
footer {
    background-color: #020617;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 0 !important;
}

footer p {
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
}

/* Background image support for cards */
.custom-card-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    overflow: hidden;
    /* Ensure border remains visible */
    border: 1px solid var(--border-color);
}

/* Gradient overlay for text readability */
.custom-card-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.75));
    z-index: -1;
    transition: opacity 0.3s ease;
}

.custom-card-bg:hover::before {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.5));
}

/* Make sure text shines through */
.custom-card-bg * {
    z-index: 2;
    position: relative;
}

/* BotHoster landing */
body.bh-landing { background: var(--bh-canvas) !important; color: var(--bh-text); }
.bh-landing-nav {
    position: fixed;
    z-index: 1030;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(9,9,9,.9);
}
.bh-landing-nav__inner { display: flex; min-height: 72px; align-items: center; gap: 24px; }
.bh-landing-nav__brand { display: inline-flex; width: 178px; flex: 0 0 auto; align-items: center; }
.bh-landing-nav__links { display: flex; margin-left: auto; align-items: center; gap: 8px; }
.bh-landing-nav__link { display: inline-flex; min-height: 44px; align-items: center; border-radius: 999px; padding: 9px 13px; color: var(--bh-text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.bh-landing-nav__link:hover { background: var(--bh-surface-1); color: #fff; }

.bh-button {
    display: inline-flex !important;
    width: auto;
    min-height: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    padding: 0 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -.01em;
    text-decoration: none !important;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 200ms cubic-bezier(.2,.8,.2,1), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.bh-button:hover { transform: translateY(-1px); }
.bh-button:active { transform: translateY(0); }
.bh-button:focus-visible { outline: 2px solid var(--bh-focus); outline-offset: 3px; }
.bh-button > span:not(.bh-button__icon) { display: inline-flex; align-items: center; line-height: 1; }
.bh-button__icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    color: currentColor;
    line-height: 1;
    text-align: center;
}
.bh-button__icon > i {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 18px;
}
.bh-button__icon > svg { display: block; width: 16px; height: 16px; }
.bh-button--nav { min-height: 44px; height: 44px; padding: 0 17px !important; }
.bh-button--dashboard { padding: 0 17px !important; gap: 9px !important; }
.bh-button--dashboard .bh-button__icon--dashboard {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    box-shadow: none;
}
.bh-button--dashboard .bh-button__icon--dashboard > svg { width: 18px; height: 18px; }
.bh-nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; align-items: center; justify-content: center; border: 1px solid var(--bh-hairline); border-radius: 12px; background: var(--bh-surface-1); color: #fff; }

.bh-landing-main { padding-top: 72px; }
.bh-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(88px, 12vw, 168px) 0 80px; text-align: center; }
.bh-hero::before { position: absolute; z-index: -2; top: -330px; left: 50%; width: min(1100px, 120vw); height: 780px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 48%, rgba(237,76,155,.34), transparent 38%), radial-gradient(circle at 64% 42%, rgba(155,92,255,.35), transparent 38%), radial-gradient(circle at 56% 68%, rgba(255,119,89,.26), transparent 34%); filter: saturate(1.1); content: ""; }
.bh-hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--bh-canvas) 86%); content: ""; }
.bh-hero__title { max-width: 980px; margin: 0 auto 22px; font-size: clamp(50px, 8vw, 104px); font-weight: 750; line-height: .96; letter-spacing: -.065em; }
.bh-hero__title span { color: #b9b9b9; }
.bh-hero__copy { max-width: 680px; margin: 0 auto 32px; color: #b3b3b3; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; }
.bh-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bh-hero__actions .bh-button { flex: 0 1 214px; min-width: 214px; }
.bh-trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 30px; color: #8e8e8e; font-size: 13px; }
.bh-trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.bh-trust-row i { color: var(--bh-success); }

.bh-section { padding: clamp(72px, 9vw, 120px) 0; }
.bh-section--bordered { border-top: 1px solid var(--bh-hairline); }
.bh-section-heading { display: grid; grid-template-columns: minmax(0, .8fr) minmax(280px, .6fr); gap: 40px; align-items: end; margin-bottom: 38px; }
.bh-section-heading h2 { margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.02; letter-spacing: -.05em; }
.bh-section-heading p { margin: 0; font-size: 17px; }
.bh-bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bh-bento > * { grid-column: span 4; }
.bh-bento .bh-bento--wide { grid-column: span 8; }
.bh-bento .bh-bento--half { grid-column: span 6; }
.bh-feature-icon { display: inline-flex; width: 46px; height: 46px; margin-bottom: 44px; align-items: center; justify-content: center; border: 1px solid var(--bh-hairline-strong); border-radius: 13px; background: var(--bh-surface-2); color: #fff; font-size: 18px; }
.bh-card h3 { margin-bottom: 9px; font-size: 22px; }
.bh-card p:last-child { margin-bottom: 0; }

.bh-runtime-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.bh-runtime { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; border: 1px solid var(--bh-hairline); border-radius: 999px; background: var(--bh-surface-1); padding: 8px 13px; color: #ccc; font-size: 13px; font-weight: 620; }
.bh-runtime i { color: var(--bh-focus); }
.bh-flow { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bh-flow__step { min-height: 260px; }
.bh-flow__step::before { counter-increment: step; display: inline-flex; width: 34px; height: 34px; margin-bottom: 48px; align-items: center; justify-content: center; border: 1px solid var(--bh-hairline-strong); border-radius: 50%; color: #fff; content: counter(step, decimal-leading-zero); font-family: var(--bh-font-display); font-size: 12px; font-weight: 700; }

.bh-product-grid, .bh-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bh-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bh-product-card, .bh-category-card { height: 100%; text-align: left; }
.bh-product-card__top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.bh-product-card__category { color: var(--bh-text-muted); font-size: 12px; }
.bh-product-card__price { margin: 26px 0 14px; color: #fff; font-family: var(--bh-font-display); font-size: 34px; font-weight: 720; letter-spacing: -.04em; }
.bh-product-card__price small { color: var(--bh-text-muted); font-family: var(--bh-font-body); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.bh-product-card__copy { min-height: 70px; }
.bh-product-card__action { display: flex; width: 100%; margin-top: 24px; justify-content: center; text-decoration: none; }
.bh-category-card { display: block; color: inherit; text-decoration: none; }
.bh-category-card:hover { color: inherit; }

.bh-cta { position: relative; isolation: isolate; padding: clamp(40px, 7vw, 84px); overflow: hidden; border: 1px solid var(--bh-hairline); border-radius: var(--bh-radius-xl); background: var(--bh-surface-1); text-align: center; }
.bh-cta::before { position: absolute; z-index: -1; inset: auto 8% -75% 8%; height: 150%; border-radius: 50%; background: var(--bh-gradient-spotlight); opacity: .34; filter: blur(70px); content: ""; }
.bh-cta h2 { max-width: 800px; margin: 0 auto 16px; font-size: clamp(40px, 6vw, 72px); line-height: 1; }
.bh-cta p { max-width: 620px; margin: 0 auto 28px; font-size: 17px; }

.bh-faq { display: grid; grid-template-columns: .7fr 1fr; gap: 48px; }
.bh-faq details { border-top: 1px solid var(--bh-hairline); padding: 20px 0; }
.bh-faq details:last-child { border-bottom: 1px solid var(--bh-hairline); }
.bh-faq summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; color: #fff; cursor: pointer; font-weight: 650; list-style: none; }
.bh-faq summary::after { color: var(--bh-text-muted); content: "+"; font-size: 22px; }
.bh-faq details[open] summary::after { content: "−"; }
.bh-faq details p { padding-right: 24px; }

.bh-footer { margin-top: auto; border-top: 1px solid var(--bh-hairline); padding: 44px 0; }
.bh-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bh-footer img { width: 158px; }
.bh-footer p { margin: 0; font-size: 12px; }

@media (max-width: 991.98px) {
    .bh-nav-toggle { display: inline-flex; }
    .bh-landing-nav__links { position: fixed; top: 64px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--bh-hairline); background: var(--bh-canvas); padding: 14px 16px 20px; }
    .bh-landing-nav__links[data-open="true"] { display: flex; }
    .bh-landing-nav__link { justify-content: center; }
    .bh-landing-nav__links .bh-button { width: 100%; }
    .bh-section-heading, .bh-faq { grid-template-columns: 1fr; gap: 20px; }
    .bh-bento > *, .bh-bento .bh-bento--wide, .bh-bento .bh-bento--half { grid-column: span 6; }
    .bh-product-grid { grid-template-columns: repeat(2, 1fr); }
    .bh-category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
    .bh-landing-nav__inner { min-height: 64px; }
    .bh-landing-main { padding-top: 64px; }
    .bh-hero { padding-top: 78px; }
    .bh-hero__title { font-size: clamp(46px, 15vw, 66px); }
    .bh-bento > *, .bh-bento .bh-bento--wide, .bh-bento .bh-bento--half { grid-column: 1 / -1; }
    .bh-flow, .bh-product-grid, .bh-category-grid { grid-template-columns: 1fr; }
    .bh-footer__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 575.98px) {
    .bh-hero__actions { width: 100%; max-width: 360px; margin-right: auto; margin-left: auto; }
    .bh-hero__actions .bh-button { width: 100%; min-width: 0; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .bh-button { transition-duration: .01ms !important; }
    .bh-button:hover, .bh-button:active { transform: none !important; }
}
