/* ============================================
   MintyMetrics Landing Page
   Dark mode · System fonts · No dependencies
   ============================================ */

/* --- Custom Properties --- */
:root {
    --bg:           #0B0F14;
    --surface:      #131920;
    --surface-alt:  #1A2230;
    --border:       #1E2A3A;
    --text:         #E8ECF1;
    --text-sec:     #8A95A5;
    --text-muted:   #556070;
    --mint:         #3EB489;
    --mint-hover:   #5AC49D;
    --mint-press:   #329673;
    --mint-glow:    rgba(62, 180, 137, 0.1);
    --red:          #F06565;
    --yellow:       #F0B865;
    --blue:         #65A0F0;
    --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --mono:         "SF Mono", "Cascadia Code", "Fira Code", Consolas,
                    "Liberation Mono", Menlo, monospace;
    --container:    1120px;
    --radius:       10px;
    --radius-lg:    14px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-hover); }
img { max-width: 100%; display: block; }
fieldset { border: none; }

/* --- Utility --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mint { color: var(--mint); }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* --- Focus visible --- */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.35);
    border-radius: var(--radius);
}

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font);
    font-size: 15px; font-weight: 600;
    border: none; border-radius: var(--radius);
    padding: 12px 24px; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease,
                box-shadow 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}
.btn .icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--mint); color: var(--bg);
}
.btn-primary:hover {
    background: var(--mint-hover); color: var(--bg);
    box-shadow: 0 4px 16px rgba(62, 180, 137, 0.25);
}
.btn-primary:active { background: var(--mint-press); transform: scale(0.98); }

.btn-secondary {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--surface-alt); border-color: rgba(62,180,137,0.3);
    color: var(--text);
}

.btn-lg { font-size: 16px; padding: 14px 32px; }

.btn-github {
    background: var(--surface-alt); color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px; font-size: 14px; font-weight: 500;
    border-radius: 8px;
}
.btn-github:hover {
    border-color: rgba(62,180,137,0.4); color: var(--text);
    background: var(--border);
}
.btn-github .icon { width: 16px; height: 16px; }

/* --- Navigation --- */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    height: 64px;
}
.nav-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-logo {
    font-size: 20px; font-weight: 700;
    text-decoration: none; letter-spacing: -0.01em;
}
.nav-logo-img { height: 28px; width: auto; max-height: 28px; }
.logo-mint { color: var(--mint); }
.logo-white { color: var(--text); font-weight: 400; }

/* --- Hero --- */
.hero {
    padding: 120px 0 80px;
    text-align: center;
}
.hero-inner { max-width: 860px; margin: 0 auto; }

.hero-badges {
    display: flex; gap: 8px; justify-content: center;
    margin-bottom: 24px;
}
.badge {
    display: inline-block;
    padding: 4px 12px; border-radius: 9999px;
    font-size: 12px; font-weight: 500;
    background: var(--surface-alt); color: var(--text-sec);
    border: 1px solid var(--border);
}
.badge-license { color: var(--mint); }
.badge-compliance { color: var(--blue); }

