/**
 * Iran Basketball House — Public Design System
 * Mirrors the Figma foundations and remains independent from backend logic.
 */

:root {
    --ibh-color-navy-950: #071b35;
    --ibh-color-navy-900: #0a2548;
    --ibh-color-navy-800: #12345b;
    --ibh-color-orange-500: #f68a1f;
    --ibh-color-orange-600: #e7780f;
    --ibh-color-orange-050: #fff5eb;
    --ibh-color-page: #f5f7fa;
    --ibh-color-card: #fff;
    --ibh-color-subtle: #f0f3f7;
    --ibh-color-text: #0b1b32;
    --ibh-color-muted: #667085;
    --ibh-color-border: #e4e7ec;
    --ibh-color-border-strong: #cbd2dc;
    --ibh-color-focus: #245ca6;
    --ibh-space-1: 4px;
    --ibh-space-2: 8px;
    --ibh-space-3: 12px;
    --ibh-space-4: 16px;
    --ibh-space-5: 20px;
    --ibh-space-6: 24px;
    --ibh-space-8: 32px;
    --ibh-space-10: 40px;
    --ibh-space-12: 48px;
    --ibh-space-16: 64px;
    --ibh-space-20: 80px;
    --ibh-radius-sm: 8px;
    --ibh-radius-md: 12px;
    --ibh-radius-lg: 16px;
    --ibh-radius-xl: 22px;
    --ibh-radius-2xl: 28px;
    --ibh-radius-full: 999px;
    --ibh-shadow-1: 0 4px 20px rgba(7, 27, 53, 0.05);
    --ibh-shadow-2: 0 12px 32px rgba(7, 27, 53, 0.10);
    --ibh-shadow-3: 0 24px 64px rgba(7, 27, 53, 0.16);
    --ibh-content-max: 1280px;
    --ibh-reading-max: 820px;
    --ibh-wide-max: 1440px;
    --ibh-gutter: clamp(16px, 3vw, 40px);
    --ibh-section-space: clamp(48px, 6vw, 80px);
    --ibh-text-xs: 12px;
    --ibh-text-sm: 14px;
    --ibh-text-md: 16px;
    --ibh-text-lg: 18px;
    --ibh-title-sm: clamp(24px, 3vw, 34px);
    --ibh-title-md: clamp(32px, 4.2vw, 52px);
    --ibh-title-lg: clamp(40px, 5.2vw, 68px);
    --ibh-leading-tight: 1.45;
    --ibh-leading-body: 2;
    --ibh-motion-fast: 160ms;
    --ibh-motion-base: 240ms;
    --ibh-ease-out: cubic-bezier(.22, 1, .36, 1);
}

.ibh-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.ibh-public-body {
    color: var(--ibh-color-text);
    background: var(--ibh-color-page);
}

.ibh-container,
.ib-wide-page-hero__inner {
    width: min(calc(100% - (2 * var(--ibh-gutter))), var(--ibh-content-max));
    margin-inline: auto;
}

.ibh-reading-container {
    width: min(calc(100% - (2 * var(--ibh-gutter))), var(--ibh-reading-max));
    margin-inline: auto;
}

.ibh-surface {
    border: 1px solid var(--ibh-color-border);
    border-radius: var(--ibh-radius-xl);
    background: var(--ibh-color-card);
    box-shadow: var(--ibh-shadow-1);
}

.ibh-section-title {
    margin: 0;
    color: var(--ibh-color-text);
    font-size: var(--ibh-title-sm);
    font-weight: 950;
    line-height: var(--ibh-leading-tight);
    letter-spacing: -.025em;
    text-wrap: balance;
}

.ibh-body-copy {
    color: var(--ibh-color-muted);
    font-size: var(--ibh-text-md);
    line-height: var(--ibh-leading-body);
}

:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ibh-color-focus) 70%, white);
    outline-offset: 3px;
}

