/* Landing — سامانه کارورزی داروسازی بالینی
   Tokens: pharmacy green + trust blue (Accessible & Ethical) */

@font-face {
    font-family: 'IRANYekanX';
    src: url('../fonts/IRANYekanX/IRANYekanX.woff2') format('woff2'),
         url('../fonts/IRANYekanX/IRANYekanX.woff') format('woff'),
         url('../fonts/IRANYekanX/IRANYekanX.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #15803D;
    --color-primary-deep: #14532D;
    --color-secondary: #22C55E;
    --color-accent: #0369A1;
    --color-accent-soft: #E0F2FE;
    --color-background: #F0FDF4;
    --color-foreground: #14532D;
    --color-muted: #E8F0F1;
    --color-border: #BBF7D0;
    --color-surface: #FFFFFF;
    --color-on-primary: #FFFFFF;
    --color-ring: #15803D;
    --font: 'IRANYekanX', 'Vazirmatn', 'Tahoma', sans-serif;
    --space-section: clamp(4.5rem, 8vw, 7rem);
    --radius: 1rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --max: 72rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body.landing-body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-foreground);
    background: var(--color-background);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 100;
    background: var(--color-primary);
    color: var(--color-on-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* ——— Atmosphere ——— */
.landing-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(3, 105, 161, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 45% at 0% 20%, rgba(34, 197, 94, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(21, 128, 61, 0.1), transparent 55%),
        linear-gradient(180deg, #ECFDF5 0%, #F0FDF4 40%, #F8FAFC 100%);
}

.landing-atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2315803D' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ——— Nav ——— */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(240, 253, 244, 0.82);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.landing-nav.is-scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: 0 8px 24px rgba(20, 83, 45, 0.06);
}

.landing-nav__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary-deep);
}

.landing-brand__mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, var(--color-primary), #166534);
    color: var(--color-on-primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.landing-brand__mark svg {
    width: 1.25rem;
    height: 1.25rem;
}

.landing-brand__text {
    display: none;
}

@media (min-width: 640px) {
    .landing-brand__text { display: block; }
}

.landing-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.7rem 1.35rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}

.btn:focus-visible {
    outline: 3px solid var(--color-ring);
    outline-offset: 3px;
}

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

.btn--primary {
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 10px 24px rgba(21, 128, 61, 0.25);
}

.btn--primary:hover {
    background: #166534;
    box-shadow: 0 14px 28px rgba(21, 128, 61, 0.3);
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary-deep);
    border-color: var(--color-border);
}

.btn--ghost:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
}

.btn--accent {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(3, 105, 161, 0.28);
}

.btn--accent:hover {
    background: #075985;
}

.btn--lg {
    min-height: 52px;
    padding: 0.9rem 1.75rem;
    font-size: 1.05rem;
}

/* ——— Hero ——— */
.hero {
    position: relative;
    min-height: calc(100vh - 4.5rem);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.hero__plane {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(20, 83, 45, 0.92) 0%, rgba(21, 128, 61, 0.78) 42%, rgba(3, 105, 161, 0.55) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%23166534'/%3E%3Cstop offset='1' stop-color='%230369A1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23g)' width='1600' height='900'/%3E%3Cg fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1'%3E%3Cpath d='M0 180h1600M0 360h1600M0 540h1600M0 720h1600M200 0v900M400 0v900M600 0v900M800 0v900M1000 0v900M1200 0v900M1400 0v900'/%3E%3C/g%3E%3Ccircle cx='1200' cy='200' r='220' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='300' cy='700' r='280' fill='rgba(34,197,94,0.12)'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 5.5rem) 1.5rem clamp(2.5rem, 6vw, 4rem);
    display: grid;
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: end;
}

@media (min-width: 960px) {
    .hero__content {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: center;
        padding-block: clamp(4rem, 10vh, 6.5rem);
    }
}

.hero__copy {
    color: #F0FDF4;
    max-width: 36rem;
}

