/* =========================================================
   ESTERSOFT / ERWAB
   Main stylesheet
   ========================================================= */

:root {
    --blue: #1e6fe6;
    --blue2: #0e4fae;
    --ink: #142033;
    --muted: #667085;
    --line: #e4e9f1;
    --soft: #f5f8fc;
    --dark: #111a2b;
    --white: #fff;
    --radius: 20px;
    --shadow: 0 25px 70px rgba(15, 35, 70, 0.13);
}

/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.6;
}

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

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(228, 233, 241, 0.85);
}

.nav {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    display: block;
    width: 250px;
    max-height: 52px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 27px;
    font-size: 14px;
    font-weight: 700;
    color: #3c4657;
}

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

.nav-button {
    background: var(--blue);
    color: white !important;
    padding: 10px 18px;
    border-radius: 10px;
}

.burger {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
}

.burger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--ink);
    margin: 5px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 100px;
    background: linear-gradient(120deg, #f7fbff, #fff 54%, #edf5ff);
}

.hero-pattern {
    position: absolute;
    width: 600px;
    height: 600px;
    border: 1px solid #dce9fb;
    border-radius: 50%;
    right: -220px;
    top: -230px;
    box-shadow:
        0 0 0 70px rgba(30, 111, 230, 0.025),
        0 0 0 140px rgba(30, 111, 230, 0.02);
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 65px;
    align-items: center;
}