.hero-title {
    font-size: 52px; font-weight: 700;
    line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero-title .mint {
    text-shadow: 0 0 40px rgba(62, 180, 137, 0.15);
}
.hero-sub {
    font-size: 18px; color: var(--text-sec);
    max-width: 560px; margin: 0 auto 32px;
    line-height: 1.6;
}
.hero-ctas {
    display: flex; gap: 12px;
    justify-content: center; flex-wrap: wrap;
    margin-bottom: 48px;
}

/* --- Dashboard Preview --- */
.dash-preview {
    background: #F4F7F6;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: left;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.04);
    max-width: 860px;
    margin: 0 auto;
}
.dash-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
}
.dash-chrome-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.dash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.dash-chrome-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border-radius: 6px;
    padding: 5px 12px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    min-width: 0;
}
.dash-chrome-lock {
    width: 10px;
    height: 10px;
    color: var(--mint);
    flex-shrink: 0;
    opacity: 0.7;
}
.dash-chrome-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-chrome-domain {
    color: var(--text-sec);
}
.dash-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}
.dash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dash-date-pills {
    display: flex;
    gap: 2px;
}
.dash-pill {
    font-size: 10px;
    font-weight: 500;
    color: #8FA39A;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
}
.dash-pill--active {
    background: #2AB090;
    color: #FFFFFF;
}
.dash-sample-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8FA39A;
    opacity: 0.7;
}
.dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.dash-stat {
    background: #FFFFFF;
    border: 1px solid #D8E2DE;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dash-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8FA39A;
    font-weight: 500;
    line-height: 1.2;
}
.dash-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1A2B25;
    font-family: var(--mono);
    line-height: 1;
}
.dash-stat--live {
    border-color: rgba(42, 176, 144, 0.3);
}
.dash-stat--live .dash-stat-value {
    color: #2AB090;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dash-live-dot {
    width: 6px;
    height: 6px;
    background: #2AB090;
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(42, 176, 144, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(42, 176, 144, 0); }
}
.dash-chart {
    background: #FFFFFF;
    border: 1px solid #D8E2DE;
    border-radius: 8px;
    padding: 12px 12px 0;
    overflow: hidden;
}
.dash-chart-svg {
    width: 100%;
    height: 72px;
    display: block;
}
.dash-screenshot { width: 100%; height: auto; display: block; }

/* --- Screenshots Section --- */
.screenshots {
    padding-top: 0;
}
.screenshots-sub {
    text-align: center;
    font-size: 17px;
    color: var(--text-sec);
    margin-top: -32px;
    margin-bottom: 36px;
}
.screenshot-tabs {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.screenshot-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sec);
    transition: background 0.15s ease, color 0.15s ease;
}
.screenshot-tab:hover {
    color: var(--text);
    background: var(--surface-alt);
}
.screenshot-tab.active {
    background: var(--mint);
    color: var(--bg);
}
.screenshot-tab.active .screenshot-tab-icon {
    color: var(--bg);
}
.screenshot-tab-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.screenshot-panel {
    display: none;
    animation: tabFadeIn 0.3s ease;
}
.screenshot-panel.active {
    display: block;
}
.screenshot-frame {
    background: #F4F7F6;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.04);
    max-width: 960px;
    margin: 0 auto;
}
.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Demo Video Section --- */
.demo-section {
    padding-top: 0;
}
.demo-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.demo-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.demo-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.demo-desc {
    font-size: 16px;
    color: var(--text-sec);
    line-height: 1.6;
}
.demo-text .btn {
    align-self: flex-start;
}
.demo-video-wrap {
    width: 100%;
}
.demo-video-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.04);
}
.demo-video-container {
    position: relative;
    background: var(--bg);
    aspect-ratio: 16 / 9;
    cursor: pointer;
}
.demo-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.demo-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--mint);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease,
                box-shadow 0.2s ease, opacity 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4),
                0 0 0 0 rgba(62, 180, 137, 0.3);
    z-index: 2;
}
.demo-play-btn:hover {
    background: var(--mint-hover);
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 0 8px rgba(62, 180, 137, 0.15);
}
.demo-play-btn:active {
    transform: translate(-50%, -50%) scale(0.96);
}
.demo-play-icon {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}
.demo-video-container.playing .demo-play-btn {
    opacity: 0;
    pointer-events: none;
}

