/* [소개 페이지의 장면과 읽기 흐름 / About scenes and reading rhythm]
   기존 foundation을 사용하며 이 파일은 story 소유 요소만 다룹니다.
   Reuse the existing foundation and keep this layer scoped to story elements. */
.sejong-story {
    --story-ink: #161a21;
    --story-muted: #555e69;
    --story-accent: #08627b;
    color: var(--story-ink);
    font-size: 18px;
    line-height: 1.75;
}

.sejong-story h1,
.sejong-story h2,
.sejong-story h3,
.sejong-story p,
.sejong-story figure {
    margin: 0;
}

.sejong-story h1,
.sejong-story h2 {
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.22;
    overflow-wrap: break-word;
}

.sejong-story h2 {
    font-size: clamp(36px, 4.5vw, 64px);
}

.sejong-story h3 {
    font-size: clamp(26px, 2.2vw, 32px);
    font-weight: 650;
    line-height: 1.4;
}

.sejong-story p {
    line-height: 1.75;
}

.sejong-story figcaption {
    margin-top: 12px;
    color: var(--story-muted);
    font-size: 16px;
    line-height: 1.6;
}

.sejong-story .story-kicker {
    margin-bottom: 24px;
    color: var(--story-muted);
    font-size: 16px;
    font-weight: 600;
}

.story-opening {
    padding-top: clamp(56px, 7vw, 112px);
    padding-bottom: 56px;
}

.story-opening h1 {
    max-width: 1100px;
    font-size: clamp(48px, 6.8vw, 100px);
}

.story-opening-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-top: 40px;
}

.story-opening-bottom p {
    max-width: 680px;
    color: var(--story-muted);
    font-size: 20px;
}

.story-scroll-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--story-ink);
    font-size: 18px;
    font-weight: 600;
}

.story-scroll-button .material-icon {
    transform: rotate(180deg);
}

.sejong-story .story-hero-media {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
}

.story-hero-frame {
    overflow: hidden;
    clip-path: inset(0 var(--story-media-inset, 0%) 0);
}

.story-hero-frame img {
    width: 100%;
    height: auto;
    max-height: 820px;
    aspect-ratio: 1160 / 680;
    object-fit: cover;
    object-position: center;
    transform: scale(var(--story-media-scale, 1));
}

.story-scene {
    padding-block: clamp(96px, 11vw, 176px);
    scroll-margin-top: 112px;
}

.story-experience,
.story-history-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(48px, 9vw, 144px);
}

.story-sticky-copy {
    position: sticky;
    top: 136px;
}

.story-sticky-copy > p:not(.story-kicker),
.story-company-stage > div > p:not(.story-kicker) {
    margin-top: 32px;
    color: var(--story-muted);
}

.story-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding-block: 10px;
    color: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    text-underline-offset: 5px;
}

.story-sticky-copy > .story-link,
.story-company-stage > div > .story-link {
    display: flex;
    width: fit-content;
    margin-top: 24px;
}

.story-sticky-copy > .story-link + .story-link {
    margin-top: 0;
}

.story-experience-list > article {
    padding-block: 44px;
    border-top: 1px solid #d4d9de;
}

.story-experience-list > article:first-child {
    padding-top: 0;
    border-top: 0;
}

.story-experience-list > article:last-child {
    padding-bottom: 0;
}

.story-experience-list p {
    margin-top: 20px;
    color: var(--story-muted);
}

.story-experience-list .story-link {
    margin-top: 18px;
}

.story-emphasis {
    transition: color 240ms ease;
}

.story-scene.is-current-scene .story-emphasis {
    color: var(--story-accent);
}

.story-spaces {
    background: #f3f5f7;
}

.story-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    gap: clamp(32px, 7vw, 112px);
}

.story-section-heading > p,
.story-section-heading > div > p:not(.story-kicker) {
    max-width: 480px;
    color: var(--story-muted);
}

.story-space-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    min-width: 0;
    margin: 52px 0 32px;
    padding: 0;
    border: 0;
}

.story-space-picker legend {
    margin-bottom: 12px;
    padding: 0;
    color: var(--story-muted);
    font-size: 16px;
}

.story-space-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    cursor: pointer;
}

.story-space-choice input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--story-accent);
}

.story-space-choice span {
    color: var(--story-ink);
    font-size: 18px;
    font-weight: 600;
}

.story-space-choice input:checked + span {
    color: var(--story-accent);
}

.story-space-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.story-space-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1160 / 680;
    object-fit: cover;
}

.story-space-illustration img {
    background: #e9edf0;
    object-fit: contain;
}

.story-space-copy .story-kicker {
    margin-bottom: 12px;
}

.story-space-copy h3 {
    font-size: clamp(30px, 3vw, 42px);
}

.story-space-copy > p:not(.story-kicker) {
    margin-top: 20px;
    color: var(--story-muted);
}

.story-space-copy .story-space-use {
    font-size: 16px;
}

.story-space-copy .story-link {
    margin-top: 20px;
}

.story-space-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.story-space-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #d4d9de;
}

.story-company-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 7vw, 112px);
}

.story-company-stage img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #000000;
}

.story-company-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 48px;
    margin: 64px 0 0;
    padding: 0;
    list-style: none;
}

.story-company-list li {
    border-bottom: 1px solid #d4d9de;
}

.story-company-list a {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 76px;
    padding-block: 18px;
    color: inherit;
    text-decoration: none;
}

.story-company-list a > span:first-child {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
}

.story-company-genre {
    color: var(--story-muted);
    font-size: 16px;
}

.story-history {
    background: #f7f6f3;
}

