*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f0f4fa;
    --color-surface: #ffffff;
    --color-border: rgba(13, 43, 91, 0.1);
    --color-text: #0d2b5b;
    --color-text-muted: #5a6b82;
    --color-green: #009b4d;
    --color-green-dark: #006d41;
    --color-green-soft: rgba(0, 155, 77, 0.1);
    --color-green-glow: rgba(0, 155, 77, 0.14);
    --color-blue: #0d2b5b;
    --color-blue-light: #1a4480;
    --color-blue-soft: rgba(13, 43, 91, 0.08);
    --color-blue-glow: rgba(13, 43, 91, 0.12);
    --gradient-brand: linear-gradient(135deg, var(--color-green) 0%, var(--color-blue) 100%);
    --shadow-sm: 0 1px 3px rgba(13, 43, 91, 0.06);
    --shadow-md: 0 12px 32px rgba(13, 43, 91, 0.1);
    --shadow-lg: 0 24px 48px rgba(13, 43, 91, 0.12);
    --font-family: 'YekanBakh', system-ui, sans-serif;
    --radius: 16px;
    --radius-lg: 24px;
    --max-width: 1080px;
    --page-padding-x: clamp(1rem, 4vw, 1.5rem);
    --page-padding-y: clamp(2rem, 5vw, 3rem);
    --brand-text-height: clamp(64px, 18vw, 88px);
    --hero-logo-size: clamp(180px, 42vw, 260px);
    --hero-gap: clamp(1.5rem, 5vw, 3rem);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.preloader-active {
    overflow: hidden;
}

body.preloader-active .page {
    opacity: 0;
}

body:not(.preloader-active) .page {
    animation: fadeUp 0.6s ease both;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1.25rem, env(safe-area-inset-top))
             max(1.25rem, env(safe-area-inset-right))
             max(1.25rem, env(safe-area-inset-bottom))
             max(1.25rem, env(safe-area-inset-left));
    background: var(--color-bg);
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.preloader--done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 43, 91, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 43, 91, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 15%, transparent 75%);
    pointer-events: none;
}

.preloader__bg::before,
.preloader__bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.preloader__bg::before {
    width: min(420px, 80vw);
    height: min(420px, 80vw);
    top: -120px;
    right: -80px;
    background: var(--color-green-glow);
}

.preloader__bg::after {
    width: min(360px, 70vw);
    height: min(360px, 70vw);
    bottom: -100px;
    left: -70px;
    background: var(--color-blue-glow);
}

.preloader__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 320px);
    text-align: center;
    animation: preloaderEnter 0.7s ease both;
}

.preloader__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 1.25rem);
    margin-bottom: clamp(1.5rem, 5vw, 2rem);
}

.preloader__logo {
    width: clamp(88px, 24vw, 120px);
    height: auto;
    object-fit: contain;
    border-radius: clamp(16px, 4vw, 22px);
    filter: drop-shadow(0 12px 28px rgba(13, 43, 91, 0.14));
    animation: preloaderFloat 2.4s ease-in-out infinite;
}

.preloader__text {
    height: clamp(44px, 12vw, 60px);
    width: auto;
    max-width: min(280px, 88vw);
    object-fit: contain;
}

.preloader__progress {
    width: 100%;
    margin-bottom: 0.85rem;
}

.preloader__progress-track {
    display: block;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(13, 43, 91, 0.08);
    overflow: hidden;
}

.preloader__progress-fill {
    display: block;
    height: 100%;
    width: 35%;
    border-radius: inherit;
    background: var(--gradient-brand);
    animation: preloaderProgress 1.4s ease-in-out infinite;
}

.preloader--done .preloader__progress-fill {
    width: 100%;
    animation: none;
    transition: width 0.35s ease;
}

.preloader__label {
    font-size: clamp(0.8125rem, 2.5vw, 0.9375rem);
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.01em;
}

@keyframes preloaderEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes preloaderFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes preloaderProgress {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(320%);
    }
}

/* Background effects */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 43, 91, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 43, 91, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: glowDrift 18s ease-in-out infinite alternate;
}

