/* ============================================================
   Certus Landing Page - Styles
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --color-blue: #0077CC;
    --color-teal: #00BFA5;
    --gradient-brand: linear-gradient(135deg, #0077CC, #00BFA5);
    --gradient-brand-h: linear-gradient(90deg, #0077CC, #00BFA5);

    --bg-dark: #0B1929;
    --bg-dark-surface: #112240;
    --bg-light: #F8FAFE;
    --bg-white: #FFFFFF;

    --text-light: #E8EDF5;
    --text-light-secondary: #8892A4;
    --text-dark: #1A2A3A;
    --text-dark-secondary: #5A6A7A;

    --border-dark: #1E3A5F;
    --border-light: #D8E0EC;

    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1100px;
    --nav-height: 72px;

    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* --- Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-teal);
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 119, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 119, 204, 0.4);
    color: #fff;
    opacity: 0.95;
}

.btn-primary:active {
    transform: translateY(0);
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(11, 25, 41, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-light-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-light);
}

.nav-cta {
    background: var(--gradient-brand);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.nav-cta:hover {
    opacity: 0.9;
    color: #fff !important;
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    width: 28px;
    height: 28px;
}

.nav-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-bg-accent {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(0, 119, 204, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 60px 24px;
}

.hero-logo {
    margin: 0 auto 32px;
    max-width: 430px;
}

.hero-tagline {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-light-secondary);
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero .btn {
    margin-bottom: 40px;
}


/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-light {
    background: var(--bg-light);
    color: var(--text-dark);
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.section-dark .section-title {
    color: var(--text-light);
}

.section-light .section-title {
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.section-dark .section-subtitle {
    color: var(--text-light-secondary);
}

.section-light .section-subtitle {
    color: var(--text-dark-secondary);
}

.section-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.section-light .section-text {
    color: var(--text-dark-secondary);
}

/* --- Stats Bar --- */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dark-secondary);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 48px;
}

.card {
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-dark);
    border-left: 3px solid transparent;
    border-image: var(--gradient-brand) 1;
    border-image-slice: 1;
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
    /* Fix border-image and border-radius conflict */
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-brand);
}

.card {
    border-image: none;
    border-left: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 119, 204, 0.15);
}

.card-icon {
    margin-bottom: 16px;
}

.card-icon img,
.card-icon svg {
    width: 48px;
    height: 48px;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-light-secondary);
    line-height: 1.6;
}

/* --- Use Cases Grid --- */
.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 48px;
}

.use-case-card {
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.2s;
}

.use-case-card:hover {
    transform: translateY(-4px);
}

.use-case-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
}

.use-case-card p {
    font-size: 0.95rem;
    color: var(--text-light-secondary);
    line-height: 1.6;
}

/* --- Contact --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 48px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.required {
    color: #DC3545;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-info {
    padding: 32px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.contact-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.contact-info p {
    color: var(--text-dark-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.contact-info a {
    color: var(--color-blue);
    font-weight: 500;
}

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-light-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.footer-tagline {
    color: var(--text-light-secondary);
    opacity: 0.7;
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */

/* Tablet */
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .use-cases-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-layout {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .nav-hamburger {
        display: none;
    }

    .btn-submit {
        width: auto;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero-tagline {
        font-size: 3.2rem;
    }

    .section {
        padding: 120px 0;
    }

    .use-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

/* Mobile */
@media (max-width: 767px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(11, 25, 41, 0.97);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border-dark);
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-cta {
        text-align: center;
    }

    .hero-tagline {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-logo {
        max-width: 280px;
    }

    .stat-number {
        font-size: 2.4rem;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 1.7rem;
    }
}
