@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ===========================
   Accent (item page default)
   Per-project accent can be overridden via item.theme.key (inline --color-key)
   =========================== */
#contents-cover,
#contents-inner.item {
    --color-key: #9aa0ab;
}

/* Desktop: keep the case study in a comfortable reading column
   (shared container is up to 2560px, which is far too wide for prose/figures) */
body.contents-cover #contents-inner.item {
    max-width: 1040px;
}

/* Centered editorial layout: titles, prose, and figures sit on a single axis;
   card/list internals stay left-aligned for readability */
#contents-inner.item .item-section {
    text-align: center;
}

#contents-inner.item .item-lead,
#contents-inner.item .item-figure,
#contents-inner.item .item-slider {
    margin-left: auto;
    margin-right: auto;
}

#contents-inner.item .item-feature,
#contents-inner.item .item-level,
#contents-inner.item #item-meta li,
#contents-inner.item #item-news,
#contents-inner.item .item-award {
    text-align: left;
}

/* ===========================
   Cover
   =========================== */
#contents-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
    text-align: center;
    padding: 0 var(--padding);
}

#item-cover-inner {
    max-width: var(--contents-max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    will-change: opacity;
}

/* Scroll parallax layers: each cover line drifts at its own depth.
   Wrapping keeps the entry rise animation (on the inner element) from
   colliding with the scroll transform (applied here on the layer). */
.item-cover-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform;
    transform-origin: center top;
}

#item-cover-title {
    font-family: "Shrikhand", sans-serif;
    font-weight: 500;
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 1.1;
    margin: 0;
    padding: 0.04em 0.12em 0.12em;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, var(--color-text) 30%, var(--color-key));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(24px);
}

#item-cover-tagline {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.6vw, 1.5rem);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
}

#item-cover-desc {
    max-width: 40ch;
    font-weight: 300;
    opacity: 0;
    transform: translateY(16px);
    color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg));
}

body.contents-loaded #item-cover-title {
    animation: item-rise 1.1s var(--easing-fast) forwards;
    animation-delay: 0.05s;
}

body.contents-loaded #item-cover-tagline {
    animation: item-rise 1.1s var(--easing-fast) forwards;
    animation-delay: 0.25s;
}

body.contents-loaded #item-cover-desc {
    animation: item-rise 1.1s var(--easing-fast) forwards;
    animation-delay: 0.4s;
}

@keyframes item-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Contents - shared
   =========================== */
#contents-inner.item h2 {
    font-family: "Pretendard", Pretendard, sans-serif;
    font-synthesis: none;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 1.2rem 0;
    letter-spacing: -0.01em;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.item-section {
    margin: calc(var(--gap) * 2.5) 0;
}

/* Korean-friendly line breaking: break at phrase boundaries, not mid-word */
#contents-inner.item p,
#contents-inner.item h3,
#contents-inner.item figcaption {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.item-lead {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 300;
    max-width: 70ch;
    color: color-mix(in srgb, var(--color-text) 92%, var(--color-bg));
}

/* ===========================
   Figure / Screenshot
   =========================== */
.item-figure {
    margin: calc(var(--gap) * 1.6) 0 0 0;
    max-width: min(100%, 980px);
}

.item-shot {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 18px 44px -34px rgba(0, 0, 0, 0.5);
}

.item-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.item-figure figcaption {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    font-weight: 300;
    text-align: center;
    color: color-mix(in srgb, var(--color-text) 60%, var(--color-bg));
}

.item-gallery {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap) * 1.4);
    margin-top: calc(var(--gap) * 1.6);
}

.item-gallery .item-figure {
    margin: 0;
}

/* ===========================
   Concept Slider
   =========================== */
.item-slider {
    margin: calc(var(--gap) * 2) auto 0;
    max-width: min(100%, 980px);
}

.item-slider-frame {
    position: relative;
    aspect-ratio: 1893 / 1055;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 70px -48px rgba(0, 0, 0, 0.6);
}

.item-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.item-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.item-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-bg) 65%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--color-text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.item-slider-nav.prev {
    left: 0.8rem;
}

.item-slider-nav.next {
    right: 0.8rem;
}

.item-slider-nav:hover {
    border-color: var(--color-key);
    background: color-mix(in srgb, var(--color-bg) 80%, transparent);
}

.item-slider-foot {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.9rem;
}

.item-slider-caption {
    position: relative;
    min-height: 2.6em;
}

.item-slide-caption {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.5;
    text-align: center;
    color: color-mix(in srgb, var(--color-text) 60%, var(--color-bg));
    transition: opacity 0.4s ease;
}