body.ibh-home-body .ibh-home-main {
    isolation: isolate;
}

body.ibh-home-body .ibh-home-page {
    width: min(calc(100% - 32px), var(--ibh-content-max));
    margin-inline: auto;
}

body.ibh-home-body .ibh-home-hero {
    min-height: 540px;
    padding: clamp(32px, 5vw, 64px);
    gap: clamp(28px, 4vw, 56px);
    border-radius: var(--ibh-radius-2xl);
    background:
        radial-gradient(circle at 12% 12%, rgba(246, 138, 31, .15), transparent 28%),
        linear-gradient(135deg, var(--ibh-color-navy-950), var(--ibh-color-navy-900));
    box-shadow: var(--ibh-shadow-3);
}

body.ibh-home-body .ibh-home-hero-copy {
    align-self: center;
}

body.ibh-home-body .ibh-home-hero h1 {
    max-width: 720px;
    margin-block: 12px 16px;
    font-size: clamp(42px, 4.2vw, 58px);
    line-height: 1.35;
    letter-spacing: -.035em;
    text-wrap: balance;
}

body.ibh-home-body .ibh-home-hero-copy > p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(15px, 1.35vw, 18px);
    line-height: 2;
}

.ibh-home-hero-search {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--ibh-space-2);
    margin-block: var(--ibh-space-6) var(--ibh-space-5);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--ibh-radius-lg);
    background: rgba(255, 255, 255, .09);
    transition:
        border-color var(--ibh-motion-fast) ease,
        background var(--ibh-motion-fast) ease,
        box-shadow var(--ibh-motion-fast) ease;
}

.ibh-home-hero-search:focus-within {
    border-color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 3px rgba(36, 92, 166, .34);
}

.ibh-home-hero-search input {
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
}

.ibh-home-hero-search input::placeholder {
    color: rgba(255, 255, 255, .58);
}

.ibh-home-hero-search button {
    min-height: 44px;
    padding-inline: 20px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--ibh-color-orange-500);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform var(--ibh-motion-fast) var(--ibh-ease-out),
        background var(--ibh-motion-fast) ease;
}

.ibh-home-hero-search button:hover {
    background: var(--ibh-color-orange-600);
    transform: translateY(-1px);
}

.ibh-home-hero-search button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .72);
    outline-offset: 2px;
}

body.ibh-home-body .ibh-home-hero-visual {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--ibh-radius-xl);
    box-shadow: var(--ibh-shadow-2);
}

body.ibh-home-body .ibh-home-hero-visual-media img {
    transition: transform 700ms var(--ibh-ease-out);
}

body.ibh-home-body .ibh-home-hero:hover .ibh-home-hero-visual-media img {
    transform: scale(1.025);
}

body.ibh-home-body .ibh-home-section {
    margin-block: clamp(48px, 6vw, 80px);
}

body.ibh-home-body .ibh-home-section-heading {
    margin-block-end: clamp(20px, 3vw, 32px);
}

body.ibh-home-body .ibh-home-section-heading h2 {
    margin-block: 8px 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.55;
    letter-spacing: -.025em;
    text-wrap: balance;
}

body.ibh-home-body .ibh-home-section-heading > a {
    border-radius: var(--ibh-radius-full);
}

body.ibh-home-body .ibh-home-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--ibh-radius-lg);
    transition:
        transform var(--ibh-motion-fast) var(--ibh-ease-out),
        background var(--ibh-motion-fast) ease,
        border-color var(--ibh-motion-fast) ease,
        box-shadow var(--ibh-motion-fast) ease;
}

body.ibh-home-body .ibh-home-button:hover {
    transform: translateY(-2px);
}

body.ibh-home-body .ibh-home-button:focus-visible,
body.ibh-home-body .ibh-home-member-card:focus-visible,
body.ibh-home-body .ibh-home-path-grid > a:focus-visible,
body.ibh-home-body .ibh-home-feature-story:focus-within {
    outline: 3px solid var(--ibh-color-focus);
    outline-offset: 3px;
}

