/* ═══════════════════════════════════════════════
   Softbook – Frontend CSS  (mobile-first)
   ═══════════════════════════════════════════════ */

:root {
    --primary:      #058ECE;
    --primary-dark: #046fa0;
    --accent:       #f5a623;
    --dark:         #1a2035;
    --topbar-h:     56px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #e8ecef;
    height: var(--topbar-h);
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 8px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    flex: 2;
    min-width: 0;
}

/* Brand */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo img { height: 26px; }

.brand-logo .brand-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.3px;
    white-space: nowrap;
}

/* Desktop module links — hidden on mobile */
.top-modules {
    display: none;
    align-items: center;
    margin-left: 20px;
}

.top-modules a {
    font-size: 13px;
    color: #555;
    text-decoration: none;
    padding: 0 12px;
    height: var(--topbar-h);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.top-modules a:hover,
.top-modules a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Auth + hamburger */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-signin {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1.5px solid var(--primary);
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.btn-signin:hover { background: var(--primary); color: #fff; text-decoration: none; }

.btn-signup {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1.5px solid var(--primary);
    white-space: nowrap;
    transition: background .15s;
}

.btn-signup:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

/* Hamburger button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background .15s;
}

.hamburger:hover { background: #f4f6f9; }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #555;
    border-radius: 2px;
    transition: all .25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid #e8ecef;
    z-index: 1099;
    padding: 8px 0 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

.mobile-nav.open { display: block; }

.mobile-nav a {
    display: block;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .15s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary);
    background: rgba(5,142,206,.05);
    border-left-color: var(--primary);
}

.mobile-nav a.active { font-weight: 600; }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0a6fa8 55%, #0b5c8e 100%);
    position: relative;
    overflow: hidden;
    padding: 48px 20px 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -120px; left: 25%;
    width: 350px; height: 350px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}

/* Hero uses Bootstrap row — just fine-tune text */
.hero-text {
    position: relative;
    z-index: 1;
    text-align: center;        /* center on mobile */
}

.hero-text h1 {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.hero-text h1 span { color: var(--accent); }

.hero-text p {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin-top: 14px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;   /* center on mobile */
}

.btn-hero-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 24px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(245,166,35,.4);
    white-space: nowrap;
}

.btn-hero-primary:hover {
    background: #e09520;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,.6);
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}

.btn-hero-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
}

/* Mockup — hidden on xs, visible from sm */
.hero-image {
    position: relative;
    z-index: 1;
    display: none;             /* hidden xs */
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

.hero-mockup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,.3);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.mockup-bar {
    background: var(--dark);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.red    { background: #f64e60; }
.mockup-dot.yellow { background: #ffa800; }
.mockup-dot.green  { background: #1bc5bd; }

.mockup-body { display: flex; height: 260px; }

.mockup-sidebar {
    width: 120px;
    background: #f8f9fc;
    border-right: 1px solid #eee;
    padding: 12px 0;
    flex-shrink: 0;
}

.mockup-sidebar .ms-item {
    padding: 7px 12px;
    font-size: 10px;
    color: #888;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-sidebar .ms-item.active {
    color: var(--primary);
    background: rgba(5,142,206,.08);
    border-left: 2px solid var(--primary);
}

.mockup-sidebar .ms-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.mockup-sidebar .ms-item.active .ms-dot { background: var(--primary); }

.mockup-content { flex: 1; padding: 14px; overflow: hidden; }

.mockup-content .mc-label {
    font-size: 9px;
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.mockup-content .mc-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.mockup-row { display: flex; gap: 8px; margin-bottom: 10px; }

.mockup-kpi { flex: 1; background: #f4f6f9; border-radius: 6px; padding: 7px 9px; }

.mkpi-label { font-size: 8px; color: #aaa; font-weight: 600; text-transform: uppercase; }
.mkpi-val   { font-size: 12px; font-weight: 700; color: var(--dark); margin-top: 2px; }
.mkpi-bar   { height: 4px; border-radius: 2px; margin-top: 5px; background: #e0e0e0; }
.mkpi-fill  { height: 100%; border-radius: 2px; }

.mockup-chart {
    background: #f4f6f9;
    border-radius: 6px;
    padding: 8px;
    height: 72px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.chart-bar {
    flex: 1;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    opacity: .7;
}

/* ══════════════════════════════════════
   FEATURE PILLS
══════════════════════════════════════ */
.feature-pills {
    background: #f4f6f9;
    padding: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 1px solid #e8ecef;
}

.pill {
    background: #fff;
    border: 1.5px solid #e0e5ed;
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    white-space: nowrap;
}

.pill svg { color: var(--primary); flex-shrink: 0; }

/* ══════════════════════════════════════
   MODULES GRID
══════════════════════════════════════ */
.modules-section {
    padding: 40px 16px;
    background: #fff;
}

.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: 24px; font-weight: 700; }
.section-header p  { color: #666; margin-top: 8px; font-size: 14px; }

.module-tile {
    background: #fff;
    border: 1.5px solid #e8ecef;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    height: 100%;
}

.module-tile:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(5,142,206,.15);
    transform: translateY(-3px);
    text-decoration: none;
}

.tile-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}

.tile-title { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
.tile-desc  { font-size: 11.5px; color: #888; line-height: 1.55; }

/* ══════════════════════════════════════
   STATS BANNER
══════════════════════════════════════ */
.stats-banner {
    background: linear-gradient(135deg, var(--dark) 0%, #283557 100%);
    padding: 40px 16px;
}

.stat-item { text-align: center; }
.stat-num  { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-lbl  { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 4px; }

/* ══════════════════════════════════════
   CTA SECTION
══════════════════════════════════════ */
.cta-section {
    background: var(--primary);
    padding: 48px 20px;
    text-align: center;
}

.cta-section h2 { font-size: 22px; font-weight: 700; color: #fff; }
.cta-section p  { color: rgba(255,255,255,.8); margin-top: 10px; font-size: 14px; }

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
    white-space: nowrap;
}

.btn-cta-primary:hover { background: #e09520; color: #fff; text-decoration: none; }

.btn-cta-outline {
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 28px;
    border-radius: 6px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,.6);
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}

.btn-cta-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
    background: var(--dark);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.footer-brand { font-size: 15px; font-weight: 600; color: #fff; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,.5); text-decoration: none; }
.footer-links a:hover { color: rgba(255,255,255,.85); }

.footer-copy { font-size: 12px; color: rgba(255,255,255,.4); }

/* ══════════════════════════════════════
   BREAKPOINT: sm ≥576px
══════════════════════════════════════ */
@media (min-width: 576px) {
    .hero { padding: 56px 32px 48px; }
    .hero-text h1 { font-size: 36px; }
    .hero-image { display: flex; }   /* show mockup from sm */

    .modules-section { padding: 48px 24px; }
    .section-header h2 { font-size: 28px; }
    .stats-banner { padding: 48px 24px; }
    .stat-num { font-size: 32px; }
    .cta-section h2 { font-size: 26px; }
    .feature-pills { padding: 18px 24px; gap: 10px; }
}

/* ══════════════════════════════════════
   BREAKPOINT: md ≥768px
══════════════════════════════════════ */
@media (min-width: 768px) {
    .top-bar { padding: 0 28px; }
    .btn-signup { display: inline-flex; }

    .hero { padding: 64px 40px; }
    .hero-text { text-align: left; }
    .hero-text h1 { font-size: 40px; }
    .hero-text p { font-size: 15px; }
    .hero-actions { justify-content: flex-start; }
    .hero-image { margin-top: 0; }

    .modules-section { padding: 56px 32px; }
    .section-header h2 { font-size: 30px; }
    .stats-banner { padding: 52px 32px; }
    .cta-section { padding: 56px 40px; }
    .cta-section h2 { font-size: 28px; }

    footer {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 28px 40px;
    }
}

/* ══════════════════════════════════════
   BREAKPOINT: lg ≥992px — show desktop nav
══════════════════════════════════════ */
@media (min-width: 992px) {
    .top-bar { padding: 0 40px; }
    .top-modules { display: flex; }
    .hamburger { display: none; }

    .hero { padding: 72px 40px; }
    .hero-text h1 { font-size: 46px; }
    .hero-text p { font-size: 16px; max-width: 480px; }

    .modules-section { padding: 64px 40px; }
    .section-header h2 { font-size: 32px; }
    .stats-banner { padding: 56px 40px; }
    .stat-num { font-size: 36px; }
    .cta-section { padding: 64px 40px; }
    .cta-section h2 { font-size: 30px; }
    .feature-pills { padding: 20px 40px; }
}

/* ══════════════════════════════════════
   BREAKPOINT: xl ≥1200px
══════════════════════════════════════ */
@media (min-width: 1200px) {
    .hero-text h1 { font-size: 50px; }
    .hero-mockup { max-width: 520px; }
}