.bg-glow--green {
    width: 560px;
    height: 560px;
    top: -200px;
    right: -140px;
    background: var(--color-green-glow);
}

.bg-glow--blue {
    width: 500px;
    height: 500px;
    bottom: -160px;
    left: -120px;
    background: var(--color-blue-glow);
    animation-delay: -9s;
}

/* Layout */
.page {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding:
        max(1.25rem, env(safe-area-inset-top))
        max(var(--page-padding-x), env(safe-area-inset-right))
        max(var(--page-padding-y), env(safe-area-inset-bottom))
        max(var(--page-padding-x), env(safe-area-inset-left));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    padding: clamp(0.65rem, 2vw, 0.75rem) clamp(0.85rem, 3vw, 1.25rem);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeDown 0.6s ease both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 0.875rem);
    min-width: 0;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.brand__text {
    display: block;
    height: var(--brand-text-height);
    width: auto;
    max-width: min(420px, calc(100vw - 8rem));
    object-fit: contain;
    object-position: right center;
    flex-shrink: 1;
    min-width: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem 0.55rem 1rem;
    background: var(--color-surface);
    border: 1px solid rgba(0, 155, 77, 0.22);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-green-dark);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-green);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: var(--hero-gap);
    margin-bottom: clamp(2rem, 5vw, 3rem);
    animation: fadeUp 0.7s ease 0.1s both;
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__logo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
}

.hero__logo {
    width: var(--hero-logo-size);
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 16px 32px rgba(13, 43, 91, 0.12));
    animation: floatLogo 6s ease-in-out infinite;
}

.hero__content {
    text-align: right;
}

.hero__eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-green);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-green-soft);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.hero__title {
    font-size: clamp(1.875rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero__title-accent {
    display: block;
    margin-top: 0.15em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__lead {
    font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
    color: var(--color-text-muted);
    line-height: 1.85;
    margin-bottom: 1.25rem;
    max-width: 36em;
}

.hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 1.75rem;
}

.hero__tag {
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-blue-light);
    background: var(--color-blue-soft);
    border: 1px solid rgba(13, 43, 91, 0.12);
    border-radius: 999px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 3px;
}

.btn--primary {
    color: #fff;
    background: var(--gradient-brand);
    box-shadow: 0 4px 16px rgba(0, 155, 77, 0.25);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 155, 77, 0.3);
}

.btn--ghost {
    color: var(--color-text);
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
    border-color: rgba(13, 43, 91, 0.18);
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.btn--ghost[aria-expanded="true"] {
    color: var(--color-green-dark);
    border-color: rgba(0, 155, 77, 0.3);
    background: var(--color-green-soft);
}

/* About panel */
.about {
    margin-bottom: 3.5rem;
    animation: fadeUp 0.4s ease both;
}

.about[hidden] {
    display: none;
}

.about__inner {
    padding: 1.5rem 1.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-right: 3px solid var(--color-green);
}

.about__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.about__text {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.9;
    text-align: justify;
}

/* Section head */
.section-head {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeUp 0.7s ease 0.2s both;
}

.section-head__title {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-head__subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* Features */
.features {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    scroll-margin-top: 1rem;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    animation: fadeUp 0.7s ease 0.3s both;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card:nth-child(odd):hover {
    border-color: rgba(0, 155, 77, 0.28);
}

.feature-card:nth-child(even):hover {
    border-color: rgba(13, 43, 91, 0.22);
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.feature-card__icon svg {
    width: 24px;
    height: 24px;
}

.feature-card__icon--green {
    background: var(--color-green-soft);
    border: 1px solid rgba(0, 155, 77, 0.22);
    color: var(--color-green);
}

.feature-card__icon--blue {
    background: var(--color-blue-soft);
    border: 1px solid rgba(13, 43, 91, 0.14);
    color: var(--color-blue);
}

.feature-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--color-text);
}

.feature-card__text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.75;
}

/* CTA */
.cta {
    margin-bottom: 2.5rem;
    animation: fadeUp 0.7s ease 0.4s both;
}

.cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.25rem, 4vw, 2rem);
    padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.25rem, 4vw, 2rem);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background-image: linear-gradient(135deg, rgba(0, 155, 77, 0.04) 0%, rgba(13, 43, 91, 0.04) 100%);
}

