/* MassgePlus marketing & auth — sea-teal messaging identity */

:root {
    --mp-ink: #0b4f6c;
    --mp-sea: #0f766e;
    --mp-sea-deep: #0d6e6e;
    --mp-mint: #5eead4;
    --mp-sand: #f0fdfa;
    --mp-glow: rgb(15 118 110 / 0.35);
    --mp-ink-soft: #134e6f;
    --mp-text-on-dark: #ecfeff;
    --mp-muted-on-dark: #a7f3d0;
    --mp-display: "IBM Plex Sans Arabic", Cairo, sans-serif;
    --mp-body: Cairo, sans-serif;
    --mp-header-height: 4.25rem;
    --mp-section-gap: clamp(3rem, 8vw, 6rem);
    --mp-radius: 1rem;
    --mp-radius-sm: 0.65rem;
    --mp-shadow: 0 12px 40px rgb(11 79 108 / 0.08);
    --mp-shadow-lg: 0 24px 64px rgb(11 79 108 / 0.14);
}

/* ── Marketing shell ── */

.marketing-shell {
    min-block-size: 100vh;
    background: var(--mp-sand);
    color: var(--mp-ink);
    font-family: var(--mp-body);
}

.marketing-main {
    overflow-x: clip;
}

/* ── Site header ── */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: rgb(240 253 250 / 0.88);
    backdrop-filter: blur(12px);
    border-block-end: 1px solid rgb(15 118 110 / 0.12);
}

.site-header-inner {
    max-inline-size: 76rem;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    min-block-size: var(--mp-header-height);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-brand {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--mp-ink);
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    justify-content: center;
}

.site-nav a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mp-ink-soft);
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--mp-sea);
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

/* ── Buttons ── */

.marketing-shell .btn-primary,
.marketing-shell .btn-secondary,
.marketing-shell .btn-ghost,
.auth-shell .btn-primary,
.auth-shell .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    border-radius: var(--mp-radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.marketing-shell .btn-primary,
.auth-shell .btn-primary,
.auth-shell .primary-button {
    background: linear-gradient(135deg, var(--mp-sea) 0%, var(--mp-ink) 100%);
    color: #fff;
    box-shadow: 0 4px 16px var(--mp-glow);
}

.marketing-shell .btn-primary:hover,
.auth-shell .primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--mp-glow);
}

.marketing-cta {
    animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 4px 16px var(--mp-glow); }
    50% { box-shadow: 0 6px 28px rgb(15 118 110 / 0.5); }
}

.marketing-shell .btn-secondary {
    background: #fff;
    color: var(--mp-ink);
    border: 1px solid rgb(15 118 110 / 0.25);
}

.marketing-shell .btn-secondary:hover {
    border-color: var(--mp-sea);
    color: var(--mp-sea);
}

.marketing-shell .btn-ghost {
    background: transparent;
    color: var(--mp-ink-soft);
    padding-inline: 0.75rem;
}

.marketing-shell .btn-ghost:hover {
    color: var(--mp-sea);
}

/* ── Hero ── */

.hero {
    position: relative;
    min-block-size: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgb(94 234 212 / 0.18) 0%, transparent 60%),
        linear-gradient(165deg, var(--mp-ink) 0%, var(--mp-sea-deep) 45%, #115e59 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset-block-end: -1px;
    inset-inline: 0;
    block-size: 6rem;
    background: linear-gradient(to bottom, transparent, var(--mp-sand));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-inline-size: 44rem;
    text-align: center;
    color: var(--mp-text-on-dark);
}

.hero-brand {
    font-family: var(--mp-display);
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mp-mint);
    margin-block: 0 1rem;
}

.hero-title {
    font-family: var(--mp-display);
    font-size: clamp(2rem, 5.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.hero-lead {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.65;
    color: var(--mp-muted-on-dark);
    margin: 0 0 2rem;
    max-inline-size: 36rem;
    margin-inline: auto;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    align-items: center;
}

.hero-trial-link {
    color: var(--mp-mint) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Sections ── */

.section {
    max-inline-size: 76rem;
    margin-inline: auto;
    padding: var(--mp-section-gap) clamp(1rem, 4vw, 2rem);
}

.section-muted {
    background: rgb(15 118 110 / 0.04);
    max-inline-size: none;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.section-muted > .section-title,
.section-muted > .steps {
    max-inline-size: 76rem;
    margin-inline: auto;
}

.section-title {
    font-family: var(--mp-display);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--mp-ink);
    text-align: center;
    margin: 0 0 0.75rem;
}

.section-lead {
    text-align: center;
    color: var(--mp-ink-soft);
    font-size: 1.05rem;
    line-height: 1.6;
    max-inline-size: 40rem;
    margin: 0 auto 2.5rem;
}

.section-final {
    text-align: center;
    padding-block-end: calc(var(--mp-section-gap) + 2rem);
}

.section-final-cta {
    margin-block-start: 1.5rem;
}

/* ── Use cases ── */

.use-cases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin-block-start: 2rem;
}

.use-case h3 {
    font-family: var(--mp-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mp-ink);
    margin: 0 0 0.5rem;
}

.use-case p {
    margin: 0;
    color: var(--mp-ink-soft);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── Steps ── */

.steps {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}

.step {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: var(--mp-radius);
    border: 1px solid rgb(15 118 110 / 0.1);
    box-shadow: var(--mp-shadow);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mp-sea), var(--mp-ink));
    color: #fff;
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.step h3 {
    font-family: var(--mp-display);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--mp-ink);
}

.step p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--mp-ink-soft);
    line-height: 1.55;
}

