:root {
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-xxl: 120px;
    --page-title-size: clamp(36px, 4vw, 48px);
}

/* ABOUT */

#about {
    min-height: 100%;
    background: #f4f4f4;
    transform: none;
}

.about-page-inner {
    min-height: 100%;
    padding: 72px 8vw 96px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.about-block {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: clamp(48px, 5vw, 100px);
    align-items: start;
}

.about-primary,
.about-currently {
    width: 100%;
    min-width: 0;
}

.about-currently {
    margin: 0;
}

.about-label,
.about-small-label {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6a6a6a;
}

.about-small-label {
    margin-bottom: 10px;
}

.about-title {
    margin: 0 0 28px;
    font-size: clamp(32px, 3vw, 42px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #1d1d1f;
}

.title-line {
    display: block;
    white-space: nowrap;
}

.about-intro {
    width: 100%;
    max-width: 52ch;
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: rgba(0, 0, 0, 0.68);
}

.about-intro > p {
    margin: 0 0 14px;
    font-feature-settings: "ss01" on, "cv01" on, "cv02" on;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.about-problems {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 28px;
    padding: 0;
}

.about-problems li {
    position: relative;
    padding-left: 18px;
    font-size: inherit;
    line-height: 1.5;
    color: inherit;
}

.about-problems li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #999;
}

.about-intro .closing {
    margin: 24px 0 0;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.015em;
    color: rgba(0, 0, 0, 0.82);
}

/* CURRENTLY */

.currently-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    counter-reset: project;
}

.currently-item {
    position: relative;
    padding: 18px 0 0 36px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    counter-increment: project;
}

.currently-item::before {
    content: counter(project, decimal-leading-zero);
    position: absolute;
    top: 21px;
    left: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #999;
}

.currently-item h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: #1d1d1f;
}

.currently-item p {
    max-width: 52ch;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: rgba(0, 0, 0, 0.62);
}

.currently-item h2 a,
.currently-item h2 a:visited,
.currently-item h2 a:active {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.currently-item h2 a:hover {
    opacity: 0.7;
}

.currently-view,
.currently-view:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #6a6a6a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.currently-view:hover {
    color: #1d1d1f;
}

.currently-view span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.currently-view:hover span {
    transform: translate(3px, -3px);
}

.currently-view:focus-visible,
.currently-item h2 a:focus-visible {
    outline: 2px solid #1d1d1f;
    outline-offset: 4px;
}

/* SYSTEMS PAGE */

#systems {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    background: #f4f4f4;
}

#systems[hidden],
.systems-nav[hidden] {
    display: none;
}

#systems .systems-page-inner {
    width: 100%;
    min-height: 100%;
    padding: 72px 4vw 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#systems .systems-content {
    width: 100%;
    max-width: 920px;
    min-width: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SYSTEMS HEADER */

.top-content {
    position: relative;
}

.systems-nav {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    z-index: 100;
}

.systems-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 100px;
    background: transparent;
    color: #6a6a6a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.systems-pill:hover {
    border-color: #1d1d1f;
    color: #1d1d1f;
}

.systems-pill.active,
.systems-pill[aria-pressed="true"] {
    background: #1d1d1f;
    border-color: #1d1d1f;
    color: #fff;
}

.systems-pill:focus-visible {
    outline: 2px solid #1d1d1f;
    outline-offset: 3px;
}

/* SYSTEMS CARD */

#systems .systems-card-shell {
    position: relative;
    width: min(100%, 760px);
    max-width: 760px;
    margin: 0 auto;
}

#systems .systems-card {
    position: relative;
    z-index: 2;
    isolation: isolate;
    width: 100%;
    min-height: 430px;
    margin: 0;
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.35s ease;
}

.systems-card-top {
    position: static;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 28px;
    margin: 0;
}

/* EDITORIAL NUMBER */