.story-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.story-timeline li {
    padding-block: 40px;
    border-top: 1px solid #d5d3ce;
}

.story-timeline li:first-child {
    padding-top: 0;
    border-top: 0;
}

.story-timeline li:last-child {
    padding-bottom: 0;
}

.story-timeline .story-year {
    margin-bottom: 20px;
    font-size: clamp(52px, 6.5vw, 88px);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.story-timeline h3 {
    font-size: 24px;
}

.story-timeline p:not(.story-year) {
    margin-top: 16px;
    color: var(--story-muted);
}

.story-identity {
    --story-muted: #c1c8d0;
    color: #ffffff;
    background: #171b22;
}

.story-identity .story-link {
    margin-top: 24px;
}

.story-identity-channels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 7vw, 112px);
    margin-top: 88px;
}

.story-identity-channel {
    min-width: 0;
}

.story-identity-symbol {
    display: block;
    width: 100%;
    max-width: 290px;
    aspect-ratio: 1;
    margin-bottom: 32px;
}

.story-identity-sky .story-identity-symbol {
    border-radius: 50%;
    background: var(--sky);
}

.story-identity-earth .story-identity-symbol {
    background: var(--earth);
    clip-path: polygon(0 55%, 100% 55%, 100% 85%, 0 85%);
}

.story-identity-human .story-identity-symbol {
    background: var(--human);
    clip-path: polygon(40% 0, 60% 0, 100% 100%, 75% 100%, 50% 38%, 25% 100%, 0 100%);
}

.story-identity-channel strong {
    display: block;
    font-size: 26px;
    font-weight: 500;
}

.story-identity-channel > span:last-child {
    display: block;
    margin-top: 8px;
    color: var(--story-muted);
    font-size: 18px;
}

.story-value-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 64px;
    margin-top: 64px;
}

.story-value-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 32px;
    border-top: 1px solid #d4d9de;
    color: inherit;
    text-decoration: none;
}

.story-value-links h3 {
    font-size: 26px;
}

.story-value-links p {
    margin-top: 12px;
    color: var(--story-muted);
}

.story-closing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
    margin-top: 88px;
    padding-top: 48px;
    border-top: 1px solid #d4d9de;
}

.story-closing > p {
    flex: 1 1 100%;
    margin-bottom: 12px;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.story-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 56px;
    padding: 14px 24px;
    background: var(--story-ink);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.sejong-story :is(a, button, input):focus-visible {
    outline: 3px solid #087895;
    outline-offset: 5px;
}

.story-identity a:focus-visible {
    outline-color: #72d6f1;
}

@media (hover: hover) and (pointer: fine) {
    .story-link:hover,
    .story-company-list a:hover > span:first-child,
    .story-value-links a:hover h3 {
        text-decoration: underline;
        text-underline-offset: 5px;
    }

    .story-scroll-button:hover {
        color: var(--story-accent);
    }

    .story-primary-link:hover {
        background: #303a47;
    }
}

/* [좁은 화면의 순서와 정적 대체 / Narrow layout and static fallback]
   이미지·본문·행동을 읽기 순서로 놓고 작은 화면에서는 고정을 해제합니다.
   Keep imagery, copy and actions in reading order and release sticky panels on phones. */
@media (max-width: 900px) {
    .story-opening-bottom,
    .story-section-heading,
    .story-company-stage {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .story-opening-bottom {
        justify-items: start;
    }

    .story-experience,
    .story-history-layout {
        gap: 48px;
    }

    .story-space-panel {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        align-items: start;
        gap: 28px;
    }

    .story-company-stage figure {
        max-width: 680px;
    }

    .story-company-list {
        gap: 0 28px;
    }
}

@media (max-width: 767px) {
    .story-opening {
        padding-block: 48px 36px;
    }

    .story-opening h1 {
        font-size: clamp(42px, 8.2vw, 60px);
    }

    .story-opening-bottom {
        margin-top: 28px;
        gap: 20px;
    }

    .story-opening-bottom p {
        font-size: 18px;
    }

    .sejong-story .story-kicker {
        margin-bottom: 18px;
    }

    .story-hero-frame {
        clip-path: none;
    }

    .story-hero-frame img {
        aspect-ratio: 5 / 4;
        transform: none;
        object-position: 46% center;
    }

    .story-scene {
        padding-block: 88px;
    }

    .story-experience,
    .story-history-layout,
    .story-space-panel,
    .story-company-list,
    .story-value-links {
        grid-template-columns: minmax(0, 1fr);
    }

    .story-sticky-copy {
        position: static;
    }

    .story-experience-list > article:first-child {
        padding-top: 32px;
        border-top: 1px solid #d4d9de;
    }

    .story-space-picker {
        margin-top: 36px;
        gap: 8px 20px;
    }

    .story-space-choice {
        flex-basis: calc(50% - 10px);
    }

    .story-space-copy .story-kicker {
        margin-bottom: 12px;
    }

    .story-company-list {
        margin-top: 40px;
    }

    .story-identity-channels {
        gap: 20px;
        margin-top: 48px;
    }

    .story-identity-symbol {
        margin-bottom: 24px;
    }

    .story-identity-channel strong {
        font-size: 22px;
    }

    .story-identity-channel > span:last-child {
        font-size: 16px;
    }

    .story-value-links {
        margin-top: 40px;
    }

    .story-value-links a {
        padding-block: 28px;
    }

    .story-closing {
        margin-top: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-hero-frame {
        clip-path: none;
    }

    .story-hero-frame img {
        transform: none;
    }

    .story-emphasis {
        transition: none;
    }

    .story-sticky-copy {
        position: static;
    }
}