.hero__brand {
    margin: 0 0 1.25rem;
    font-size: clamp(2.15rem, 5.2vw, 3.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
    animation: heroReveal 700ms var(--ease) both;
}

.hero__headline {
    margin: 0 0 1rem;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 500;
    line-height: 1.6;
    color: rgba(240, 253, 244, 0.95);
    animation: heroReveal 700ms var(--ease) 120ms both;
}

.hero__support {
    margin: 0 0 2rem;
    font-size: 1.05rem;
    color: rgba(236, 253, 245, 0.82);
    max-width: 32rem;
    animation: heroReveal 700ms var(--ease) 220ms both;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    animation: heroReveal 700ms var(--ease) 320ms both;
}

.hero__cta .btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero__cta .btn--primary {
    background: #fff;
    color: var(--color-primary-deep);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.hero__cta .btn--primary:hover {
    background: #ECFDF5;
}

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product mockup — visual anchor */
.hero__visual {
    position: relative;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.product-frame {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 1.25rem;
    padding: 0.75rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}

.product-chrome {
    background: #F8FAFC;
    border-radius: 0.9rem;
    overflow: hidden;
    color: #0F172A;
}

.product-chrome__bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
}

.product-chrome__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #CBD5E1;
}

.product-chrome__dot:nth-child(1) { background: #F87171; }
.product-chrome__dot:nth-child(2) { background: #FBBF24; }
.product-chrome__dot:nth-child(3) { background: #34D399; }

.product-chrome__title {
    margin-inline-start: 0.5rem;
    font-size: 0.8rem;
    color: #64748B;
    font-weight: 600;
}

.product-body {
    padding: 1.15rem;
    display: grid;
    gap: 0.85rem;
}

.product-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.6fr;
    gap: 0.65rem;
    align-items: center;
}

.product-pill {
    height: 0.7rem;
    border-radius: 999px;
    background: #E2E8F0;
}

.product-pill--name { width: 85%; background: #CBD5E1; }
.product-pill--dept { width: 70%; background: #BBF7D0; }
.product-score {
    justify-self: start;
    min-width: 3.2rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    background: #DCFCE7;
    color: #14532D;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}

.product-score--mid { background: #E0F2FE; color: #075985; }
.product-score--high { background: #BBF7D0; color: #14532D; }

.product-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(120deg, #ECFDF5, #E0F2FE);
    border: 1px solid #BBF7D0;
}

.product-banner strong {
    display: block;
    font-size: 0.9rem;
    color: var(--color-primary-deep);
}

.product-banner span {
    font-size: 0.75rem;
    color: #475569;
}

.product-meter {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background:
        conic-gradient(var(--color-primary) 0 72%, #E2E8F0 72% 100%);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.product-meter::after {
    content: '۱۸';
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-primary-deep);
}

/* ——— Sections ——— */
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: var(--space-section) 1.5rem;
}

.section__eyebrow {
    display: inline-block;
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}

.section__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--color-primary-deep);
    max-width: 22ch;
}

.section__lead {
    margin: 0 0 2.5rem;
    font-size: 1.05rem;
    color: #334155;
    max-width: 40rem;
}

.section--muted {
    background: linear-gradient(180deg, rgba(232, 240, 241, 0.55), transparent);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Features — not card-heavy; list with dividers */
.feature-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--color-border);
}

.feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}

@media (min-width: 768px) {
    .feature-item {
        grid-template-columns: 3.5rem 12rem 1fr;
        align-items: center;
    }
}

.feature-item__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: linear-gradient(145deg, #DCFCE7, #E0F2FE);
    color: var(--color-primary);
    display: grid;
    place-items: center;
}

.feature-item__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.feature-item__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-deep);
}

.feature-item__text {
    margin: 0.35rem 0 0;
    color: #475569;
    font-size: 0.98rem;
}

@media (min-width: 768px) {
    .feature-item__text { margin: 0; }
}

/* Roles */
.roles {
    display: grid;
    gap: 1.5rem;
}

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

.role {
    padding: 0;
    border: none;
    background: transparent;
}

.role__index {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.role__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary-deep);
}

.role__text {
    margin: 0;
    color: #475569;
    font-size: 0.98rem;
}

/* CTA band */
.cta-band {
    width: calc(100% - 3rem);
    max-width: var(--max);
    margin: 0 auto var(--space-section);
    padding: clamp(2.5rem, 5vw, 3.5rem);
    border-radius: 1.5rem;
    background:
        linear-gradient(135deg, rgba(21, 128, 61, 0.95), rgba(3, 105, 161, 0.9)),
        var(--color-primary);
    color: #fff;
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .cta-band {
        grid-template-columns: 1.4fr auto;
        padding-inline: 3rem;
    }
}

.cta-band h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    font-weight: 800;
    line-height: 1.4;
}

.cta-band p {
    margin: 0;
    color: rgba(240, 253, 244, 0.88);
    max-width: 36rem;
}

.cta-band .btn--primary {
    background: #fff;
    color: var(--color-primary-deep);
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 1.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.55);
}

.landing-footer__inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    color: #64748B;
    font-size: 0.9rem;
}

.landing-footer a {
    color: var(--color-accent);
    font-weight: 700;
    cursor: pointer;
}

.landing-footer a:hover {
    text-decoration: underline;
}

.landing-footer a:focus-visible {
    outline: 3px solid var(--color-ring);
    outline-offset: 3px;
    border-radius: 0.25rem;
}
