/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg:        #ffffff;
    --bg-alt:    #f8f9fb;
    --surface:   #f1f3f7;
    --card:      #ffffff;
    --border:    #e5e7eb;
    --text:      #111827;
    --text-dim:  #6b7280;
    --blue:      #2E7DFF;
    --green:     #1DB954;
    --orange:    #FF8C00;
    --purple:    #5B5BD6;
    --navy:      #0f172a;
    --radius:    12px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Blazor plumbing ── */
#blazor-error-ui {
    background: #fef3c7;
    border-top: 1px solid #f59e0b;
    bottom: 0; display: none; left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed; width: 100%; z-index: 1000;
    color: #92400e; font-size: 0.85rem;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #fef3c7; border: 1px solid #f59e0b; border-radius: 8px; padding: 1rem; margin: 1rem; color: #92400e; }
.loading-progress { position: absolute; display: block; width: 8rem; height: 8rem; inset: 20vh 0 auto 0; margin: 0 auto; }
.loading-progress circle { fill: none; stroke: #e5e7eb; stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--blue); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; transition: stroke-dasharray 0.05s ease-in-out; }
.loading-progress-text { position: absolute; text-align: center; font-weight: 600; inset: calc(20vh + 3.25rem) 0 auto 0; color: var(--text-dim); }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* ── Layout ── */
.fx-container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.fx-section { padding: 6rem 0; }
.fx-section-alt { background: var(--bg-alt); }
.fx-section-header { text-align: center; margin-bottom: 3.5rem; }
.fx-section-header h2 { margin: 0.5rem 0 1rem; }
.fx-section-header p { color: var(--text-dim); max-width: 520px; margin: 0 auto; }

/* ── Typography ── */
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.2; }
h1:focus { outline: none; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }

.fx-eyebrow {
    display: inline-block;
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--blue); margin-bottom: 0.6rem;
}