.systems-step-number {
    position: absolute;
    top: 8px;
    left: 22px;
    z-index: 0;
    margin: 0;
    font-size: clamp(120px, 13vw, 190px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.09em;
    background: linear-gradient(
        135deg,
        var(--number-color) 0%,
        var(--number-secondary) 65%,
        rgba(255, 186, 210, 0.06) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    pointer-events: none;
    user-select: none;
}

/* GLOW */

.systems-card.step-1 {
    --number-color: rgba(255, 186, 210, 0.30);
    --number-secondary: rgba(255, 186, 210, 0.16);
    box-shadow:
        0 18px 40px rgba(255, 186, 210, 0.22),
        0 6px 16px rgba(0, 0, 0, 0.03);
}

.systems-card.step-2 {
    --number-color: rgba(248, 156, 191, 0.36);
    --number-secondary: rgba(248, 156, 191, 0.20);
    box-shadow:
        0 20px 46px rgba(248, 156, 191, 0.28),
        0 10px 24px rgba(255, 186, 210, 0.18);
}

.systems-card.step-3 {
    --number-color: rgba(240, 126, 172, 0.40);
    --number-secondary: rgba(240, 126, 172, 0.24);
    box-shadow:
        0 24px 54px rgba(240, 126, 172, 0.32),
        0 12px 28px rgba(255, 186, 210, 0.22);
}

.systems-card.step-4 {
    --number-color: rgba(225, 99, 152, 0.44);
    --number-secondary: rgba(225, 99, 152, 0.27);
    box-shadow:
        0 28px 62px rgba(225, 99, 152, 0.36),
        0 14px 32px rgba(248, 156, 191, 0.24);
}

.systems-card.step-5 {
    --number-color: rgba(205, 73, 132, 0.48);
    --number-secondary: rgba(205, 73, 132, 0.30);
    box-shadow:
        0 32px 70px rgba(205, 73, 132, 0.42),
        0 16px 36px rgba(240, 126, 172, 0.28);
}

/* TOOLTIP */
#systems .systems-card .systems-help {
    position: absolute;
    top: 28px;
    right: 28px;
    left: auto;
    bottom: auto;
    z-index: 20;
}

.systems-info-button {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #777;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.systems-info-button:hover {
    color: #1d1d1f;
    border-color: #999;
}

.systems-info-button:focus-visible {
    outline: 2px solid #1d1d1f;
    outline-offset: 3px;
}

#systems .systems-info-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    bottom: auto;
    width: 240px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 30;
}

#systems .systems-info-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.systems-info-tooltip p {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
}

.systems-info-tooltip p:last-child {
    margin-bottom: 0;
}

.systems-info-tooltip .systems-help-title {
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #414047;
}

/* SYSTEMS CONTENT */

#systems .systems-card #systems-stage {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.systems-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.systems-panel[hidden] {
    display: none;
}

.systems-panel.active {
    animation: systemsReveal 0.4s ease-out both;
}

.systems-label {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #858087;
}

.systems-title {
    max-width: 16ch;
    margin: 0 0 22px;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.045em;
    color: #414047;
    text-wrap: balance;
}

.systems-description {
    max-width: 54ch;
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: #68656b;
    white-space: pre-line;
}

/* PAGINATION */

#systems .systems-pagination {
    width: min(100%, 760px);
    margin: 26px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.systems-page-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #6a6a6a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.systems-page-button:hover:not(:disabled) {
    color: #414047;
}

.systems-page-button:disabled {
    visibility: hidden;
    pointer-events: none;
}

.systems-page-button:focus-visible {
    outline: 2px solid #414047;
    outline-offset: 4px;
}

#systems-prev {
    justify-self: start;
}

#systems-next {
    justify-self: end;
    margin-left: 0;
}

.systems-page-button span[aria-hidden="true"] {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

#systems-prev:hover:not(:disabled) span[aria-hidden="true"] {
    transform: translateX(-3px);
}

