/* ==========================================================================
   Home page sections (hero, why us, services, numbers, partners, technologies, FAQ)
   resources/views/website/homepage/includes/*
   Works, feedback and company profile sections have their own stylesheets.
   Every class is prefixed with "hm" so nothing leaks into other pages.
   ========================================================================== */

:root {
    --hm-primary: #421f61;
    --hm-violet: #6b3a93;
    --hm-deep: #381a52;
    --hm-deeper: #24103a;
    --hm-accent: #dea8e4;
    --hm-soft: #f7f2fa;
    --hm-line: rgba(66, 31, 97, 0.1);
    --hm-muted: rgba(66, 31, 97, 0.75);
    --hm-shadow: 0 10px 30px rgba(66, 31, 97, 0.08);
    --hm-shadow-hover: 0 20px 44px rgba(66, 31, 97, 0.16);
}

/* ---------- shared ---------- */

.hm-section {
    position: relative;
    padding-block: clamp(64px, 8vw, 112px);
    scroll-margin-top: 90px;
}

.hm-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.hm-head--center {
    align-items: center;
    text-align: center;
}

.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hm-soft);
    color: var(--hm-violet);
    font-size: 13px;
    font-weight: 700;
}

.hm-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.hm-head--center .hm-eyebrow {
    align-self: center;
}

.hm-eyebrow--light {
    background: rgba(255, 255, 255, 0.12);
    color: var(--hm-accent);
}

.hm-title {
    color: var(--hm-primary);
    font-weight: 800;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.4;
    margin: 0;
    max-width: 860px;
}

.hm-title--light {
    color: #fff;
}

.hm-lead {
    color: var(--hm-muted);
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.9;
    margin: 0;
    max-width: 760px;
}

.hm-lead--light {
    color: rgba(255, 255, 255, 0.8);
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 210px;
    padding: 15px 26px;
    border-radius: 14px;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hm-btn i {
    font-size: 18px;
}

.hm-btn:hover {
    transform: translateY(-2px);
}

.hm-btn--light {
    background: #fff;
    color: var(--hm-primary) !important;
    border-color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hm-btn--light:hover {
    background: var(--hm-accent);
    border-color: var(--hm-accent);
}

.hm-btn--ghost {
    background: transparent;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.45);
}

.hm-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.hm-btn--primary {
    background: var(--hm-primary);
    color: #fff !important;
    border-color: var(--hm-primary);
    box-shadow: 0 12px 26px rgba(66, 31, 97, 0.28);
}

.hm-btn--primary:hover {
    background: var(--hm-deeper);
}

.hm-center {
    display: flex;
    justify-content: center;
    margin-top: clamp(32px, 4vw, 48px);
}

html[dir="ltr"] .hm-flip {
    transform: scaleX(-1);
}

.hm-section a:focus-visible,
.hm-section button:focus-visible,
.hm-hero a:focus-visible,
.hm-hero button:focus-visible {
    outline: 3px solid var(--hm-accent);
    outline-offset: 3px;
}

/* ---------- 1. hero ---------- */

.hm-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 24px;
    padding-top: clamp(16px, 3vw, 32px);
    padding-bottom: clamp(48px, 6vw, 72px);
}

.hm-hero__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    order: 2;
}

.hm-hero__title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.35;
    background: linear-gradient(90deg, #fff 0%, var(--hm-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
}

.hm-hero__rotator {
    margin: 0;
    min-height: 1.4em;
    color: #fff;
    font-weight: 800;
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.4;
}

.hm-hero__rotator span {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hm-hero__rotator.is-changing span {
    opacity: 0;
    transform: translateY(12px);
}

.hm-hero__desc {
    margin: 0;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.9;
}

.hm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
}

.hm-hero__dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.hm-hero__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.hm-hero__dot.is-active {
    width: 30px;
    background: var(--hm-accent);
}

.hm-hero__media {
    position: relative;
    order: 1;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    aspect-ratio: 1 / 0.85;
    display: grid;
    place-items: center;
}

.hm-hero__glow {
    position: absolute;
    inset: 12% 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222, 168, 228, 0.5), transparent 68%);
    filter: blur(30px);
}

.hm-hero__ring {
    position: absolute;
    inset: 6% 12%;
    border-radius: 50%;
    border: 1px dashed rgba(222, 168, 228, 0.35);
    animation: hm-spin 40s linear infinite;
}

@keyframes hm-spin {
    to { transform: rotate(360deg); }
}

.hm-hero__img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 30px 40px rgba(10, 3, 20, 0.45));
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hm-hero__img.is-changing {
    opacity: 0;
    transform: scale(0.96);
}

.hm-hero__scroll {
    display: none;
}

