/* ========================================
   ERP ML Prep - Waitlist Landing Page
   Custom CSS
======================================== */

/* CSS Custom Properties */
:root {
    --color-primary: #0F4C81;
    --color-secondary: #00B4D8;
    --color-accent: #FF6B35;
    --color-dark-bg: #0A1628;
    --color-darker-bg: #060D18;
    --color-light-bg: #F4F7FA;
    --color-white: #FFFFFF;
    --color-text-dark: #1E293B;
    --color-text-light-bg: #1E293B;
    --color-text-dark-bg: #E2E8F0;
    --color-text-muted: #64748B;
    --color-border: #E2E8F0;
    --color-placeholder: #94A3B8;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-input: 8px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-btn: 0 4px 14px rgba(255, 107, 53, 0.35);
    --transition: 0.25s ease;
    --max-width: 1200px;
    --section-pad-desktop: 80px;
    --section-pad-mobile: 48px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-dark);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

button {
    cursor: pointer;
    font-family: var(--font-family);
    border: none;
    background: none;
}

input, select {
    font-family: var(--font-family);
}

/* ========================================
   UTILITY CLASSES
======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 700px;
}

.section-white {
    padding: var(--section-pad-desktop) 0;
    background: var(--color-white);
}

.section-light {
    padding: var(--section-pad-desktop) 0;
    background: var(--color-light-bg);
}

.section-dark {
    padding: var(--section-pad-desktop) 0;
    background: var(--color-dark-bg);
}

.section-eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.section-eyebrow-cyan {
    color: var(--color-secondary);
}

.section-heading {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 24px;
    line-height: 1.15;
}

.section-heading-light {
    color: var(--color-text-dark-bg);
}

.section-intro {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 700px;
    margin-bottom: 48px;
}

/* ========================================
   NAVIGATION
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
    background: transparent;
}

.navbar.scrolled {
    background: var(--color-dark-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    padding: 10px 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-white);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-dark-bg);
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--color-secondary);
}

.nav-cta {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-accent);
    border-radius: var(--radius-btn);
    white-space: nowrap;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav-cta:hover {
    background: #E85A2A;
    box-shadow: var(--shadow-btn);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Drawer */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--color-dark-bg);
    z-index: 1001;
    padding: 24px;
    transition: right 0.35s ease;
    overflow-y: auto;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-close {
    display: block;
    margin-left: auto;
    font-size: 32px;
    color: var(--color-text-dark-bg);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    margin-bottom: 40px;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.mobile-links a {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark-bg);
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
    transition: color var(--transition), padding-left var(--transition);
}

.mobile-links a:hover {
    color: var(--color-secondary);
    padding-left: 8px;
}

.mobile-cta {
    width: 100%;
    text-align: center;
    padding: 14px;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    min-height: 100vh;
    background: var(--color-dark-bg);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 180, 216, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 140px 24px 80px;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-left {
    flex: 0 0 60%;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.hero-heading {
    font-size: clamp(38px, 5.5vw, 58px);
    font-weight: 700;
    color: var(--color-text-dark-bg);
    line-height: 1.08;
    margin-bottom: 20px;
}

.hero-subheading {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-dark-bg);
    opacity: 0.85;
    margin-bottom: 32px;
    max-width: 550px;
}

.hero-right {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-graphic {
    width: 100%;
    max-width: 380px;
    height: auto;
    animation: floatGraphic 6s ease-in-out infinite;
}

@keyframes floatGraphic {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ========================================
   WAITLIST FORM
======================================== */
.tally-form-wrapper {
    max-width: 460px;
}

.tally-form-wrapper iframe {
    display: block;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1.5px solid rgba(226, 232, 240, 0.2);
    border-radius: var(--radius-input);
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-dark-bg);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}

.form-input::placeholder {
    color: rgba(226, 232, 240, 0.45);
}

.form-input:focus {
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23E2E8F0' stroke-width='2' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-btn);
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    white-space: nowrap;
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background: #E85A2A;
    box-shadow: var(--shadow-btn);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

.form-disclaimer {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.55);
    text-align: center;
    margin-top: 4px;
}

.success-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-secondary);
    text-align: center;
    padding: 48px 0;
}

