@import url('../fonts/Cereal.css');

:root {
    --brand-600: #6d28d9;
    --brand-500: #7c3aed;
    --brand-400: #8b5cf6;
    --brand-300: #a78bfa;
    --accent: #f9ca24;
    --success: #2dd4a7;
    --danger: #ff6161;
    --ink: #1e1b2e;
    --ink-soft: #52506b;
    --muted: #8a879e;
    --surface: #ffffff;
    --bg: #f7f6fb;
    --radius: 14px;
    --shadow-sm: 0 2px 10px rgba(31, 20, 66, 0.06);
    --shadow-md: 0 10px 30px rgba(31, 20, 66, 0.10);
    --shadow-lg: 0 20px 45px rgba(31, 20, 66, 0.16);
}

html {
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--ink-soft);
    font-family: 'Cereal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

*:focus {
    outline: none;
    box-shadow: none;
}

a {
    color: var(--brand-500);
}

a:hover {
    text-decoration: none;
    color: var(--brand-600);
}

.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.section-padding {
    padding: 90px 0;
}

/* ---------- Hero ---------- */

.home-presentation {
    position: relative;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 55%, #4c1d95 100%);
    height: 720px;
}

.home-presentation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.10) 0, transparent 45%),
                radial-gradient(circle at 85% 75%, rgba(255,255,255,0.08) 0, transparent 40%);
    pointer-events: none;
}

.home-presentation .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
}

.menu {
    padding-top: 32px;
    padding-bottom: 24px;
}

.menu .logo {
    max-height: 32px;
}

.menu .nav-item {
    margin-left: 28px;
}

.menu .nav-link {
    position: relative;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 15px;
    line-height: 22px;
    padding: 6px 0;
    transition: color .15s ease;
}

.menu .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: right .2s ease;
}

.menu .nav-link:hover {
    color: #fff;
}

.menu .nav-link:hover::after {
    right: 0;
}

.menu .nav-lang {
    padding: 6px 10px;
    border-radius: 999px;
    transition: background .15s ease;
}

.menu .nav-lang:hover {
    background: rgba(255,255,255,0.12);
}

.menu .nav-lang::after {
    display: none;
}

.menu .nav-lang .flag-icon {
    width: 18px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.4);
}

.menu .dropdown-item {
    white-space: nowrap;
}

.menu .dropdown-item .flag-icon {
    width: 18px;
    flex: 0 0 auto;
    border-radius: 3px;
}

.menu .nav-register {
    margin-left: 20px;
}

.menu .nav-register .nav-link {
    background: #FFF;
    color: var(--brand-600);
    border-radius: 999px;
    padding: 9px 20px;
    box-shadow: 0 6px 16px rgba(31, 20, 66, 0.18);
    transition: transform .15s ease, box-shadow .15s ease;
}

.menu .nav-register .nav-link::after {
    display: none;
}

.menu .nav-register .nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(31, 20, 66, 0.24);
    color: var(--brand-600);
}

