@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg:             #f8fafc;
    --bg-dark:        #0f172a;
    --bg-darker:      #020617;
    --bg-card:        #ffffff;
    --text:           #1e293b;
    --text-muted:     #64748b;
    --text-light:     #94a3b8;
    --border:         #e2e8f0;
    --primary:        #3b82f6;
    --primary-hover:  #2563eb;
    --primary-soft:   #dbeafe;
    --success:        #22c55e;
    --success-soft:   #f0fdf4;
    --warning:        #f97316;
    --warning-soft:   #fff7ed;
    --radius:         8px;
    --radius-lg:      16px;
    --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg:      0 20px 40px -12px rgba(0,0,0,.15);
    --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition:     .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ═══════════ NAV ═══════════ */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248,250,252,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}
.nav__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: .875rem;
    flex-shrink: 0;
}
.nav__brand svg { color: var(--primary); }
.nav__links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .35rem .5rem;
    flex-shrink: 1;
    min-width: 0;
}
.nav__links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 500;
    transition: color var(--transition);
    white-space: nowrap;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
    background: var(--primary) !important;
    color: #fff !important;
    padding: .3rem .55rem !important;
    border-radius: var(--radius);
    font-size: .75rem !important;
    font-weight: 600 !important;
    transition: background var(--transition) !important;
}
.nav__cta:hover { background: var(--primary-hover) !important; }
.nav__login {
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: .75rem !important;
}
.nav__login:hover { color: var(--primary) !important; }

/* Smal skärm: dölj sektionslänkar så Logga in / Skapa konto ryms */
@media (max-width: 600px) {
    .nav__link--section {
        display: none !important;
    }
}

@media (min-width: 640px) {
    .nav__links {
        gap: .75rem 1rem;
    }
    .nav__links a {
        font-size: .8125rem;
    }
    .nav__cta {
        padding: .4rem .75rem !important;
        font-size: .8125rem !important;
    }
    .nav__login {
        font-size: .8125rem !important;
    }
    .nav__brand {
        font-size: 1rem;
    }
}
@media (min-width: 960px) {
    .nav__links {
        gap: 1.5rem;
    }
    .nav__links a {
        font-size: .875rem;
    }
    .nav__cta {
        padding: .5rem 1.125rem !important;
        font-size: .875rem !important;
    }
    .nav__login {
        font-size: .875rem !important;
    }
}

/* ═══════════ HERO ═══════════ */

.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .35rem .875rem;
    border-radius: 99px;
    margin-bottom: 1.25rem;
    letter-spacing: .02em;
}

.hero__content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.035em;
    color: var(--bg-dark);
    margin-bottom: 1.25rem;
}
.hero__gradient {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero__how {
    margin: -0.25rem 0 1.25rem;
    font-size: .9375rem;
}
.hero__how a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}
.hero__how a:hover {
    border-bottom-color: var(--primary);
}

.hero__trust {
    font-size: .8125rem;
    color: var(--text-light);
}