/* ========================================
   TRUST BAR
======================================== */
.trust-bar {
    padding: 48px 0;
    background: var(--color-light-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.trust-heading {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.trust-pills-track {
    overflow: hidden;
}

.trust-pills {
    display: flex;
    gap: 16px;
    animation: scrollPills 20s linear infinite;
    width: max-content;
}

@keyframes scrollPills {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.trust-pill {
    display: inline-block;
    padding: 10px 22px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================
   CARDS & GRIDS
======================================== */
.cards-row {
    display: grid;
    gap: 24px;
}

.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.services-grid {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    padding: 36px 32px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--color-border);
}

.service-card {
    text-align: center;
    padding: 40px 28px;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 16px;
    line-height: 1;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.card-desc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-text-muted);
}

/* ========================================
   STEPPER (How It Works)
======================================== */
.stepper {
    position: relative;
    margin-top: 48px;
}

.stepper-line {
    position: absolute;
    top: 36px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    opacity: 0.25;
}

.stepper-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.step {
    text-align: center;
    padding: 0 8px;
}

.step-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(15, 76, 129, 0.3);
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ========================================
   BENEFITS
======================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.08);
    border-radius: var(--radius-card);
    padding: 40px 32px;
    text-align: center;
}

.benefit-stat {
    display: block;
    font-size: clamp(36px, 4.5vw, 52px);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 12px;
    line-height: 1.1;
}

.benefit-label {
    font-size: 16px;
    color: var(--color-text-dark-bg);
    opacity: 0.85;
    line-height: 1.5;
}

.cta-center {
    text-align: center;
    margin-top: 48px;
}

/* ========================================
   FAQ ACCORDION
======================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--color-white);
    transition: border-color var(--transition);
}

.faq-item:has(.faq-question[aria-expanded="true"]) {
    border-color: var(--color-primary);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
}

.faq-question:hover {
    background: var(--color-light-bg);
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--color-primary);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.faq-icon::before {
    width: 14px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    width: 2px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* ========================================
   FINAL CTA SECTION
======================================== */
.section-cta-final {
    padding: var(--section-pad-desktop) 0;
    background: linear-gradient(160deg, #0F4C81 0%, #0A1628 100%);
}

.cta-final-subtext {
    font-size: 17px;
    color: var(--color-text-dark-bg);
    opacity: 0.8;
    margin-bottom: 32px;
    text-align: center;
}

.section-cta-final .waitlist-form {
    margin: 0 auto;
}

.section-cta-final .form-input {
    border-color: rgba(226, 232, 240, 0.15);
}

.section-cta-final .success-message {
    color: var(--color-secondary);
}

/* ========================================
   FOOTER
======================================== */
.footer {
    padding: 60px 0 32px;
    background: var(--color-darker-bg);
    color: var(--color-text-dark-bg);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.footer-desc {
    font-size: 14px;
    color: rgba(226, 232, 240, 0.6);
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.7);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-copy p {
    font-size: 14px;
    color: rgba(226, 232, 240, 0.5);
}

.footer-built {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.4);
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.08);
}

/* ========================================
   BACK TO TOP BUTTON
======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(15, 76, 129, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-secondary);
}

/* ========================================
   SCROLL ANIMATIONS
======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE - TABLET (max 991px)
======================================== */
@media screen and (max-width: 991px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-container {
        flex-direction: column;
        padding: 120px 24px 60px;
    }

    .hero-left {
        flex: 1;
        width: 100%;
    }

    .hero-right {
        display: none;
    }

    .hero-heading {
        font-size: clamp(32px, 7vw, 48px);
    }

    .hero-subheading {
        max-width: 100%;
    }

    .three-col {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stepper-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .stepper-line {
        display: none;
    }

    .benefits-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 24px;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max 767px)
======================================== */
@media screen and (max-width: 767px) {
    :root {
        --section-pad-desktop: 48px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stepper-steps {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .waitlist-form {
        max-width: 100%;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .mobile-drawer {
        width: 100%;
        right: -100%;
    }

    .nav-container {
        padding: 0 16px;
    }

    .container {
        padding: 0 16px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (max 479px)
======================================== */
@media screen and (max-width: 479px) {
    .hero-heading {
        font-size: 30px;
    }

    .card {
        padding: 28px 20px;
    }

    .service-card {
        padding: 28px 20px;
    }

    .step-circle {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