.kicker {
    display: inline-block;
    color: var(--blue);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.rotating-copy {
    position: relative;
    height: 185px;
    max-width: 760px;
    margin-top: 18px;
}

.rotating-text {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(15px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
    font-size: clamp(29px, 3vw, 43px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.rotating-text.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
    margin: 12px 0 0;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 21px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

.primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 12px 28px rgba(30, 111, 230, 0.24);
}

.secondary {
    background: white;
    border: 1px solid #ccd6e4;
}

.hero-visual {
    position: relative;
}

.mock-window {
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: rotate(1deg);
}

.window-top {
    height: 48px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 17px;
    color: #8792a4;
    font-size: 11px;
    font-weight: 800;
}

.window-top i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d2d9e4;
}

.window-top span {
    margin-left: auto;
}

.mock-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 360px;
}

.mock-sidebar {
    padding: 25px 17px;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    gap: 17px;
    font-size: 11px;
    color: #7a8597;
}

.mock-sidebar b {
    font-size: 15px;
    color: var(--blue);
    margin-bottom: 10px;
}

.mock-main {
    padding: 30px;
}

.mock-heading small,
.stat-row small {
    display: block;
    color: #8a95a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.mock-heading strong {
    display: block;
    font-size: 21px;
    margin-top: 5px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 28px 0;
}

.stat-row > div {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.stat-row b {
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.timeline {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #dfe5ee;
}

.timeline span {
    position: relative;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--blue);
    border: 3px solid white;
    box-shadow: 0 0 0 1px #dbe4f1;
}

.placeholder {
    height: 60px;
    background: linear-gradient(
        90deg,
        #edf2f7 65%,
        transparent 65%
    );
    border-radius: 8px;
    margin-top: 22px;
}

.placeholder.short {
    width: 70%;
    margin-top: 10px;
}

.float-card {
    position: absolute;
    right: -18px;
    bottom: 25px;
    background: white;
    padding: 13px 17px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 12px;
    font-weight: 800;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f1728;
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: var(--shadow);
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    padding: 46px 0;
}

.section-title {
    max-width: 780px;
    margin: 0 auto 24px;
    text-align: center;
}

.section-title h2 {
    font-size: clamp(31px, 3.6vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 8px 0 10px;
}

.section-title p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 18px;
}

.section > .container > .section-title {
    max-width: 850px;
}

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

.light {
    color: #8dbbff;
}

.dark .section-title h2 {
    color: white;
}

.intro {
    text-align: center;
    padding-top: 64px;
    padding-bottom: 64px;
}

.intro-grid {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.intro h2 {
    margin-left: auto;
    margin-right: auto;
}

.intro .lead {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.intro p {
    color: var(--muted);
}

.intro p:not(.lead) {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.lead {
    font-size: 20px;
    color: #364154;
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */

.quote-slider {
    position: relative;
    min-height: 265px;
}

.quote {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quote.show {
    opacity: 1;
    transform: translateY(0);
}

.quote p {
    max-width: 930px;
    font-size: 22px;
    line-height: 1.55;
    color: #e4e9f2;
    margin: 0 0 28px;
}

.quote strong {
    font-size: 15px;
}

.quote small {
    color: #9da9bb;
    margin-top: 4px;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #65738a;
    transition: 0.2s;
}

.dot.active {
    background: #79adff;
    width: 22px;
    border-radius: 5px;
}

/* =========================================================
   FEATURES
   ========================================================= */

.features {
    background: var(--soft);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-grid article {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 360px;
    transition: 0.2s;
}

.feature-grid article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-number {
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 35px;
}

.feature-grid h3 {
    font-size: 20px;
    line-height: 1.25;
    margin: 0 0 12px;
}

.feature-grid p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.feature-image {
    height: 120px;
    margin-top: 16px;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image img {
    width: 70%;
    height: 100%;
    display: block;
    object-fit: contain;
    transform: none;
}

/* =========================================================
   INTEGRATIONS
   ========================================================= */

.integrations {
    background: white;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.integration-grid div {
    padding: 28px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-weight: 800;
    font-size: 17px;
}

.integration-grid div:nth-child(3n) {
    border-right: 0;
}

.integration-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.integration-cards article {
    padding: 24px;
    min-height: 185px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: 0.2s;
}

.integration-cards article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.integration-cards span {
    display: block;
    margin-bottom: 28px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.integration-cards h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.integration-cards p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* =========================================================
   DOCUMENTATION
   ========================================================= */

.documentation {
    background: #eaf3ff;
}

.doc-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 70px;
    align-items: center;
}

.doc-inner h2 {
    font-size: clamp(31px, 3.6vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 8px 0 10px;
}

.doc-inner p {
    max-width: 650px;
    color: var(--muted);
}

.btn.light {
    background: var(--blue);
    color: white;
    white-space: nowrap;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact {
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 100px;
    align-items: center;
}

.contact h2 {
    font-size: clamp(31px, 3.6vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 8px 0 10px;
}

.contact p {
    color: var(--muted);
    font-size: 18px;
}

.contact-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-card span {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.1em;
    font-weight: 800;
}

.contact-card a {
    color: var(--blue);
    font-weight: 800;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
    border-top: 1px solid var(--line);
    padding: 30px 0;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #7b8595;
    font-size: 12px;
}

.footer img {
    width: 150px;
    max-height: 40px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 76px;
        left: 15px;
        right: 15px;
        background: white;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 12px;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px;
    }

    .burger {
        display: block;
    }

    .section {
        padding: 40px 0;
    }

    .intro {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .hero {
        padding: 70px 0 80px;
    }

    .hero-grid,
    .intro-grid,
    .doc-inner,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .intro-grid {
        gap: 28px;
    }

    .rotating-copy {
        height: 190px;
    }

    .rotating-text {
        font-size: clamp(30px, 6vw, 44px);
    }

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

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

    .integration-grid div:nth-child(3n) {
        border-right: 1px solid var(--line);
    }

    .integration-grid div:nth-child(2n) {
        border-right: 0;
    }

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

    .quote p {
        font-size: 19px;
    }

    .section-title {
        margin-bottom: 20px;
    }
}

@media (max-width: 560px) {
    .container {
        width: calc(100% - 28px);
    }

    .logo img {
        width: 155px;
    }

    .hero-grid {
        gap: 35px;
    }

    .rotating-copy {
        height: 205px;
    }

    .rotating-text {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mock-content {
        grid-template-columns: 1fr;
    }

    .video-frame {
        transform: none;
    }

    .mock-sidebar {
        display: none;
    }

    .feature-grid,
    .integration-grid,
    .integration-cards {
        grid-template-columns: 1fr;
    }

    .integration-grid div,
    .integration-grid div:nth-child(2n),
    .integration-grid div:nth-child(3n) {
        border-right: 0;
    }

    .quote-slider {
        min-height: 190px;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .integration-cards {
        margin-top: 16px;
    }
}