#systems-next:hover:not(:disabled) span[aria-hidden="true"] {
    transform: translateX(3px);
}

.systems-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.systems-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c8c8c8;
    transition: background 0.25s ease, transform 0.25s ease;
}

.systems-dot.active {
    background: #414047;
    transform: scale(1.3);
}

/* ANIMATION */

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

/* TABLET */

@media (max-width: 900px) {
    .about-block {
        max-width: 620px;
        grid-template-columns: minmax(0, 1fr);
        row-gap: 48px;
    }

    #systems .systems-page-inner {
        padding: 64px 6vw 80px;
    }

    .systems-title {
        font-size: clamp(34px, 5vw, 48px);
    }

    .systems-description {
        font-size: 17px;
    }

    .systems-step-number {
        font-size: clamp(110px, 16vw, 170px);
    }
}

/* MOBILE HEADER */

@media (max-width: 768px) {
    .systems-nav {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 16px;
    }

    .systems-pill {
        padding: 7px 12px;
        font-size: 11px;
    }
}

/* MOBILE */

@media (max-width: 640px) {
    .about-page-inner {
        min-height: calc(100svh - 120px);
        padding: 40px 24px 72px;
    }

    .about-block {
        max-width: 100%;
        margin: 0;
        grid-template-columns: minmax(0, 1fr);
        row-gap: 40px;
    }

    .about-label {
        margin-bottom: 14px;
    }

    .about-title {
        max-width: 100%;
        font-size: clamp(32px, 8.6vw, 42px);
        line-height: 1.04;
        letter-spacing: -0.045em;
        margin-bottom: 24px;
    }

    .title-line {
        white-space: normal;
    }

    .about-intro {
        max-width: 100%;
        font-size: 16px;
        line-height: 1.5;
    }

    .about-intro > p {
        max-width: 42ch;
        margin-bottom: 16px;
    }

    .about-problems {
        gap: 8px;
        margin: 14px 0 24px;
    }

    .about-problems li {
        padding-left: 16px;
    }

    .about-currently {
        margin: 0;
    }

    .currently-item p {
        max-width: 42ch;
        font-size: 15px;
        line-height: 1.5;
    }

    .currently-view {
        font-size: 12px;
    }

    #systems {
        min-height: calc(100svh - 120px);
    }

    #systems .systems-page-inner {
        min-height: calc(100svh - 120px);
        padding: 40px 24px 72px;
        align-items: flex-start;
    }

    #systems .systems-card {
        min-height: 420px;
        padding: 24px;
        border-radius: 16px;
    }

    .systems-step-number {
        top: 18px;
        left: 16px;
        font-size: clamp(100px, 25vw, 140px);
    }

    #systems .systems-card .systems-help {
        top: 20px;
        right: 20px;
    }

    .systems-label {
        margin-bottom: 16px;
        font-size: 11px;
    }

    .systems-title {
        max-width: 100%;
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.04;
        letter-spacing: -0.045em;
        margin-bottom: 24px;
    }

    .systems-description {
        max-width: 100%;
        font-size: 16px;
        line-height: 1.5;
    }

    #systems .systems-pagination {
        margin-top: 28px;
        gap: 10px;
    }

    .systems-page-button {
        font-size: 11px;
        gap: 5px;
    }

    .systems-page-button span[aria-hidden="true"] {
        font-size: 15px;
    }

    .systems-progress {
        gap: 6px;
    }

    .systems-dot {
        width: 4px;
        height: 4px;
    }

    #systems .systems-info-tooltip {
        width: min(240px, calc(100vw - 80px));
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    .systems-panel.active {
        animation: none;
    }

    .systems-pill,
    .systems-card,
    .systems-page-button,
    .systems-dot,
    .systems-info-tooltip,
    .systems-info-button,
    .currently-view,
    .currently-view span,
    .currently-item h2 a {
        transition: none;
    }
}