.fx-gradient-text {
    background: linear-gradient(135deg, #0f172a 0%, #2E7DFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ── */
.fx-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.4rem; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    text-decoration: none; white-space: nowrap;
}
.fx-btn-primary { background: var(--navy); color: #fff; border: 1px solid transparent; }
.fx-btn-primary:hover { background: #1e293b; text-decoration: none; color: #fff; }
.fx-btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.fx-btn-ghost:hover { color: var(--text); border-color: #9ca3af; background: var(--bg-alt); text-decoration: none; }
.fx-btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }

/* ── Hero ── */
.fx-hero {
    position: relative;
    padding: 5.5rem 0 5rem;
    overflow: hidden;
}

.fx-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% -5%, rgba(46,125,255,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 30% 25% at 85% 55%, rgba(91,91,214,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.fx-hero-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.fx-hero-content { min-width: 0; }

.fx-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 99px;
    font-size: 0.78rem; font-weight: 600;
    color: var(--blue); margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
}

.fx-hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem;
    color: var(--navy);
}

.fx-hero-sub {
    font-size: 1.05rem; color: var(--text-dim);
    max-width: 520px; margin-bottom: 2rem; line-height: 1.7;
}

.fx-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.fx-protocol-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.fx-protocol-pills span {
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.06em; color: var(--text-dim);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; padding: 0.18rem 0.5rem;
}

/* ── Hero Mockup ── */
.fx-hero-mockup { position: relative; min-width: 0; }
.fx-hero-screenshot {
    width: 100%; height: auto; display: block;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.fx-mockup-window {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.72rem;
}

.fx-mockup-titlebar {
    background: #f3f4f6; padding: 0.55rem 0.9rem;
    display: flex; align-items: center; gap: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
}
.fx-mockup-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.fx-mockup-title { margin-left: 0.6rem; color: #9ca3af; font-size: 0.7rem; }

.fx-mockup-nav {
    background: #f9fafb; padding: 0.45rem 0.9rem;
    display: flex; gap: 1.25rem; border-bottom: 1px solid #e5e7eb;
}
.fx-mnav-item { font-size: 0.7rem; font-weight: 700; opacity: 0.35; letter-spacing: 0.02em; }
.fx-mnav-item.active { opacity: 1; }

.fx-mockup-toolbar {
    padding: 0.5rem 0.9rem; display: flex; gap: 0.5rem; align-items: center;
    background: #fff; border-bottom: 1px solid #f3f4f6;
}
.fx-mock-input {
    flex: 1; background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 5px; padding: 0.3rem 0.6rem;
    color: #2E7DFF; font-family: 'Consolas', monospace; font-size: 0.65rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-mock-select {
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 5px;
    padding: 0.3rem 0.6rem; color: #6b7280; font-size: 0.65rem; white-space: nowrap;
}
.fx-mock-btn {
    background: #1DB954; color: #fff; border-radius: 5px;
    padding: 0.3rem 0.75rem; font-weight: 700; font-size: 0.65rem; white-space: nowrap;
}

.fx-mockup-table { padding: 0 0.9rem 0.5rem; background: #fff; }
.fx-mock-thead {
    display: grid; grid-template-columns: 36px 80px 1fr 52px 1fr;
    gap: 0.5rem; padding: 0.4rem 0.5rem;
    color: #9ca3af; font-weight: 700; font-size: 0.62rem;
    letter-spacing: 0.04em; text-transform: uppercase;
    border-bottom: 1px solid #f3f4f6;
}
.fx-mock-row {
    display: grid; grid-template-columns: 36px 80px 1fr 52px 1fr;
    gap: 0.5rem; padding: 0.35rem 0.5rem;
    border-radius: 4px; align-items: center; border-left: 2px solid transparent;
}
.fx-mock-row:hover { background: #f9fafb; }
.fx-mock-row.warn { border-left-color: #FF8C00; background: #fff8f0; }
.fx-mock-row.fail { border-left-color: #ef4444; background: #fff5f5; }
.fx-mock-status { font-weight: 700; font-size: 0.75rem; }
.fx-mock-status.ok   { color: #1DB954; }
.fx-mock-status.warn { color: #FF8C00; }
.fx-mock-status.fail { color: #ef4444; }
.fx-mock-row > span { color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-mock-mono { font-family: 'Consolas', monospace; color: #6b7280 !important; font-size: 0.65rem !important; }
.fx-mock-row.ok > span:not(.fx-mock-status):not(.fx-mock-mono)   { color: #374151; }
.fx-mock-row.warn > span:not(.fx-mock-status):not(.fx-mock-mono) { color: #92400e; }
.fx-mock-row.fail > span:not(.fx-mock-status):not(.fx-mock-mono) { color: #991b1b; }

.fx-mockup-statusbar {
    padding: 0.4rem 1rem; background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex; justify-content: space-between; align-items: center;
    color: #9ca3af; font-size: 0.62rem;
}
.fx-mock-ai-badge { color: var(--purple); font-weight: 600; }

/* ── About ── */
.fx-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.fx-about-text h2 { margin: 0.5rem 0 1rem; }
.fx-about-text p { color: var(--text-dim); margin-bottom: 1rem; line-height: 1.75; }
.fx-about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.fx-stat {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.fx-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.4rem; }
.fx-stat-label { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }

/* ── Features ── */
.fx-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.fx-feature-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.fx-feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent, var(--blue)); opacity: 0; transition: opacity 0.2s;
}
.fx-feature-card:hover { border-color: #d1d5db; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.fx-feature-card:hover::before { opacity: 1; }
.fx-feature-icon { width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; color: var(--accent, var(--blue)); }
.fx-feature-icon svg { width: 100%; height: 100%; }
.fx-feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--navy); }
.fx-feature-card p { font-size: 0.875rem; color: var(--text-dim); line-height: 1.65; margin: 0; }

/* ── Screenshots ── */
.fx-screenshots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.fx-screenshot-slot {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.fx-screenshot-slot:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.fx-screenshot-slot img {
    width: 100%; height: auto; display: block;
    aspect-ratio: 16/10; object-fit: cover; object-position: top;
}
.fx-screenshot-label {
    display: block; padding: 0.6rem 1rem;
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-dim); background: var(--bg-alt);
    border-top: 1px solid var(--border);
    text-align: center; letter-spacing: 0.01em;
}

/* ── Contact ── */
.fx-section-contact { background: var(--bg-alt); }
.fx-contact-box {
    max-width: 560px; margin: 0 auto;
    text-align: center;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 20px; padding: 3.5rem 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.fx-contact-box h2 { margin: 0.5rem 0 1rem; }
.fx-contact-box > p { color: var(--text-dim); margin: 0 auto 2rem; line-height: 1.7; }
.fx-contact-meta { font-size: 0.78rem; color: #9ca3af; margin: 1.25rem 0 0; }

/* ── Footer ── */
.fx-footer { border-top: 1px solid var(--border); padding: 2rem 0; background: #fff; }
.fx-footer-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.fx-footer-logo { height: 24px; width: auto; display: block; opacity: 0.7; }
.fx-footer-links { display: flex; gap: 1.5rem; }
.fx-footer-links a { font-size: 0.85rem; color: var(--text-dim); }
.fx-footer-links a:hover { color: var(--text); }
.fx-footer-copy { margin-left: auto; font-size: 0.8rem; color: #9ca3af; }

/* ── Responsive ── */
@media (max-width: 1000px) {
    .fx-hero-layout { grid-template-columns: 1fr; }
    .fx-hero-mockup { display: none; }
}

@media (max-width: 900px) {
    .fx-features-grid { grid-template-columns: repeat(2, 1fr); }
    .fx-about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
    .fx-section { padding: 4rem 0; }
    .fx-hero { padding: 5rem 0 4rem; }
    .fx-features-grid { grid-template-columns: 1fr; }
    .fx-screenshots-grid { grid-template-columns: 1fr; }
    .fx-about-stats { grid-template-columns: 1fr 1fr; }
    .fx-contact-box { padding: 2.5rem 1.5rem; }
    .fx-footer-copy { margin-left: 0; }
}
