@font-face {
    font-family: "Inter";
    src: local("Inter Regular"), local("Inter");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: local("Inter Bold"), local("Inter");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #090b0e;
    --bg-elevated: #0f1217;
    --panel: #13171d;
    --panel-strong: #181d24;
    --panel-soft: #10141a;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f5f7fa;
    --muted: #9ba5b2;
    --muted-strong: #c3cad3;
    --accent: #8ab4ff;
    --accent-strong: #a9c8ff;
    --success: #76c7a2;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shell: min(1180px, calc(100% - 40px));
}

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

html {
    color-scheme: dark;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% -12%, rgba(138, 180, 255, 0.14), transparent 28rem),
        radial-gradient(circle at 100% 22%, rgba(255, 255, 255, 0.045), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
    content: "";
    pointer-events: none;
}

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

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

p,
h1,
h2,
h3,
h4 {
    margin-top: 0;
    overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4,
strong,
b {
    font-weight: 700;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 11, 14, 0.84);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.brand img {
    width: 142px;
    height: auto;
}

.primary-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.primary-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted-strong);
    font-size: 1.3rem;
    font-weight: 700;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.ph-icon {
    flex: 0 0 auto;
}

.hero {
     padding: clamp(36px, 10vw, 36px) 0 clamp(36px, 8vw, 28px); 
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: clamp(44px, 8vw, 112px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 28px;
    height: 1px;
    background: currentColor;
    content: "";
}

.hero h1,
.page-hero h1 {
    max-width: 880px;
    margin-bottom: 24px;
    font-size: clamp(2.75rem, 7vw, 6.4rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-title {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.22em;
    max-width: none;
    white-space: nowrap;
}

.hero-title-word {
    display: block;
}

.hero-title-emphasis {
    color: var(--muted);
}

.hero-copy {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted-strong);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero-summary {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
    box-shadow: var(--shadow);
}

.summary-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: var(--panel-soft);
}

.summary-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent-strong);
}

.summary-item strong,
.summary-item > div > span {
    display: block;
}

.summary-item strong {
    font-size: 1.05rem;
}

.summary-item > div > span {
    color: var(--muted);
    font-size: 0.85rem;
}

.portal-section,
.content-section {
    padding: 0 0 clamp(76px, 10vw, 140px);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 30px;
}

.section-heading h2 {
    max-width: 660px;
    margin-bottom: 0;
    font-size: clamp(1.85rem, 3.5vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 430px;
    margin-bottom: 0;
    color: var(--muted);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 18px;
}

.portal-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 510px;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.portal-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    transform: translateY(-5px);
}

.portal-media {
    position: relative;
    height: 280px;
    min-height: 280px;
    flex: 0 0 280px;
    overflow: hidden;
    background: #e9eaec;
}

.portal-media::before {
    position: absolute;
    inset: 0;
    background-color: #e9eaec;
    background-image: var(--portal-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    content: "";
    transition: transform 500ms ease;
}

.portal-media::after {
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(15, 18, 23, 0.92));
    content: "";
}

.portal-card:hover .portal-media::before {
    transform: scale(1.035);
}

.portal-card[data-card="catalog"] .portal-media::before {
    background-position: center 10%;
}

.portal-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.portal-number {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.portal-body h3 {
    margin-bottom: 10px;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.portal-body p {
    margin-bottom: 28px;
    color: var(--muted);
}

.button,
.icon-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button {
    padding: 10px 15px;
}

.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.button-primary {
    margin-top: auto;
    background: var(--text);
    color: var(--bg);
}

.button-primary:hover {
    background: var(--accent-strong);
}

.button-secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.08);
}

.button-ghost {
    border-color: var(--line);
    background: transparent;
    color: var(--muted-strong);
}

.button[aria-disabled="true"],
.button:disabled {
    border-color: rgba(255, 255, 255, 0.055);
    background: rgba(255, 255, 255, 0.022);
    color: #626b76;
    cursor: not-allowed;
    pointer-events: none;
}

.page-hero {
    padding: clamp(58px, 8vw, 104px) 0 48px;
}

.page-hero h1 {
    max-width: 980px;
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 6vw, 5.2rem);
}

.page-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted-strong);
    font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.back-link {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.back-link:hover {
    color: var(--text);
}

.category-panel {
    margin-bottom: 36px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(16, 20, 26, 0.76);
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.panel-heading h2 {
    margin-bottom: 5px;
    font-size: clamp(1.4rem, 2.5vw, 2.15rem);
    letter-spacing: -0.035em;
}

.panel-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.category-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 140px;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.category-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--category-accent);
    content: "";
}