body.ibh-home-body .ibh-home-member-card,
body.ibh-home-body .ibh-home-feature-story,
body.ibh-home-body .ibh-home-radar-list,
body.ibh-home-body .ibh-home-path-grid > a,
body.ibh-home-body .ibh-home-course-list,
body.ibh-home-body .ibh-home-article-list,
body.ibh-home-body .ibh-home-community-intro,
body.ibh-home-body .ibh-home-heritage-list > a {
    border: 1px solid var(--ibh-color-border);
    border-radius: var(--ibh-radius-xl);
    background: var(--ibh-color-card);
    box-shadow: var(--ibh-shadow-1);
    transition:
        transform var(--ibh-motion-base) var(--ibh-ease-out),
        border-color var(--ibh-motion-fast) ease,
        box-shadow var(--ibh-motion-base) var(--ibh-ease-out);
}

body.ibh-home-body .ibh-home-member-card:hover,
body.ibh-home-body .ibh-home-feature-story:hover,
body.ibh-home-body .ibh-home-path-grid > a:hover,
body.ibh-home-body .ibh-home-heritage-list > a:hover {
    border-color: rgba(246, 138, 31, .42);
    box-shadow: var(--ibh-shadow-2);
    transform: translateY(-4px);
}

body.ibh-home-body .ibh-home-member-avatar {
    overflow: hidden;
    border: 3px solid var(--ibh-color-card);
    background: var(--ibh-color-subtle);
}

body.ibh-home-body .ibh-home-member-arrow {
    color: var(--ibh-color-navy-900);
    background: var(--ibh-color-orange-050);
}

body.ibh-home-body .ibh-home-path-grid > a {
    min-height: 196px;
}

body.ibh-home-body .ibh-home-radio {
    border-radius: var(--ibh-radius-2xl);
    background:
        radial-gradient(circle at 90% 10%, rgba(246, 138, 31, .16), transparent 34%),
        var(--ibh-color-navy-950);
}

body.ibh-home-body .ibh-home-join {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--ibh-radius-2xl);
    box-shadow: var(--ibh-shadow-3);
}

@media (max-width: 980px) {
    body.ibh-home-body .ibh-home-page {
        width: min(calc(100% - 24px), var(--ibh-content-max));
    }

    body.ibh-home-body .ibh-home-hero {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    body.ibh-home-body .ibh-home-page {
        width: 100%;
    }

    body.ibh-home-body .ibh-home-hero {
        margin-inline: 12px;
        padding: 28px 20px 22px;
        gap: 24px;
        border-radius: var(--ibh-radius-xl);
    }

    body.ibh-home-body .ibh-home-hero h1 {
        font-size: clamp(32px, 10vw, 40px);
        line-height: 1.45;
        letter-spacing: -.02em;
    }

    body.ibh-home-body .ibh-home-hero-copy > p {
        font-size: 15px;
        line-height: 1.9;
    }

    .ibh-home-hero-search {
        grid-template-columns: 1fr;
        background: rgba(255, 255, 255, .08);
    }

    .ibh-home-hero-search button {
        width: 100%;
    }

    body.ibh-home-body .ibh-home-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    body.ibh-home-body .ibh-home-actions .ibh-home-button {
        width: 100%;
    }

    body.ibh-home-body .ibh-home-section {
        margin-block: 48px;
        padding-inline: 16px;
    }

    body.ibh-home-body .ibh-home-section-heading {
        align-items: flex-start;
        gap: 12px;
    }

    body.ibh-home-body .ibh-home-section-heading h2 {
        font-size: 28px;
    }

    body.ibh-home-body .ibh-home-network {
        margin-inline: 12px;
    }

    body.ibh-home-body .ibh-home-radio,
    body.ibh-home-body .ibh-home-join {
        margin-inline: 12px;
    }
}

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