@media (min-width: 1200px) {
    .hm-hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 48px;
        min-height: calc(100svh - 96px);
        padding-bottom: 96px;
    }

    .hm-hero__text {
        order: 0;
        align-items: flex-start;
        text-align: start;
    }

    .hm-hero__actions {
        justify-content: flex-start;
    }

    .hm-hero__media {
        order: 0;
        max-width: none;
    }

    .hm-hero__scroll {
        position: absolute;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        color: rgba(255, 255, 255, 0.75) !important;
        font-size: 13px;
        text-decoration: none;
    }

    .hm-hero__mouse {
        width: 24px;
        height: 38px;
        border: 2px solid rgba(255, 255, 255, 0.6);
        border-radius: 14px;
        position: relative;
    }

    .hm-hero__mouse::after {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 4px;
        height: 8px;
        margin-left: -2px;
        border-radius: 2px;
        background: #fff;
        animation: hm-wheel 1.8s ease-in-out infinite;
    }

    @keyframes hm-wheel {
        0% { opacity: 1; transform: translateY(0); }
        100% { opacity: 0; transform: translateY(12px); }
    }
}

@media (max-width: 480px) {
    .hm-hero__actions,
    .hm-hero__actions .hm-btn {
        width: 100%;
    }
}

/* ---------- 2. why choose us ---------- */

.hm-why {
    background: #fff;
}

.hm-why__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.hm-why__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 30px 26px;
    border-radius: 24px;
    background: var(--hm-soft);
    border: 1px solid transparent;
    text-align: start;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hm-why__card:hover {
    transform: translateY(-5px);
    background: #fff;
    border-color: rgba(107, 58, 147, 0.2);
    box-shadow: var(--hm-shadow-hover);
}

.hm-why__num {
    position: absolute;
    top: 18px;
    inset-inline-end: 22px;
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(66, 31, 97, 0.15);
}

.hm-why__icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--hm-primary), var(--hm-violet));
    box-shadow: 0 12px 24px rgba(66, 31, 97, 0.25);
}

.hm-why__icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.hm-why__title {
    margin: 0;
    color: var(--hm-primary);
    font-weight: 800;
    font-size: clamp(19px, 1.7vw, 23px);
    line-height: 1.5;
}

.hm-why__text,
.hm-why__text * {
    color: var(--hm-muted) !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
    background: none !important;
    margin: 0 !important;
    text-align: start !important;
}

@media (min-width: 640px) {
    .hm-why__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .hm-why__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ---------- 3. services ---------- */

.hm-services {
    background: linear-gradient(180deg, var(--hm-soft) 0%, #fff 100%);
}

.hm-services__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.hm-services__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.hm-services__intro .hm-eyebrow {
    align-self: center;
    background: #fff;
}

.hm-services__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hm-primary) !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.hm-services__all:hover {
    color: var(--hm-violet) !important;
}

.hm-services__all i {
    font-size: 13px;
}

.hm-services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.hm-service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--hm-line);
    box-shadow: var(--hm-shadow);
    text-decoration: none;
    text-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.hm-service:hover {
    transform: translateY(-5px);
    background: var(--hm-primary);
    border-color: var(--hm-primary);
    box-shadow: 0 22px 44px rgba(66, 31, 97, 0.3);
}

.hm-service__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hm-service__icon {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--hm-soft);
    transition: background-color 0.3s ease;
}

.hm-service__icon img {
    position: absolute;
    width: 38px;
    height: 38px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.hm-service__icon img + img {
    opacity: 0;
}

.hm-service:hover .hm-service__icon {
    background: rgba(255, 255, 255, 0.12);
}

.hm-service:hover .hm-service__icon img:first-child {
    opacity: 0;
}

.hm-service:hover .hm-service__icon img + img {
    opacity: 1;
}

.hm-service__arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--hm-soft);
    color: var(--hm-primary);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.hm-service:hover .hm-service__arrow {
    background: #fff;
    color: var(--hm-primary);
}

.hm-service__title {
    margin: 0;
    color: var(--hm-primary);
    font-weight: 800;
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.5;
    transition: color 0.3s ease;
}

.hm-service__text {
    margin: 0;
    color: var(--hm-muted);
    font-size: 14.5px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.hm-service:hover .hm-service__title {
    color: #fff;
}

.hm-service:hover .hm-service__text {
    color: rgba(255, 255, 255, 0.82);
}

@media (min-width: 640px) {
    .hm-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* odd number of services: the last card spans the full row instead of sitting alone */
    .hm-service:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .hm-services__layout {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr);
        gap: 56px;
        align-items: start;
    }

    .hm-services__intro {
        position: sticky;
        top: 130px;
        align-items: flex-start;
        text-align: start;
    }

    .hm-services__intro .hm-eyebrow {
        align-self: flex-start;
    }
}