.category-card:hover,
.category-card.is-active {
    border-color: color-mix(in srgb, var(--category-accent) 58%, white 8%);
    background: color-mix(in srgb, var(--category-accent) 10%, var(--panel));
    transform: translateY(-2px);
}

.category-card strong,
.category-card small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-card strong {
    font-size: 1rem;
}

.category-card-copy {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
}

.category-card small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.category-card .category-count {
    margin-top: 7px;
    color: var(--muted-strong);
    font-weight: 700;
    white-space: nowrap;
}

.category-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--category-accent) 58%, white 8%);
    border-radius: 11px;
    color: color-mix(in srgb, var(--category-accent) 70%, white 30%);
}

.product-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.product-toolbar[hidden] {
    display: none;
}

.search-field {
    display: block;
}

.search-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.search-control {
    position: relative;
    display: block;
}

.search-control > .ph-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.search-control input {
    width: 100%;
    min-height: 54px;
    padding: 12px 54px 12px 48px;
    border: 1px solid var(--line);
    border-radius: 15px;
    outline: none;
    background: var(--panel);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-control input::placeholder {
    color: #707986;
}

.search-control input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(138, 180, 255, 0.11);
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.result-count {
    display: flex;
    min-width: 156px;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted-strong);
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-grid[hidden] {
    display: none;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.product-card[hidden] {
    display: none;
}

.product-carousel {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f4f4f3;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.carousel-slide.is-active {
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #12151a;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.carousel-control[data-carousel-direction="prev"] {
    left: 12px;
}

.carousel-control[data-carousel-direction="next"] {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    right: 0;
    bottom: 14px;
    left: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 18, 23, 0.32);
}

.carousel-dot.is-active {
    width: 20px;
    border-radius: 99px;
    background: #11151a;
}

.carousel-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-strong);
}

.carousel-actions .button {
    min-width: 0;
    flex: 0 1 164px;
}

.image-dialog {
    width: auto;
    max-width: 94vw;
    max-height: 92vh;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.68);
}

.image-dialog.is-document {
    width: min(1180px, 94vw);
}

.image-dialog:not(.is-document):not(.is-natural-square) {
    min-width: min(640px, 94vw);
}

.image-dialog::backdrop {
    background: rgba(3, 5, 8, 0.82);
    backdrop-filter: blur(10px);
}

.image-dialog-panel {
    display: flex;
    width: 100%;
    max-height: 92vh;
    flex-direction: column;
}

.image-dialog.is-document .image-dialog-panel {
    height: min(900px, 92vh);
}

.image-dialog-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.image-dialog-header span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.image-dialog-header h2 {
    margin-bottom: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.3;
}

.image-dialog-actions,
.image-zoom-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.image-zoom-controls {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.image-zoom-controls[hidden] {
    display: none;
}

.image-zoom-controls button {
    display: grid;
    min-width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.image-zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.image-zoom-controls button:disabled {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.45;
}

.image-zoom-controls .image-zoom-level {
    min-width: 58px;
    padding-inline: 8px;
    color: var(--muted-strong);
    font-size: 0.75rem;
    font-weight: 700;
}

.image-dialog-download,
.image-dialog-close {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.image-dialog-download:hover,
.image-dialog-close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.image-dialog-stage {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 0;
    background: #f4f4f3;
    scrollbar-color: #7a8491 #dfe2e6;
    scrollbar-width: auto;
}

.image-dialog-stage::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.image-dialog-stage::-webkit-scrollbar-track {
    background: #dfe2e6;
}

.image-dialog-stage::-webkit-scrollbar-thumb {
    border: 2px solid #dfe2e6;
    border-radius: 999px;
    background: #7a8491;
}

.image-dialog-stage::-webkit-scrollbar-thumb:hover {
    background: #596471;
}

.image-dialog-stage.is-pannable {
    cursor: grab;
}

.image-dialog-stage.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.image-dialog-stage img {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin-inline: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.image-dialog:not(.is-document) .image-dialog-stage {
    max-height: calc(92vh - 80px);
}

.image-dialog.is-natural-square .image-dialog-stage {
    overflow: hidden;
}

.image-dialog-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #f4f4f3;
}

.image-dialog.is-document .image-dialog-stage {
    min-height: 0;
    flex: 1 1 auto;
}

.product-content {
    padding: 21px;
}

.product-sku {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-transform: uppercase;
}

.product-content h3 {
    margin-bottom: 10px;
    font-size: 1.22rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 13px;
}

.variant-pill {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted-strong);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.76rem;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.asset-grid .button {
    min-width: 0;
    min-height: 48px;
    justify-content: flex-start;
    padding: 9px 10px;
    text-align: left;
    overflow-wrap: anywhere;
}

.empty-state,
.selection-state {
    display: grid;
    min-height: 250px;
    place-items: center;
    padding: 42px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.018);
    color: var(--muted);
    text-align: center;
}

.empty-state[hidden],
.selection-state[hidden] {
    display: none;
}

.empty-state .ph-icon,
.selection-state .ph-icon {
    margin: 0 auto 16px;
    color: var(--accent);
}

.empty-state h3,
.selection-state h3 {
    margin-bottom: 6px;
    color: var(--text);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.catalog-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    grid-template-columns: minmax(180px, 0.64fr) minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.catalog-cover {
    position: relative;
    display: grid;
    min-height: 320px;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(138, 180, 255, 0.19), transparent 56%),
        #e6e9ee;
    color: #0b2d66;
}

.catalog-cover::before {
    position: absolute;
    width: 170px;
    height: 220px;
    border: 1px solid rgba(9, 11, 14, 0.12);
    border-radius: 5px;
    background: white;
    box-shadow: 0 24px 50px rgba(9, 11, 14, 0.18);
    content: "";
    transform: rotate(-4deg);
}

.catalog-cover .ph-icon {
    position: relative;
    z-index: 1;
}

.catalog-cover img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
}

.catalog-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 42px);
}