/* ── Pricing ── */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    align-items: stretch;
    margin-block-start: 1rem;
}

.pricing-tier {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem 1.5rem;
    background: #fff;
    border: 1px solid rgb(15 118 110 / 0.12);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-tier:hover {
    transform: translateY(-4px);
    box-shadow: var(--mp-shadow-lg);
}

.pricing-tier.featured {
    border-color: var(--mp-sea);
    box-shadow: 0 0 0 1px var(--mp-sea), 0 16px 48px var(--mp-glow);
    transform: scale(1.03);
}

.pricing-tier.featured:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 0 0 2px var(--mp-mint), 0 20px 56px var(--mp-glow);
}

.pricing-badge {
    position: absolute;
    inset-block-start: -0.65rem;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--mp-sea), var(--mp-ink));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 99rem;
    white-space: nowrap;
}

[dir="rtl"] .pricing-badge {
    transform: translateX(50%);
}

.pricing-tier h3 {
    font-family: var(--mp-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.5rem 0 0;
    color: var(--mp-ink);
}

.pricing-desc {
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    color: var(--mp-ink-soft);
    line-height: 1.55;
}

.pricing-price {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.pricing-price strong {
    font-family: var(--mp-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--mp-sea);
}

.pricing-price span {
    font-size: 0.9rem;
    color: var(--mp-ink-soft);
}

.pricing-trial {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mp-sea);
}

.pricing-tier .btn-primary {
    margin-block-start: auto;
    inline-size: 100%;
}

/* ── Animations ── */

.fade-up {
    animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section:nth-of-type(2) { animation-delay: 0.05s; }
.section:nth-of-type(3) { animation-delay: 0.1s; }
.section:nth-of-type(4) { animation-delay: 0.15s; }
.section:nth-of-type(5) { animation-delay: 0.2s; }

/* ── Auth shell ── */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) 1fr;
    min-block-size: 100vh;
    background: var(--mp-sand);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(165deg, var(--mp-ink) 0%, var(--mp-sea-deep) 100%);
    color: var(--mp-text-on-dark);
}

.auth-panel-brand {
    font-family: var(--mp-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mp-mint);
}

.auth-panel-title {
    font-family: var(--mp-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.auth-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.auth-benefits li {
    position: relative;
    padding-inline-start: 1.5rem;
    line-height: 1.55;
    color: var(--mp-muted-on-dark);
    font-size: 0.95rem;
}

.auth-benefits li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--mp-mint);
    font-weight: 700;
}

.auth-back-link {
    margin-block-start: auto;
    font-size: 0.9rem;
    color: var(--mp-mint);
    opacity: 0.9;
}

.auth-back-link:hover {
    opacity: 1;
}

.auth-main {
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-main-header {
    display: flex;
    justify-content: flex-end;
    margin-block-end: 1rem;
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 2rem;
}

.auth-form-card {
    inline-size: min(100%, 28rem);
    background: #fff;
    border: 1px solid rgb(15 118 110 / 0.12);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow-lg);
    padding: clamp(1.5rem, 4vw, 2rem);
    display: grid;
    gap: 1.25rem;
}

.auth-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.auth-form-header h1 {
    font-family: var(--mp-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--mp-ink);
}

.auth-inline-link {
    font-size: 0.85rem;
    color: var(--mp-sea);
    white-space: nowrap;
}

.auth-form-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--mp-ink-soft);
    padding-block-start: 0.5rem;
    border-block-start: 1px solid rgb(15 118 110 / 0.1);
}

.auth-form-footer a {
    color: var(--mp-sea);
    font-weight: 600;
}

.auth-shell form {
    display: grid;
    gap: 1rem;
}

.auth-shell label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mp-ink);
}

.auth-shell input,
.auth-shell select {
    border: 1px solid rgb(15 118 110 / 0.2);
    border-radius: var(--mp-radius-sm);
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: var(--mp-ink);
}

.auth-shell input:focus,
.auth-shell select:focus {
    outline: 2px solid rgb(15 118 110 / 0.35);
    outline-offset: 1px;
}

.auth-shell .primary-button {
    inline-size: 100%;
    margin-block-start: 0.25rem;
}

.auth-shell .form-error {
    color: #c23b48;
    margin: 0;
    font-size: 0.9rem;
}

.auth-shell .culture-selector select {
    padding: 0.4rem 0.5rem;
    border: 1px solid rgb(15 118 110 / 0.2);
    border-radius: var(--mp-radius-sm);
    background: #fff;
}

/* ── Responsive ── */

@media (max-width: 960px) {
    .site-nav {
        display: none;
    }

    .use-cases {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-tier.featured {
        transform: none;
    }

    .pricing-tier.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        flex-wrap: wrap;
        padding-block: 0.75rem;
        min-block-size: auto;
        gap: 0.75rem;
    }

    .site-brand {
        flex: 1;
    }

    .site-actions {
        inline-size: 100%;
        justify-content: flex-end;
    }

    .hero {
        min-block-size: 75vh;
    }

    .hero-cta {
        flex-direction: column;
        inline-size: 100%;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        inline-size: 100%;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        padding: 1.5rem;
        gap: 1rem;
    }

    .auth-back-link {
        margin-block-start: 0;
    }

    .auth-benefits {
        display: none;
    }

    .auth-panel-title {
        font-size: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-up,
    .marketing-cta {
        animation: none;
    }

    .pricing-tier,
    .pricing-tier.featured,
    .marketing-shell .btn-primary {
        transition: none;
    }
}