.cta__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.cta__text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 28em;
}

.cta__status {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
}

.cta__status-bar {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(13, 43, 91, 0.08);
    overflow: hidden;
    position: relative;
}

.cta__status-bar::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 62%;
    border-radius: inherit;
    background: var(--gradient-brand);
    animation: progressPulse 2.5s ease-in-out infinite;
}

.cta__status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-green-dark);
    letter-spacing: 0.02em;
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    animation: fadeUp 0.7s ease 0.5s both;
}

.footer__text {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes glowDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(20px, 15px) scale(1.05);
    }
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}

/* Tablet */
@media (max-width: 960px) {
    :root {
        --brand-text-height: 76px;
    }

    .header {
        padding: 0.85rem 1.15rem;
    }

    .brand__text {
        max-width: min(380px, calc(100vw - 6rem));
    }

    .hero {
        grid-template-columns: 1fr;
        gap: var(--hero-gap);
        text-align: center;
    }

    .hero__content {
        text-align: center;
    }

    .hero__lead {
        margin-inline: auto;
    }

    .hero__tags,
    .hero__actions {
        justify-content: center;
    }
}

/* Mobile & tablet: single-row header */
@media (max-width: 680px) {
    :root {
        --brand-text-height: 72px;
    }

    .header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.85rem 0.85rem;
    }

    .brand {
        flex-direction: row;
        flex: 1;
        min-width: 0;
        align-items: center;
    }

    .brand__text {
        height: var(--brand-text-height);
        flex: 1;
        min-width: 0;
        max-width: none;
        object-fit: contain;
        object-position: right center;
    }

    .badge {
        flex-shrink: 0;
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }

    .badge__dot {
        width: 6px;
        height: 6px;
    }

    .about__text {
        text-align: right;
    }
}

/* Mobile */
@media (max-width: 560px) {
    .features__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --brand-text-height: 68px;
    }

    .header {
        padding: 0.75rem 0.65rem;
        gap: 0.35rem;
    }

    .badge {
        padding: 0.35rem 0.55rem;
        font-size: 0.6875rem;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .about__inner {
        padding: 1.25rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .cta__inner {
        flex-direction: column;
        text-align: center;
    }

    .cta__content {
        width: 100%;
    }

    .cta__text {
        margin-inline: auto;
    }

    .cta__status {
        width: 100%;
        max-width: 220px;
    }
}

/* Small phones */
@media (max-width: 360px) {
    :root {
        --brand-text-height: 64px;
        --hero-logo-size: 160px;
    }

    .hero__title {
        font-size: 1.625rem;
    }

    .hero__tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.65rem;
    }

    .section-head__subtitle {
        font-size: 0.875rem;
    }
}

/* Short landscape viewports */
@media (max-height: 520px) and (orientation: landscape) {
    .page {
        padding-top: 0.75rem;
        padding-bottom: 1.5rem;
    }

    .header {
        margin-bottom: 1rem;
    }

    .hero {
        margin-bottom: 1.5rem;
    }

    .hero__logo-wrap {
        padding: 0.5rem;
    }

    .hero__visual {
        display: none;
    }

    .features,
    .about,
    .cta {
        margin-bottom: 1.5rem;
    }
}

/* Reduce decorative load on small screens */
@media (max-width: 680px) {
    .bg-glow--green {
        width: 320px;
        height: 320px;
        top: -120px;
        right: -80px;
    }

    .bg-glow--blue {
        width: 280px;
        height: 280px;
        bottom: -100px;
        left: -80px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    :root {
        --max-width: 1140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .preloader__logo,
    .preloader__progress-fill {
        animation: none;
    }

    .preloader__inner {
        animation: none;
    }

    body:not(.preloader-active) .page {
        animation: none;
        opacity: 1;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
