/* ===== RESET & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Dark theme (hero, header, footer, dark pages) */
    --bg-nav:    #010409;
    --bg-dark:   #0D1117;
    --bg-darker: #090d13;
    --bg-card-dark: #151B23;
    --border-dark: #3D444D;
    --border-dark-subtle: rgba(61, 68, 77, 0.6);

    /* Light theme (feature sections on home page) */
    --bg-light:     #ffffff;
    --bg-light-alt: #f6f8fa;
    --border-light: #d0d7de;

    /* Text - dark backgrounds */
    --text-primary:   #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);

    /* Text - light backgrounds */
    --text-dark:           #0D1117;
    --text-dark-secondary: #57606a;

    /* Brand accent - coral to amber */
    --accent-coral:   #f43f5e;
    --accent-amber:   #f97316;
    --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #f97316 100%);

    /* Legacy aliases (dark pages: contact, feedback) */
    --card-bg:     #151B23;
    --card-border: #3D444D;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.75;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(1, 4, 9, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(61, 68, 77, 0.5);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.9rem 3rem;
    transition: background 0.35s ease, border-color 0.35s ease;
}

/* Light state - when scrolled into white sections */
header.scrolled-light {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

header.scrolled-light .nav-link {
    color: var(--text-dark-secondary);
}

header.scrolled-light .nav-link:hover,
header.scrolled-light .nav-link.active {
    color: var(--text-dark);
}

header.scrolled-light .hamburger-btn {
    border-color: var(--border-light);
}

header.scrolled-light .hamburger-btn svg {
    stroke: var(--text-dark);
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    height: 54px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 0.35s ease;
}

.header-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.35rem 0;
    position: relative;
    transition: color 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-cta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    text-decoration: none;
    display: inline-block;
    text-transform: capitalize;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Light-section secondary button */
.section-light .btn-secondary,
.section-light-alt .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.section-light .btn-secondary:hover,
.section-light-alt .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #b1bac4;
}

.btn-lg {
    padding: 1rem 2.4rem;
    font-size: 1rem;
    border-radius: 12px;
}

.header-demo-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-hero {
    padding: 0.75rem 1.7rem;
    font-size: 1rem;
    border-radius: 10px;
}

/* ===== HAMBURGER & MOBILE MENU ===== */
.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.hamburger-btn:hover { background: rgba(255, 255, 255, 0.07); }

.hamburger-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    stroke-width: 2;
    display: block;
}

.mobile-menu {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.6rem;
}

.mobile-menu.open { display: flex; }

.mobile-nav-link {
    padding: 0.8rem 0.5rem;
    font-size: 1rem;
    text-align: center;
    width: auto;
    align-self: center;
}

.mobile-demo-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    align-self: center;
    margin-top: 1.5rem;
}

/* ===== SECTION SHARED ===== */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-coral);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
    display: block;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.9rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== LIGHT SECTION UTILITIES ===== */
.section-light {
    background: var(--bg-light);
    position: relative;
    z-index: 1;
}

.section-light-alt {
    background: var(--bg-light-alt);
    position: relative;
    z-index: 1;
}

/* Text overrides in light sections */
.section-light .section-title,
.section-light-alt .section-title {
    color: var(--text-dark);
}

.section-light .card-body,
.section-light-alt .card-body {
    color: var(--text-dark-secondary);
}

.section-light .card::before,
.section-light-alt .card::before {
    display: none;
}

.section-light .trust-icon svg,
.section-light-alt .trust-icon svg {
    stroke: var(--accent-coral);
    opacity: 0.9;
}

/* CTA box overrides for light section */
.section-light .cta-box {
    background: var(--bg-light-alt);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.06);
}

.section-light .cta-title {
    color: var(--text-dark);
}

.section-light .cta-description {
    color: var(--text-dark-secondary);
}

/* ===== CARD BASE ===== */
.card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 18px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-accent);
    opacity: 0.45;
}