/* Hero buttons */
.btn { text-decoration: none; display: inline-flex; align-items: center; gap: .375rem; font-family: var(--font); cursor: pointer; border: none; }
.btn--hero {
    background: var(--primary);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    padding: .8rem 1.75rem;
    border-radius: var(--radius);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(59,130,246,.3);
}
.btn--hero:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,.35); }
.btn--hero-ghost {
    background: transparent;
    color: var(--text);
    font-size: .9375rem;
    font-weight: 600;
    padding: .8rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.btn--hero-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* Hero mockup */
.hero__visual { perspective: 1200px; }
.hero__mockup {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform .4s ease;
}
.hero__mockup:hover { transform: rotateY(0) rotateX(0); }

.mockup-bar {
    display: flex;
    gap: 6px;
    padding: .625rem .875rem;
    background: var(--bg-dark);
}
.mockup-bar span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #334155;
}
.mockup-bar span:first-child { background: #ef4444; }
.mockup-bar span:nth-child(2) { background: #f59e0b; }
.mockup-bar span:nth-child(3) { background: #22c55e; }

.mockup-grid { padding: .75rem; }
.mockup-header {
    display: grid;
    grid-template-columns: 36px repeat(4, 1fr);
    background: var(--bg-dark);
    border-radius: 6px 6px 0 0;
    color: rgba(255,255,255,.7);
    font-size: .5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.mh-label, .mh-col { padding: .3rem .25rem; text-align: center; }
.mh-label { background: rgba(0,0,0,.15); text-align: left; padding-left: .5rem; }

.mockup-row {
    display: grid;
    grid-template-columns: 36px repeat(4, 1fr);
    border-bottom: 1px solid var(--border);
}
.mockup-row:last-child { border-bottom: none; }
.mr-label {
    font-size: .625rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-right: 1px solid var(--border);
}
.mr-cell { padding: .3rem; border-right: 1px solid var(--border); }
.mr-cell:last-child { border-right: none; }

.mc {
    font-size: .5625rem;
    font-weight: 600;
    padding: .25rem .375rem;
    border-radius: 4px;
    border: 1.5px solid;
    min-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc--white  { background: #fff; border-color: #94a3b8; color: var(--text); }
.mc--orange { background: var(--warning-soft); border-color: var(--warning); color: #9a3412; }
.mc--green  { background: var(--success-soft); border-color: var(--success); color: #166534; }

.mockup-stats {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem .75rem;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}
.ms { display: flex; flex-direction: column; }
.ms-val { font-size: .8125rem; font-weight: 700; line-height: 1.2; }
.ms-val--g { color: #16a34a; }
.ms-val--o { color: #ea580c; }
.ms-lbl { font-size: .5rem; color: var(--text-light); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.ms-bar { flex: 1; height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.ms-bar__fill { height: 100%; background: linear-gradient(90deg, #16a34a, #4ade80); border-radius: 99px; }

/* ═══════════ PROBLEM ═══════════ */

.problem {
    background: var(--bg-dark);
    color: #fff;
    padding: 5rem 1.5rem;
}
.problem__inner { max-width: 1120px; margin: 0 auto; }
.problem h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -.02em;
}
.problem__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.problem__card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: background var(--transition);
}
.problem__card:hover { background: rgba(255,255,255,.08); }
.problem__icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #f87171;
}
.problem__card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: .5rem;
    font-style: italic;
}
.problem__card p {
    font-size: .875rem;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
}

/* ═══════════ FEATURES ═══════════ */

.features { padding: 5rem 1.5rem; }
.features__inner { max-width: 1120px; margin: 0 auto; }

.features__header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.pill {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .3rem .875rem;
    border-radius: 99px;
    margin-bottom: .75rem;
    letter-spacing: .02em;
}
.features__header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.features__header p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

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

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.feature__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.feature__icon--blue   { background: #dbeafe; color: #2563eb; }
.feature__icon--green  { background: #dcfce7; color: #16a34a; }
.feature__icon--orange { background: #ffedd5; color: #ea580c; }
.feature__icon--purple { background: #ede9fe; color: #7c3aed; }
.feature__icon--pink   { background: #fce7f3; color: #db2777; }
.feature__icon--teal   { background: #ccfbf1; color: #0d9488; }

.feature h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .375rem;
}
.feature p {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ═══════════ HOW IT WORKS ═══════════ */

.how {
    padding: 5rem 1.5rem;
    background: #f1f5f9;
}
.how__inner { max-width: 1120px; margin: 0 auto; }

.how__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    flex: 1;
    max-width: 320px;
    text-align: center;
}
.step__num {
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 1.125rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .375rem;
}
.step p {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.step__arrow {
    display: flex;
    align-items: center;
    padding-top: 2.5rem;
    color: var(--text-light);
}

/* ═══════════ COMPARE ═══════════ */

.compare { padding: 5rem 1.5rem; }
.compare__inner { max-width: 1120px; margin: 0 auto; }

.compare__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Korta kolumnrubriker på smal skärm (undviker horisontell scroll) */
.compare__th-abbr { display: none; }
@media (max-width: 720px) {
    .compare__th-full { display: none; }
    .compare__th-abbr { display: inline; }
}

.compare__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: .875rem;
}
.compare__table th,
.compare__table td {
    padding: .75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.compare__table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: .8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.compare__table thead th:first-child { text-align: left; }
.compare__table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text);
}
.compare__us {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.cx { color: #ef4444; font-weight: 500; }
.ck { color: #16a34a; font-weight: 600; }

.compare__table tbody tr:last-child td { border-bottom: none; }
.compare__table tbody td:last-child {
    background: rgba(59,130,246,.04);
    font-weight: 600;
}

@media (max-width: 840px) {
    .compare__table-wrap {
        overflow-x: visible;
    }
    .compare__table {
        table-layout: fixed;
        font-size: .625rem;
    }
    .compare__table th,
    .compare__table td {
        padding: .35rem .2rem;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
    }
    .compare__table thead th {
        font-size: .5625rem;
        letter-spacing: .02em;
        text-transform: none;
    }
}

@media (max-width: 380px) {
    .compare__table {
        font-size: .5625rem;
    }
    .compare__table thead th {
        font-size: .5rem;
    }
}

/* ═══════════ CTA ═══════════ */

.cta {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 50%, var(--primary-hover) 100%);
    color: #fff;
    padding: 5rem 1.5rem;
    text-align: center;
}
.cta__inner { max-width: 600px; margin: 0 auto; }
.cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: .75rem;
    letter-spacing: -.02em;
}
.cta p {
    font-size: 1.0625rem;
    color: rgba(255,255,255,.7);
    margin-bottom: 2rem;
}
.cta .btn--hero {
    background: #fff;
    color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.cta .btn--hero:hover { background: #f0f5ff; }

/* ═══════════ FOOTER ═══════════ */

.footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
}
.footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .875rem;
    color: var(--text);
}
.footer__brand svg { color: var(--primary); }
.footer__copy { font-size: .8125rem; color: var(--text-light); }

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem 2.5rem;
        gap: 2rem;
    }
    .hero__content h1 { font-size: 2.25rem; }
    .hero__mockup { transform: none; }
    .problem__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .features__grid { grid-template-columns: 1fr 1fr; }
    .how__steps { flex-direction: column; align-items: center; }
    .step__arrow { transform: rotate(90deg); padding: 0; }
    .step { max-width: 100%; }
}

@media (max-width: 600px) {
    .nav__inner { padding: .625rem 1rem; }

    .hero { padding: 2rem 1rem 2rem; }
    .hero__content h1 { font-size: 1.75rem; }
    .hero__sub { font-size: .9375rem; margin-bottom: 1.5rem; }
    .hero__badge { font-size: .6875rem; padding: .3rem .75rem; margin-bottom: 1rem; }
    .hero__actions {
        flex-direction: column;
        gap: .625rem;
    }
    .btn--hero, .btn--hero-ghost {
        width: 100%;
        justify-content: center;
        padding: .75rem 1.25rem;
        font-size: .875rem;
    }
    .hero__how { font-size: .8125rem; margin: .25rem 0 1rem; text-align: center; }
    .hero__trust { font-size: .75rem; text-align: center; }

    .problem { padding: 3rem 1rem; }
    .problem h2 { font-size: 1.375rem; margin-bottom: 2rem; }
    .problem__card { padding: 1.5rem 1.25rem; }
    .problem__card h3 { font-size: .9375rem; }
    .problem__card p { font-size: .8125rem; }

    .features { padding: 3rem 1rem; }
    .features__grid { grid-template-columns: 1fr; }
    .features__header { margin-bottom: 2rem; }
    .features__header h2, .how__inner h2, .compare__inner h2, .cta h2 {
        font-size: 1.375rem;
    }
    .features__header p { font-size: .875rem; }
    .feature { padding: 1.5rem 1.25rem; }

    .how { padding: 3rem 1rem; }
    .step { padding: 1.5rem 1.25rem; }

    .compare { padding: 3rem 1rem; }
    /* Jämförelsetabell: hanteras av @media (max-width: 840px) ovan */

    .cta { padding: 3rem 1rem; }
    .cta h2 { font-size: 1.375rem; }
    .cta p { font-size: .9375rem; }
    .cta .btn--hero { width: 100%; justify-content: center; }

    .footer { padding: 1.5rem 1rem; }
    .footer__inner { flex-direction: column; gap: .5rem; text-align: center; }
    .footer__brand { font-size: .8125rem; }
    .footer__copy { font-size: .75rem; }
}

@media (max-width: 380px) {
    .nav__brand span { font-size: .875rem; }
    .nav__brand svg { width: 20px; height: 20px; }
    .hero__content h1 { font-size: 1.5rem; }
}