.file-type {
    margin-bottom: 14px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.catalog-info h2 {
    margin-bottom: 12px;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.14;
    letter-spacing: -0.03em;
}

.file-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 0.8rem;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.folder-stack {
    display: grid;
    gap: 14px;
}

.folder-section {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
}

.folder-section summary {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
}

.folder-section summary::-webkit-details-marker {
    display: none;
}

.folder-section summary::after {
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
}

.folder-section[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.folder-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent);
}

.folder-title {
    min-width: 0;
}

.folder-title strong,
.folder-title span {
    display: block;
    overflow-wrap: anywhere;
}

.folder-title span {
    color: var(--muted);
    font-size: 0.78rem;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 14px 14px;
}

.file-card {
    display: flex;
    min-width: 0;
    min-height: 184px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
}

.file-preview {
    display: grid;
    min-height: 110px;
    place-items: center;
    overflow: hidden;
    background: #eef0f2;
    color: #25334a;
}

.file-preview img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 12px;
}

.file-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.file-body h3 {
    margin-bottom: 7px;
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.file-body p {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.72rem;
}

.file-body .file-actions {
    margin-top: auto;
}

.file-body .button {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 0.76rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #07090b;
}

.footer-inner {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding-block: 42px;
}

.footer-inner img {
    width: 124px;
    height: auto;
    margin-bottom: 14px;
}

.footer-inner p {
    max-width: 380px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-note {
    text-align: right;
}

@media (max-width: 1040px) {
    .portal-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-card:last-child {
        grid-column: span 2;
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    :root {
        --shell: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-block: 15px;
    }

    .brand {
        align-self: center;
    }

    .brand img {
        width: 122px;
    }

    .primary-nav {
        width: 100%;
        justify-content: center;
    }

    .primary-nav a {
        flex: 1 1 0;
        padding-inline: 8px;
        font-size: 0.78rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .page-hero h1 {
        letter-spacing: -0.052em;
    }

    .hero-title {
        flex-direction: column;
        gap: 0;
        white-space: normal;
    }

    .section-heading,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .portal-grid,
    .product-grid,
    .file-grid {
        grid-template-columns: 1fr;
    }

    .portal-card,
    .portal-card:last-child {
        min-height: 470px;
        grid-column: auto;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-toolbar {
        grid-template-columns: 1fr;
    }

    .result-count {
        justify-content: flex-start;
        text-align: left;
    }

    .catalog-card {
        grid-template-columns: 1fr;
    }

    .catalog-cover {
        min-height: 250px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-note {
        text-align: left;
    }

    .image-dialog-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .image-dialog-actions {
        width: 100%;
        justify-content: space-between;
    }

}

@media (max-width: 460px) {
    .primary-nav a {
        flex-direction: column;
        gap: 4px;
        font-size: 1.1rem;
    }

    .hero {
        padding-top: 1rem;
    }

    .category-grid,
    .asset-grid {
        grid-template-columns: 1fr;
    }

    .carousel-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .carousel-actions .button {
        width: 100%;
    }

    .category-card {
        min-height: 112px;
    }

    .file-actions .button {
        width: 100%;
        flex: 1 1 100%;
    }
}

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

