/* ClearComments Design System */
:root {
    --primary: #be0003;
    --primary-hover: #c00003;
    --on-primary: #ffffff;
    
    --surface: #f8f9fa;
    --surface-bright: #f8f9fa;
    --surface-container-lowest: #ffffff;
    --surface-container: #edeeef;
    --surface-container-high: #e7e8e9;
    --surface-container-highest: #e1e3e4;
    --surface-dim: #d9dadb;
    --surface-variant: #e1e3e4;
    
    --on-surface: #191c1d;
    --on-surface-variant: #5e3f3b;
    
    --secondary: #5f5e5e;
    --tertiary: #006d20;
    --on-tertiary: #ffffff;
    --tertiary-container: #00892a;
    
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --on-error-container: #93000a;
    
    --outline: #926e69;
    --outline-variant: #e7bdb6;
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --unit: 4px;
    --container-padding: 16px;
    --section-margin: 24px;
    --element-gap: 12px;
    --stack-space: 8px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--on-surface-variant);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--stack-space);
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 2px 4px rgba(190, 0, 3, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(190, 0, 3, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background-color: transparent;
    color: var(--on-surface);
    border: 1px solid var(--surface-container-highest);
    box-shadow: none;
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(190, 0, 3, 0.05);
}

.btn-outline:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm { font-size: 1.125rem !important; }
.icon-md { font-size: 1.25rem !important; }
.icon-xs { font-size: 0.875rem !important; }

.icon-success { color: var(--tertiary); }

.text-accent { color: var(--primary); }

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(225, 227, 228, 0.5);
    height: 72px;
    display: flex;
    align-items: center;
    overflow: hidden; /* prevent button from bleeding out of navbar */
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.75rem; /* guaranteed breathing room between logo & button */
    overflow: hidden;
}

/* Logo shrinks gracefully — button always wins space */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;       /* allow flex child to shrink below content size */
    flex-shrink: 1;
    overflow: hidden;
}

/* Nav links (button side) — never shrink */
.nav-links {
    flex-shrink: 0;
}

.logo-img {
    height: 36px;
    width: 36px;
    flex-shrink: 0;     /* icon never shrinks */
    object-fit: contain;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: var(--on-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sections */
.section {
    padding: 100px 0;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px; /* Navbar height — overridden at ≤768px */
    padding-bottom: 0;
    background: radial-gradient(circle at top right, rgba(190, 0, 3, 0.03), transparent 40%),
                radial-gradient(circle at bottom left, rgba(190, 0, 3, 0.02), transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--on-surface);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 520px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.cta-subtitle {
    font-size: 0.875rem;
    color: var(--secondary);
}

/* Hero Visual / Mockup */
.hero-visual {
    position: relative;
}

.mockup-container {
    background: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--surface-container-high);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mockup-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--surface-container-high);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    position: relative;
}

.mockup-card.filtered {
    opacity: 0.4;
    filter: grayscale(0.5);
}

.mockup-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 8px 16px rgba(190, 0, 3, 0.05);
    z-index: 2;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-dim);
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mockup-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.line {
    height: 8px;
    background-color: var(--surface-dim);
    border-radius: 4px;
}

.line-name { width: 40%; height: 10px; }
.line-text { width: 90%; }
.line-text-short { width: 60%; }

.line-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.name {
    font-weight: 700;
    font-size: 0.875rem;
}

.mockup-text {
    font-size: 0.875rem;
    color: var(--on-surface);
}

.badge-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 218, 214, 0.4);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.badge {
    background: var(--primary);
    color: var(--on-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-floating {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--tertiary-container);
    color: var(--on-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

/* Features */
.section-header {
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
}

.text-center { text-align: center; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--surface-container-high);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-wide {
    grid-column: span 2;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-bg-error {
    background-color: var(--error-container);
    color: var(--error);
}

.icon-bg-gray {
    background-color: var(--surface-container);
    color: var(--on-surface);
}

.feature-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-desc {
    font-size: 1rem;
    line-height: 1.6;
}

.feature-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.03;
    transform: scale(4);
}

.sentiment-bar {
    margin-top: 1.5rem;
    height: 8px;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface-container);
}

.bar-success { background: var(--tertiary-container); }
.bar-neutral { background: var(--surface-dim); }
.bar-error { background: var(--primary); }

/* CTA Section */
.cta-section {
    background-color: var(--surface);
    border-top: 1px solid var(--surface-container-high);
    border-bottom: 1px solid var(--surface-container-high);
}

.cta-container {
    max-width: 800px;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--surface-container-high);
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-container-high);
}

.copyright {
    font-size: 0.875rem;
    color: var(--secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.managed-by {
    font-size: 0.75rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.managed-by a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.managed-by a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.managed-by a:hover::after {
    width: 100%;
}

/* ============================================
   RESPONSIVE — Clean mobile-first layout
   ============================================ */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
    .hero-title { font-size: 3.5rem; }
    .hero-grid { gap: 2rem; }
    .section { padding: 80px 0; }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }

    /* Navbar */
    .navbar { height: 60px; }
    .logo-text { font-size: 1.5rem; }
    .logo-img { height: 34px; width: 34px; }
    .btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }

    /* ── Hero: full-screen, content perfectly centered ── */
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        padding-top: 60px;   /* navbar height */
        padding-bottom: 0;
    }

    /* Grid becomes single column */
    .hero-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
        flex: 1;             /* fill the available height inside .hero */
    }

    /* Hide the mockup on mobile — content alone fills the screen cleanly */
    .hero-visual {
        display: none;
    }

    .hero-content {
        width: 100%;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
        margin-left: auto;
        margin-right: auto;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 360px;
    }

    /* Sections */
    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1rem; }
    .section-header { margin-bottom: 2.5rem; }

    /* Features */
    .features { margin-top: 0; }
    .features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .feature-wide { grid-column: span 1; }
    .feature-card { padding: 1.75rem; }
    .feature-name { font-size: 1.25rem; }

    /* CTA */
    .cta-title { font-size: 2rem; }
    .cta-description { font-size: 1.05rem; }

    /* Footer */
    .footer { padding: 2.5rem 0; }
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .footer-links { gap: 1rem; flex-wrap: wrap; }
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        align-items: center;
    }
    .managed-by { justify-content: center; }

    /* Legal / Contact pages */
    .legal-content { padding: 90px 1.25rem 60px !important; }
    .legal-content h1 { font-size: 2rem !important; }
    .contact-content { padding: 90px 1.25rem 60px !important; }
    .contact-content h1 { font-size: 2rem !important; }
    .contact-form { padding: 1.5rem !important; }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }

    /* Navbar */
    .navbar { height: 56px; }
    .logo-text { font-size: 1.5rem; }
    .logo-img { height: 32px; width: 32px; }
    .navbar-content { gap: 0.5rem; }
    .btn-sm {
        padding: 0.4rem 0.85rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .btn-sm .btn-support-text { display: none; }

    /* Hero */
    .hero { padding-top: 56px; }
    .hero-title { font-size: 2.1rem; }
    .hero-description { font-size: 1rem; }

    /* Features */
    .feature-card { padding: 1.25rem; }

    /* Footer links: 2-column grid */
    .footer-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem 1rem;
    }

    /* CTA */
    .cta-title { font-size: 1.75rem; }
}

/* --- Very Small (≤360px) --- */
@media (max-width: 360px) {
    .navbar { height: 52px; }
    .logo-img { height: 30px; width: 30px; }
    .logo-text { font-size: 1.35rem; }
    .hero { padding-top: 52px; }
    .hero-title { font-size: 1.9rem; }
    .container { padding: 0 0.875rem; }
}