.mid {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.hxl {
    font-weight: 800;
    font-size: 56px;
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.free-plan-title {
    font-weight: 800;
    font-size: 34px;
    line-height: 1.3;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.free-plan-title span {
    display: block;
    color: var(--brand-500);
    font-size: 42px;
}

.btn-register {
    background: #FFF;
    border-radius: 999px;
    padding: 15px 30px;
    color: var(--brand-600) !important;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: transform .18s ease, box-shadow .18s ease;
    display: inline-block;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ---------- Plans ---------- */

.plans {
    margin-top: -380px;
    position: relative;
    z-index: 5;
}

.plans .grid {
    gap: 1.25rem;
}

.plan {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 16px 20px;
    text-align: center;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    transition: transform .2s ease, box-shadow .2s ease;
}

.plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan .h4 {
    font-size: 1.15rem;
    margin-top: 0.5rem !important;
}

.plan-icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(31, 20, 66, 0.12);
    background: var(--bg);
    margin: 0 auto;
}

.plan-star .plan-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: rgba(255,255,255,0.12);
}

.plan .price {
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
    margin-top: 4px;
}

.plan small {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.plan p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 0;
}

.plan hr {
    border-color: rgba(31,20,66,0.08);
    margin: 10px 0;
}

.plan ul {
    padding: 0 6px;
    margin: 0;
    list-style: none;
    text-align: left;
    font-size: 13px;
    margin-bottom: 16px;
}

.plan a {
    background: var(--brand-500);
    padding: 10px 22px;
    color: #FFF;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    margin-top: auto;
    align-self: center;
    transition: background .18s ease, transform .18s ease;
}

.plan a:hover {
    background: var(--brand-600);
    color: #fff;
    transform: translateY(-2px);
}

.plan li {
    margin: 2px 0;
    font-weight: 600;
    color: var(--ink-soft);
}

.plan li .fa-check,
.starter-plan li .fa-check {
    color: #3ECF8E;
}

.plan li .fa-times,
.starter-plan li .fa-times {
    color: #ff5555;
}

.plan-star {
    background: linear-gradient(160deg, var(--brand-500), var(--brand-600));
    color: #FFF;
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent);
}

.plan-star .price,
.plan-star small,
.plan-star li {
    color: #fff;
}

.plan-star a {
    background: #FFF;
    color: var(--brand-600);
}

.plan-star a:hover {
    background: var(--accent);
    color: var(--ink);
}

.plan-star .h4 {
    color: var(--accent);
}

.plan-star:hover {
    transform: translateY(-4px);
}

/* ---------- Starter / free plan banner ---------- */

.bg-gradient {
    background: linear-gradient(120deg, var(--brand-600) 0%, #5b21b6 55%, #3b0764 100%);
    padding: 35px 0;
    color: #FFF;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.starter-plan ul {
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: left;
    font-size: 15px;
}

.starter-plan .btn-starter {
    background: #FFF;
    padding: 14px 30px;
    color: var(--brand-600);
    border-radius: 999px;
    font-weight: 700;
    display: inline-block;
    transition: transform .18s ease, box-shadow .18s ease;
}

.starter-plan .btn-starter:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--brand-600);
}

.mt--50 {
    margin-top: -80px;
}

/* ---------- Intro / features section ---------- */

.intro-img {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-img img {
    position: relative;
    z-index: 1;
    width: 260px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 16px 24px rgba(31, 20, 66, 0.16));
}

.intro-img-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-300) 0%, rgba(167, 139, 250, 0) 70%);
    opacity: .45;
    z-index: 0;
}

.intro-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

.intro-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.intro-box-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-500);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 14px;
}

.intro-box h4 {
    margin-bottom: 8px;
}

.intro-box p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.intro-cta {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #f3effc;
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: var(--radius);
    padding: 28px 32px;
}

.intro-cta-title {
    font-weight: 700;
    font-size: 19px;
    color: var(--ink);
}

.intro-cta-sub {
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    background: var(--brand-500);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.cta-button:hover {
    background: var(--brand-600);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.45);
}

#features .h4 {
    margin-bottom: 6px;
}

#features p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f3effc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 28px;
    height: 28px;
}

.feature-screenshot {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow-lg);
}

.feature-screenshot img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* ---------- Changelog ---------- */

.changelog-list {
    position: relative;
    padding-left: 28px;
}

.changelog-list::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: rgba(124, 58, 237, 0.15);
}

.changelog-item {
    position: relative;
    margin-bottom: 32px;
}

.changelog-item:last-child {
    margin-bottom: 0;
}

.changelog-dot {
    position: absolute;
    left: -28px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.changelog-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px 28px;
}

.changelog-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.changelog-version {
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
}

.changelog-date {
    color: var(--muted);
    font-size: 13px;
}

.changelog-changes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.changelog-changes li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.changelog-changes li:last-child {
    margin-bottom: 0;
}

.changelog-tag {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
}

.changelog-tag-new {
    background: var(--success);
}

.changelog-tag-improve {
    background: var(--brand-500);
}

.changelog-tag-fix {
    background: var(--accent);
    color: var(--ink);
}

/* ---------- Night / decorative widget (kept, restyled) ---------- */

.night {
    position: relative;
    background: linear-gradient(to bottom right, var(--brand-500) 0%, var(--brand-300) 70%);
    box-shadow: 1px 1px 30px rgba(124, 58, 237, 0.45);
    width: 130px;
    height: 130px;
    border-radius: 40%;
    z-index: 120;
}