/* ---------- 5. numbers ---------- */

.hm-numbers {
    background: #fff;
}

.hm-numbers__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.hm-numbers__sub {
    margin: 0;
    color: var(--hm-violet);
    font-weight: 700;
    font-size: clamp(17px, 1.8vw, 22px);
}

.hm-numbers__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.hm-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 20px;
    border-radius: 24px;
    text-align: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(222, 168, 228, 0.3), transparent 55%),
        linear-gradient(135deg, var(--hm-primary), var(--hm-deeper));
    color: #fff;
    box-shadow: 0 20px 40px rgba(36, 16, 58, 0.22);
    overflow: hidden;
}

.hm-stat__value {
    font-size: clamp(40px, 4.5vw, 58px);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    direction: ltr;
}

.hm-stat__value span {
    color: var(--hm-accent);
}

.hm-stat__label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

@media (min-width: 640px) {
    .hm-numbers__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- 8. technologies ---------- */

.hm-tech {
    background:
        radial-gradient(circle at 90% 0%, rgba(222, 168, 228, 0.18), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(107, 58, 147, 0.35), transparent 45%),
        var(--hm-deeper);
}

.hm-tech__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hm-tech__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.hm-tech__item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(222, 168, 228, 0.45);
}

.hm-tech__icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #0d0716;
}

.hm-tech__icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.hm-tech__name {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .hm-tech__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .hm-tech__icon {
        width: 64px;
        height: 64px;
    }

    .hm-tech__name {
        font-size: 18px;
    }
}

@media (min-width: 1024px) {
    .hm-tech__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ---------- 9. FAQ ---------- */

.hm-faq {
    background: #fff;
}

.hm-faq__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.hm-faq__intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hm-faq__intro .hm-head {
    margin-bottom: 0;
    align-items: center;
    text-align: center;
}

.hm-faq__intro .hm-eyebrow {
    align-self: center;
}

.hm-idea {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(222, 168, 228, 0.35), transparent 55%),
        linear-gradient(135deg, var(--hm-primary), var(--hm-deeper));
    color: #fff;
    text-align: start;
}

.hm-idea__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 22px;
    color: #ffd166;
}

.hm-idea__title {
    margin: 0;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
}

.hm-idea__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.8;
}

.hm-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hm-faq__item {
    background: var(--hm-soft);
    border: 1px solid transparent;
    border-radius: 18px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hm-faq__item[open] {
    background: #fff;
    border-color: rgba(107, 58, 147, 0.25);
    box-shadow: var(--hm-shadow);
}

.hm-faq__item summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.hm-faq__item summary::-webkit-details-marker {
    display: none;
}

.hm-faq__num {
    flex-shrink: 0;
    padding: 6px 9px;
    border-radius: 10px;
    background: #fff;
    color: var(--hm-violet);
    font-size: 14px;
    font-weight: 800;
}

.hm-faq__item[open] .hm-faq__num {
    background: var(--hm-soft);
}

.hm-faq__q {
    flex: 1;
    color: var(--hm-primary);
    font-weight: 700;
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.6;
}

.hm-faq__toggle {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    transition: background-color 0.3s ease;
}

.hm-faq__toggle::before,
.hm-faq__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--hm-primary);
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hm-faq__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.hm-faq__item[open] .hm-faq__toggle {
    background: var(--hm-primary);
}

.hm-faq__item[open] .hm-faq__toggle::before,
.hm-faq__item[open] .hm-faq__toggle::after {
    background: #fff;
}

.hm-faq__item[open] .hm-faq__toggle::after {
    transform: translate(-50%, -50%) rotate(0);
}

.hm-faq__a {
    padding: 0 20px 20px;
    padding-inline-start: 66px;
    color: var(--hm-muted);
    font-size: 15px;
    line-height: 1.9;
}

@media (max-width: 480px) {
    .hm-faq__a {
        padding-inline-start: 20px;
    }

    .hm-btn {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .hm-faq__layout {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
        gap: 56px;
        align-items: start;
    }

    .hm-faq__intro {
        position: sticky;
        top: 130px;
    }

    .hm-faq__intro .hm-head {
        align-items: flex-start;
        text-align: start;
    }

    .hm-faq__intro .hm-eyebrow {
        align-self: flex-start;
    }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    .hm-hero__ring, .hm-hero__mouse::after {
        animation: none !important;
    }

    .hm-why__card, .hm-service, .hm-tech__item, .hm-btn, .hm-hero__img, .hm-hero__rotator span {
        transition: none !important;
    }
}