.item-slide-caption.is-active {
    opacity: 1;
}

.item-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.item-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.item-dot:hover {
    background: color-mix(in srgb, var(--color-key) 60%, var(--color-border));
}

.item-dot.is-active {
    background: var(--color-key);
    transform: scale(1.3);
}

/* ===========================
   Meta
   =========================== */
#item-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2.6rem;
    margin: calc(var(--gap) * 1.5) auto calc(var(--gap) * 2);
}

#item-meta li {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.item-meta-label {
    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-key);
}

.item-meta-value {
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===========================
   Slogan
   =========================== */
#item-slogan {
    position: relative;
    text-align: center;
    margin: calc(var(--gap) * 4) auto;
    max-width: min(100%, 44rem);
}

#item-slogan::before {
    content: "\201C";
    display: block;
    font-family: "Shrikhand", Georgia, serif;
    font-size: clamp(3rem, 7vw, 4.6rem);
    line-height: 0.7;
    margin-bottom: 0.3rem;
    color: var(--color-key);
    opacity: 0.5;
    pointer-events: none;
}

.item-slogan-main {
    font-family: "Pretendard", Pretendard, sans-serif;
    font-synthesis: none;
    font-weight: 600;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    line-height: 1.5;
    letter-spacing: -0.015em;
    margin: 0 0 0.9rem 0;
    color: var(--color-text);
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.item-slogan-sub {
    font-weight: 300;
    opacity: 0.65;
    margin: 0 auto;
    max-width: 36ch;
    line-height: 1.7;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-wrap: balance;
}

/* ===========================
   Features
   =========================== */
#item-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
    margin-top: var(--gap);
}

.item-feature {
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--color-border);
}

.item-feature-num {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--color-key);
    margin-bottom: 1rem;
}

.item-feature h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 0.6rem 0;
}

.item-feature p {
    margin: 0;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--color-text) 82%, var(--color-bg));
}

/* ===========================
   Data Structure
   =========================== */
.item-structure-caption {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-key);
    margin-bottom: 1.2rem;
}

#item-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--gap);
}

.item-level {
    width: 100%;
    max-width: 460px;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.item-level:last-of-type {
    border-bottom: none;
}

.item-level-head {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 0.4rem;
}

.item-level-tag {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
}

.item-level-name {
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    color: var(--color-key);
}

.item-level-desc {
    margin: 0;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--color-text) 82%, var(--color-bg));
}

/* ===========================
   Awards
   =========================== */
#item-awards {
    display: flex;
    flex-direction: column;
    max-width: 560px;
    margin: var(--gap) auto 0;
}

.item-award {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.item-award:last-child {
    border-bottom: none;
}

.item-award-mark {
    flex: 0 0 auto;
    width: 2.4rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--color-key);
}

.item-award-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    color: var(--color-key);
}

.item-award-logo svg {
    display: block;
    width: auto;
    height: 2rem;
    max-width: 3.4rem;
    fill: currentColor;
}

.item-award-title {
    font-weight: 400;
    line-height: 1.45;
    color: color-mix(in srgb, var(--color-text) 88%, var(--color-bg));
}

/* ===========================
   News
   =========================== */
#item-news {
    position: relative;
    max-width: 600px;
    margin: var(--gap) auto 0;
    padding: 0;
}

.item-news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 1rem;
    margin-bottom: 1.2rem;
}

.item-news-source {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.item-news-tagline {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-key);
}

#item-news blockquote {
    margin: 0;
}

#item-news blockquote p {
    margin: 0 0 0.9rem 0;
    font-weight: 300;
    line-height: 1.8;
}

#item-news blockquote p:first-child {
    font-weight: 500;
    font-size: 1.1rem;
}

#item-news blockquote p:last-child {
    margin-bottom: 0;
}

/* ===========================
   Closing
   =========================== */
#item-closing {
    text-align: center;
    max-width: 60ch;
    margin: calc(var(--gap) * 3) auto calc(var(--gap) * 2);
}

#item-closing p {
    font-weight: 300;
    line-height: 1.8;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.item-sign {
    margin-top: 1.5rem !important;
    font-family: "Shrikhand", "Pretendard", Pretendard, sans-serif;
    font-synthesis: none;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--color-key);
}

/* ===========================
   Scroll reveal
   =========================== */
.item-section,
#item-slogan,
#item-closing,
#item-meta {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--easing-fast), transform 0.8s var(--easing-fast);
}

.item-section.item-revealed,
#item-slogan.item-revealed,
#item-closing.item-revealed,
#item-meta.item-revealed {
    opacity: 1;
    transform: translateY(0);
}