.moon {
    position: absolute;
    top: -10%;
    left: 65%;
    width: 70px;
    height: 70px;
    border-radius: 100%;
    background: var(--accent);
    box-shadow: 1px 1px 30px rgba(224, 224, 224, 1);
}

.spot1 {
    position: absolute;
    top: 0%;
    left: 85%;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    background-color: #777;
}

.spot2 {
    position: absolute;
    top: 30%;
    left: 75%;
    width: 5px;
    height: 5px;
    border-radius: 100%;
    background-color: #777;
}

.night li {
    position: absolute;
    list-style: none;
    width: 3px;
    height: 3px;
    border-radius: 100%;
    background-color: #fff;
    transform: rotate(45deg);
}

.night li:nth-child(1) { top: 30%; left: 65%; }
.night li:nth-child(2) { top: 35%; left: 53%; }
.night li:nth-child(3) {
    opacity: 0;
    top: 20%;
    left: 75%;
    width: 2px;
    height: 2px;
    animation: meteor 1.5s infinite linear;
    animation-delay: 0.6s;
}
.night li:nth-child(4) { top: 5%; left: 50%; }
.night li:nth-child(5) {
    opacity: 0;
    top: 20%;
    left: 55%;
    width: 1px;
    height: 15px;
    animation: meteor 1.5s infinite linear;
}

@keyframes meteor {
    10% { opacity: 1; }
    80% { left: 10%; top: 75%; opacity: 0; }
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 991.98px) {
    .home-presentation {
        height: 560px;
    }

    .plans {
        margin-top: -290px;
    }

    .hxl {
        font-size: 44px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .free-plan-title {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .menu {
        padding-top: 20px;
    }

    .menu .navbar-collapse {
        background: var(--brand-600);
        border-radius: 12px;
        margin-top: 12px;
        padding: 10px 16px;
        position: relative;
        z-index: 20;
    }

    .menu .nav-item {
        margin-left: 0;
        margin-top: 6px;
    }

    .menu .nav-login,
    .menu .nav-register {
        display: inline-block;
        margin-top: 10px;
    }

    .home-presentation {
        height: 480px;
    }

    .plans {
        margin-top: -230px;
    }

    .plan-star {
        margin-top: 8px;
        margin-bottom: 36px;
    }

    .hxl {
        font-size: 34px;
        margin-bottom: 24px;
        text-align: center;
    }

    .free-plan .bg-gradient.px-5 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .starter-plan .h1 {
        font-size: 28px;
    }

    .intro-cta {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
}

@media (max-width: 575.98px) {
    .home-presentation {
        height: 420px;
    }

    .plans {
        margin-top: -170px;
    }

    .plan {
        padding: 18px 14px 18px;
        margin-bottom: 20px;
    }

    .plan .price {
        font-size: 24px;
    }

    .hxl {
        font-size: 28px;
    }

    .cta-button {
        font-size: 13px;
        padding: 12px 20px;
        white-space: normal;
    }
}

/* ---------- Compact Tawk.to widget ---------- */

/* Open chat panel: keep it smaller so it does not cover pricing cards */
iframe[title*="chat"],
iframe[title*="Chat"] {
    max-height: 70vh !important;
}

/* Scale the maximized widget container when Tawk injects it */
.tawk-box-max,
div.widget-visible iframe[src*="tawk.to"],
#tawkchat-container iframe {
    max-height: 70vh !important;
}

/* Prefer bottom-right bubble; shrink launcher if present */
.tawk-min-container,
.tawk-button-circle,
.tawk-button {
    transform: scale(0.88);
    transform-origin: bottom right;
}

@media (min-width: 768px) {
    /* Desktop open frame ~15% smaller, anchored bottom-right */
    iframe[src*="tawk.to"][style*="height"],
    .widget-visible > iframe,
    .tawk-flex-frame {
        max-width: 340px !important;
        max-height: 70vh !important;
        transform: scale(0.88);
        transform-origin: bottom right;
    }
}

@media (max-width: 767.98px) {
    iframe[title*="chat"],
    iframe[title*="Chat"],
    .tawk-flex-frame {
        max-height: 60vh !important;
        max-width: min(100vw - 16px, 340px) !important;
        transform: scale(0.9);
        transform-origin: bottom right;
    }
}
