/* ============================================
   HASSANI WEBSITE — W1-Inspired Design
   ============================================ */

/* ── 1. Design Tokens ── */
:root {
    --primary: #3A4D5E;
    --primary-dark: #2B3A47;
    --primary-darker: #1E2A33;
    --primary-light: rgba(58, 77, 94, 0.08);
    --secondary: #C3C2C0;
    --bg: #F0EFED;
    --bg-white: #FFFFFF;
    --text: #3A4D5E;
    --text-muted: #7A8A94;
    --text-light: #FFFFFF;
    --border: #D4D3D1;

    --radius: 1.6rem;
    --radius-sm: 0.8rem;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --header-height: 80px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;

    --section-py: 6.4rem;
    --section-py-lg: 8rem;
}

/* ── 2. Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    color: var(--text);
    font-weight: 700;
}

/* ── 3. Container ── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── 4. Header (Glassmorphism) ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.header--scrolled {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header__logo img {
    height: 32px;
    width: auto;
}

.header__logo-dark {
    display: none;
}

.header--scrolled .header__logo-light {
    display: none;
}

.header--scrolled .header__logo-dark {
    display: block;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header__link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.header__link:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.12);
}

.header--scrolled .header__link {
    color: var(--text-muted);
}

.header--scrolled .header__link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.header__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.header__cta:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-light);
}

.header__cta svg {
    flex-shrink: 0;
}

.header--scrolled .header__cta {
    color: var(--text-light);
    background: var(--primary);
    border-color: var(--primary);
}

.header--scrolled .header__cta:hover {
    background: var(--primary-dark);
    color: var(--text-light);
}

.header__system {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.4rem 0.8rem;
    transition: color 0.3s ease;
    margin-left: 0.25rem;
}

.header__system:hover {
    color: rgba(255, 255, 255, 0.85);
}

.header--scrolled .header__system {
    color: var(--text-muted);
}

.header--scrolled .header__system:hover {
    color: var(--primary);
}

/* Hamburger */
.header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.header__toggle span {
    display: block;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header--scrolled .header__toggle span {
    background: var(--primary);
}

/* ── 5. Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 42, 51, 0.92) 0%,
        rgba(58, 77, 94, 0.85) 50%,
        rgba(43, 58, 71, 0.9) 100%
    );
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 780px;
}

.hero h1 {
    color: var(--text-light);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn--hero {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--primary-dark);
    background: var(--text-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn--hero:hover {
    background: var(--bg);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn--hero svg {
    flex-shrink: 0;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* ── 6. Sections ── */
.section {
    padding: var(--section-py) 0;
}

.section--alt {
    background: var(--bg);
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.section__header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.section__header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 540px;
    margin: 0 auto;
}

.section__cta {
    text-align: center;
    margin-top: 3.5rem;
}

.section__cta p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* ── 7. Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--primary);
    color: var(--text-light);
}

.btn--primary:hover {
    background: var(--primary-dark);
    color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(58, 77, 94, 0.3);
}

/* ── 8. Solution Cards ── */
.solutions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .solutions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.solution-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.solution-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(58, 77, 94, 0.1);
}

.solution-card__icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.solution-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.solution-card > p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.solution-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.solution-card__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.solution-card__list li svg {
    flex-shrink: 0;
    color: var(--primary);
}

/* ── 9. Steps / Methodology ── */
.steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.step {
    text-align: center;
    padding: 1.5rem;
    max-width: 260px;
}

.step__number {
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 14px rgba(58, 77, 94, 0.25);
}

.step h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.step__connector {
    width: 2px;
    height: 32px;
    background: var(--border);
}

@media (min-width: 768px) {
    .steps {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .step__connector {
        width: 48px;
        height: 2px;
        margin-top: 26px;
        flex-shrink: 0;
    }
}

/* ── 10. FAQ Accordion ── */
.faq {
    max-width: 720px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid var(--border);
}

.faq__item:first-child {
    border-top: 1px solid var(--border);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.4rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
    transition: color 0.3s ease;
}

.faq__question:hover {
    color: var(--primary-dark);
}

.faq__question svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq__item--open .faq__question svg {
    transform: rotate(180deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq__item--open .faq__answer {
    max-height: 300px;
}

.faq__answer p {
    padding-bottom: 1.4rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ── 11. CTA Section ── */
.cta {
    background: var(--primary);
    padding: var(--section-py-lg) 0;
    text-align: center;
}

.cta h2 {
    color: var(--text-light);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.btn--cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--primary);
    background: var(--text-light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn--cta:hover {
    background: var(--bg);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn--cta svg {
    flex-shrink: 0;
}

/* ── 12. Footer ── */
.footer {
    background: var(--primary-darker);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer__inner {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer__logo {
    height: 30px;
    margin-bottom: 1rem;
}

.footer__brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 300px;
    color: rgba(255, 255, 255, 0.5);
}

.footer__nav h4,
.footer__contact h4 {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer__nav a,
.footer__contact a,
.footer__contact span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.footer__contact span {
    cursor: default;
}

.footer__nav a:hover,
.footer__contact a:hover {
    color: var(--text-light);
}

.footer__contact svg {
    display: inline;
    flex-shrink: 0;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── 13. WhatsApp Float ── */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* ── 14. Scroll Animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 15. Mobile Responsive ── */
@media (max-width: 767px) {
    :root {
        --header-height: 68px;
        --section-py: 4rem;
        --section-py-lg: 5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section__header h2 {
        font-size: 1.8rem;
    }

    .cta h2 {
        font-size: 1.6rem;
    }

    /* Header mobile nav */
    .header__toggle {
        display: flex;
        z-index: 1001;
    }

    .header__nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(30, 42, 51, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        z-index: 1000;
    }

    .header__nav--open {
        display: flex;
    }

    .header__nav--open .header__link {
        color: rgba(255, 255, 255, 0.85);
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
    }

    .header__nav--open .header__link:hover {
        color: var(--text-light);
        background: rgba(255, 255, 255, 0.1);
    }

    .header__nav--open .header__cta {
        margin-left: 0;
        margin-top: 1rem;
        font-size: 1rem;
        padding: 0.8rem 2rem;
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        color: var(--text-light);
    }

    .header__nav--open .header__system {
        margin-left: 0;
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.9rem;
    }

    /* Hamburger animation */
    .header__toggle--active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .header__toggle--active span:nth-child(2) {
        opacity: 0;
    }

    .header__toggle--active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .solution-card {
        padding: 2rem;
    }

    .step {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .section__header h2 {
        font-size: 2.2rem;
    }
}