/* Light-context card overrides */
.section-light .card,
.section-light-alt .card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 44px;
    height: 44px;
    stroke: rgba(255, 255, 255, 0.88);
    stroke-width: 1.8;
}

.section-light .card-icon svg,
.section-light-alt .card-icon svg {
    stroke: var(--accent-coral);
}

.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.9rem;
}

.card-body {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.85;
}

/* ===== FORM FIELDS ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    display: block;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(55, 55, 62, 0.45);
    border: 1px solid var(--border-dark-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.075rem;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.form-input::placeholder,
.form-textarea::placeholder { color: rgba(180, 180, 190, 0.65); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(244, 63, 94, 0.5);
    background: rgba(55, 55, 62, 0.65);
}

/* Light-section form inputs */
.section-light .form-label,
.section-light-alt .form-label {
    color: var(--text-dark-secondary);
}

.section-light .form-input,
.section-light .form-textarea,
.section-light .form-select,
.section-light-alt .form-input,
.section-light-alt .form-textarea,
.section-light-alt .form-select {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
}

.section-light .form-input::placeholder,
.section-light .form-textarea::placeholder,
.section-light-alt .form-input::placeholder,
.section-light-alt .form-textarea::placeholder {
    color: #b1bac4;
}

.section-light .form-input:focus,
.section-light .form-textarea:focus,
.section-light .form-select:focus,
.section-light-alt .form-input:focus,
.section-light-alt .form-textarea:focus,
.section-light-alt .form-select:focus {
    outline: none;
    border-color: rgba(244, 63, 94, 0.5);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.form-textarea { resize: vertical; min-height: 110px; }

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.section-light .form-select,
.section-light-alt .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(0,0,0,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.form-select option { background: var(--bg-dark); color: var(--text-primary); }

.optional-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-left: 0.4rem;
    opacity: 0.7;
}

.submit-btn {
    padding: 0.95rem;
    font-size: 1rem;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    margin-top: 0.4rem;
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible { opacity: 1; visibility: visible; }
.scroll-to-top:hover { transform: translateY(-3px); }

.scroll-to-top svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.5;
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    background: var(--bg-nav);
    border-top: 1px solid var(--border-dark);
    z-index: 1;
}

/* Light footer variant - for home page */
footer.footer-light {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

footer.footer-light .footer-tagline {
    color: var(--text-dark-secondary);
}

footer.footer-light .footer-link {
    color: var(--text-dark-secondary);
}

footer.footer-light .footer-link:hover {
    color: var(--text-dark);
}

footer.footer-light .footer-text {
    color: var(--text-dark-secondary);
}

footer.footer-light .footer-bottom {
    border-top-color: var(--border-light);
}

footer.footer-light .footer-logo {
    filter: brightness(0) saturate(100%);
}

/* Invert logo when header is over light sections */
header.scrolled-light .header-logo img {
    filter: brightness(0) saturate(100%);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
    padding: 3rem 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    align-self: flex-start;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 260px;
    line-height: 1.65;
}

.footer-nav {
    display: flex;
    gap: 4rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-coral);
    margin-bottom: 0.4rem;
}

.footer-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-link:hover { color: var(--text-primary); }

.footer-bottom {
    padding: 1.5rem 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr; padding: 2.5rem 1.5rem 1.5rem; gap: 2rem; }
    .footer-nav { gap: 2.5rem; }
    .footer-bottom { padding: 1.2rem 1.5rem; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE - SHARED ===== */
@media (max-width: 768px) {
    header { padding: 0.8rem 1.5rem; }
    .header-logo img { height: 38px; }
    .header-cta .btn { padding: 0.55rem 1rem; font-size: 0.8rem; border-radius: 8px; }
    .header-nav { gap: 1.5rem; }
    .section-title { font-size: 2.1rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
    .header-nav { display: none; }
    header { grid-template-columns: 1fr auto; }
    .header-demo-btn { display: none; }
    .hamburger-btn { display: flex; }
}