/* --- Sections --- */
section { padding: 100px 0; }
.section-title {
    font-size: 32px; font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(62, 180, 137, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.feature-card:hover .feature-icon { color: var(--mint-hover); }
.feature-icon {
    width: 40px; height: 40px;
    color: var(--mint);
    margin-bottom: 16px;
    transition: color 0.2s ease;
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 {
    font-size: 18px; font-weight: 600;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 15px; color: var(--text-sec);
    line-height: 1.6;
}

/* --- Comparison --- */
.comparison { padding-top: 0; }
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.comparison-table {
    width: 100%; min-width: 600px;
    border-collapse: collapse;
    font-size: 14px;
}
.comparison-table th,
.comparison-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.comparison-table thead th {
    background: var(--surface);
    font-weight: 600; font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-sec);
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table .row-label {
    font-weight: 500; color: var(--text-sec);
    white-space: nowrap;
}
.comparison-table .col-highlight {
    color: var(--mint);
    background: rgba(62, 180, 137, 0.04);
}
.comparison-table thead .col-highlight {
    color: var(--mint); font-weight: 700;
}
.comparison-table td { color: var(--text-sec); }
.comparison-table .col-highlight strong { color: var(--mint); font-weight: 600; }

/* --- How it works --- */

/* Mode tabs */
.mode-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}
.mode-tab {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    padding: 16px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: var(--font);
    color: var(--text-sec);
    transition: border-color 0.2s ease, background 0.2s ease,
                box-shadow 0.2s ease, transform 0.1s ease;
    position: relative;
    min-width: 180px;
}
.mode-tab:hover {
    border-color: rgba(62, 180, 137, 0.3);
    background: var(--surface-alt);
}
.mode-tab:active { transform: scale(0.98); }
.mode-tab.active {
    border-color: var(--mint);
    background: rgba(62, 180, 137, 0.06);
    box-shadow: 0 0 0 1px var(--mint), 0 4px 24px rgba(62, 180, 137, 0.08);
}
.mode-tab.active .mode-tab-label { color: var(--mint); }
.mode-tab.active .mode-tab-icon { color: var(--mint); }

.mode-tab-icon {
    width: 22px; height: 22px;
    color: var(--text-muted);
    transition: color 0.2s ease;
    flex-shrink: 0;
}
.mode-tab-label {
    font-size: 15px; font-weight: 600;
    color: var(--text);
    transition: color 0.2s ease;
    line-height: 1.3;
}
.mode-tab-desc {
    font-size: 13px; font-weight: 400;
    color: var(--text-sec);
    line-height: 1.3;
}

/* Tab panels */
.tab-panel {
    display: none;
    animation: tabFadeIn 0.3s ease;
}
.tab-panel.active {
    display: block;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Steps grid */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}
.steps-4col {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.steps-4col .step {
    text-align: left;
}
.steps-4col .step-number {
    margin-bottom: 0;
    margin-right: 12px;
}
.steps-4col .step h3 {
    display: inline;
}
.steps-4col .step-desc {
    margin-top: 8px;
}
.step { text-align: center; min-width: 0; }
.step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--mint);
    font-family: var(--mono);
    font-size: 14px; font-weight: 600;
    margin-bottom: 16px;
}
.step h3 {
    font-size: 18px; font-weight: 600;
    margin-bottom: 12px;
}
.step-desc {
    font-size: 15px; color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 12px;
}

.code-block {
    position: relative;
    background: var(--surface-alt);
    border-radius: 8px; padding: 14px 44px 14px 16px;
    text-align: left;
    overflow-x: auto;
    max-width: 100%;
}
.code-block code {
    font-family: var(--mono);
    font-size: 13px; color: var(--mint);
    white-space: nowrap;
}
.copy-btn {
    position: absolute; top: 8px; right: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 6px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.copy-btn:hover { color: var(--text); background: var(--surface); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn .icon-check { display: none; color: var(--mint); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }

.inline-code {
    font-family: var(--mono);
    font-size: 13px; color: var(--mint);
    background: var(--surface-alt);
    padding: 2px 6px; border-radius: 4px;
}

.who-for {
    text-align: center;
    font-size: 15px; color: var(--text-muted);
    font-style: italic;
}
.events-callout {
    margin-top: 56px;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.events-callout-title {
    margin: 0 0 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.events-callout-desc {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 14px;
}
.events-callout-step {
    margin: 16px 0 8px;
    color: var(--text-muted);
    font-size: 14px;
}
.events-callout .code-block code { font-size: 13px; }
.prereq-note {
    text-align: center;
    font-size: 14px; color: var(--text-muted);
    margin-bottom: 32px;
}
.step-alt-link {
    font-size: 13px; color: var(--text-muted);
    margin-top: 8px;
}
.step-alt-link a { color: var(--mint); }
.step-alt-link a:hover { color: var(--mint-hover); }
.code-placeholder {
    color: var(--text-sec);
    font-style: italic;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bg);
    background: var(--mint);
    border-radius: var(--radius);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}
.btn-download:hover {
    background: var(--mint-hover);
    color: var(--bg);
    box-shadow: 0 4px 16px rgba(62, 180, 137, 0.25);
}
.btn-download:active { transform: scale(0.98); }
.btn-download .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* --- CTA --- */
.cta-section {
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(62,180,137,0.04) 0%, transparent 70%);
}
.cta-title {
    font-size: 36px; font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.cta-sub {
    font-size: 18px; color: var(--text-sec);
    margin-bottom: 28px;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}
.footer-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.footer-left {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
}
.footer-logo { font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; }
.footer-logo-img { height: 24px; width: auto; max-height: 24px; }
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-right {
    display: flex; align-items: center; gap: 20px;
}
.footer-link {
    font-size: 14px; font-weight: 500;
    color: var(--text-muted); background: none;
    border: none; cursor: pointer; font-family: var(--font);
    transition: color 0.15s ease;
    text-decoration: none;
}
.footer-link:hover { color: var(--text); }
.footer-feedback-btn { color: var(--mint); }
.footer-feedback-btn:hover { color: var(--mint-hover); }

/* --- Feedback FAB --- */
.feedback-fab {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 200;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 18px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease, background 0.2s ease;
}
.feedback-fab .icon {
    width: 16px; height: 16px; color: var(--mint);
    flex-shrink: 0;
}
.feedback-fab:hover {
    transform: translateY(-2px);
    border-color: rgba(62, 180, 137, 0.3);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.5);
    background: var(--surface-alt);
}

/* --- Feedback Modal --- */
.modal-overlay {
    position: fixed; inset: 0;
    z-index: 300;
    background: rgba(11, 15, 20, 0.7);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.modal-overlay.active {
    opacity: 1; pointer-events: auto;
}
.modal-overlay[hidden] { display: none; }

.modal {
    width: 100%; max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(24px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h2 {
    font-size: 20px; font-weight: 600;
}
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}
.modal-close:hover { color: var(--text); background: var(--surface-alt); }
.modal-close svg { width: 20px; height: 20px; }

/* Radio group */
.radio-group legend {
    font-size: 14px; font-weight: 500;
    color: var(--text-sec);
    margin-bottom: 10px;
}
.radio-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.radio-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease,
                box-shadow 0.15s ease, transform 0.1s ease;
}
.radio-card:hover {
    border-color: rgba(62, 180, 137, 0.3);
    background: var(--border);
}
.radio-card:active { transform: scale(0.97); }
.radio-card.selected {
    border-color: var(--mint);
    background: rgba(62, 180, 137, 0.06);
    box-shadow: 0 0 0 1px var(--mint);
}
.radio-card.selected .radio-icon { color: var(--mint) !important; }

.radio-icon { width: 28px; height: 28px; }
.icon-bug { color: var(--red); }
.icon-feature { color: var(--yellow); }
.icon-other { color: var(--blue); }

.radio-card span {
    font-size: 13px; font-weight: 600;
    color: var(--text);
}

/* Form field */
.form-field {
    margin-top: 16px;
}
.form-field label {
    display: block;
    font-size: 14px; font-weight: 500;
    color: var(--text-sec);
    margin-bottom: 8px;
}
.form-field textarea {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-family: var(--font);
    font-size: 15px; color: var(--text);
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea::placeholder { color: var(--text-muted); }
.form-field textarea:focus {
    outline: none;
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.12);
}

/* Submit */
.btn-submit {
    width: 100%; margin-top: 16px;
    justify-content: center;
}
.btn-submit:disabled {
    opacity: 0.4; cursor: not-allowed;
    pointer-events: none;
}
.btn-submit.loading {
    pointer-events: none;
}

.modal-alt {
    text-align: center;
    font-size: 13px; color: var(--text-muted);
    margin-top: 12px;
}
.modal-alt a { color: var(--mint); }
.modal-alt a:hover { color: var(--mint-hover); }

/* Success state */
.modal-success {
    text-align: center;
    padding: 24px 0;
}
.success-icon {
    width: 48px; height: 48px;
    color: var(--mint);
    margin: 0 auto 16px;
}
.modal-success h3 {
    font-size: 20px; font-weight: 600;
    margin-bottom: 4px;
}
.modal-success p {
    font-size: 15px; color: var(--text-sec);
}

/* Error state */
.modal-error {
    text-align: center; padding: 24px 0;
}
.error-msg {
    font-size: 16px; font-weight: 600;
    color: var(--red);
    margin-bottom: 8px;
}
.modal-error p {
    font-size: 14px; color: var(--text-sec);
}
.modal-error a { color: var(--mint); }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; gap: 40px; }
    .steps-4col { grid-template-columns: 1fr; }
    .hero-title { font-size: 42px; }
    section { padding: 80px 0; }

    .demo-split { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .demo-text { align-items: center; }
    .demo-title { font-size: 28px; }
    .demo-text .btn { align-self: center; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 600px) {
    section { padding: 60px 0; }

    .hero { padding: 60px 0 48px; }
    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 16px; }
    .hero-ctas { flex-direction: column; align-items: stretch; margin-bottom: 32px; }
    .hero-ctas .btn { justify-content: center; }

    .dash-preview { max-width: 100%; }
    .dash-body { padding: 10px; gap: 8px; }
    .dash-stats { grid-template-columns: repeat(3, 1fr); }
    .dash-stat:nth-child(n+4) { display: none; }
    .dash-stat-value { font-size: 14px; }
    .dash-chart-svg { height: 48px; }

    .section-title { font-size: 26px; margin-bottom: 32px; }

    .table-wrap {
        position: relative;
        max-width: 100%;
    }
    .table-wrap::after {
        content: '';
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 32px;
        background: linear-gradient(to right, transparent, var(--bg));
        pointer-events: none;
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    }
    .comparison-table { font-size: 13px; }
    .comparison-table th,
    .comparison-table td { padding: 12px 14px; }

    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 24px; }
    .feature-card:hover { transform: none; }

    .steps { gap: 32px; }
    .code-block code { font-size: 12px; word-break: break-all; white-space: pre-wrap; }
    .copy-btn { padding: 12px; }

    .cta-title { font-size: 28px; }
    .cta-sub { font-size: 16px; }
    .cta-section .btn-lg { width: 100%; justify-content: center; }

    .footer-inner { flex-direction: column; text-align: center; }
    .footer-left { justify-content: center; }
    .footer-right { justify-content: center; flex-wrap: wrap; }

    .screenshots-sub { font-size: 15px; margin-top: -24px; }
    .screenshot-tab { font-size: 13px; padding: 8px 14px; }
    .screenshot-tab-icon { width: 14px; height: 14px; }

    .demo-play-btn { width: 48px; height: 48px; }
    .demo-play-icon { width: 18px; height: 18px; margin-left: 2px; }
    .demo-title { font-size: 26px; }

    .btn-github-text { display: none; }
    .btn-github { padding: 10px; min-width: 44px; min-height: 44px; justify-content: center; }

    .mode-tab { min-width: 0; }

    .feedback-fab {
        bottom: 16px; right: 16px;
        padding: 12px; border-radius: 50%;
    }
    .fab-text { display: none; }

    .radio-options { grid-template-columns: 1fr; }

    .modal {
        border-radius: 16px 16px 0 0;
        max-height: 90vh; overflow-y: auto;
        padding: 24px 20px;
    }
    .modal-overlay {
        align-items: flex-end;
    }
}

/* --- Responsive: Small phones --- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .hero { padding: 48px 0 40px; }
    .hero-title { font-size: 30px; }

    section { padding: 48px 0; }
    .section-title { font-size: 24px; margin-bottom: 24px; }

    .feature-card { padding: 20px; }

    .dash-chrome-bar { font-size: 10px; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-stat:nth-child(n+3) { display: none; }

    .code-block { padding: 12px 40px 12px 12px; }
    .code-block code { font-size: 11px; word-break: break-all; white-space: pre-wrap; }

    .cta-title { font-size: 24px; }

    .demo-play-btn { width: 44px; height: 44px; }
    .demo-play-icon { width: 16px; height: 16px; }

    .modal { padding: 20px 16px; }
}
