/* The portfolio pages use the same proportions as the original studio boards.
   A transparent subject sits over a smaller mat; a photo occupies its crop. */
.container.project-index,
.container.project-case,
.container.collaboration-case,
.container.mag-index,
.container.mag-detail,
.container.st-app-page,
.container.st-about-page,
.container:has(> .contact-layout) {
    max-width: 1064px;
}
.project-index .page-intro,
.mag-masthead,
.st-app-page .st-intro { margin-bottom: 20px; }
.project-index .page-intro h1,
.mag-masthead h1,
.st-app-page .st-intro h1 { font-size: clamp(34px, 4vw, 48px); }
.project-index .filter-controls {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.project-index .filter-controls :is(input, select, .button),
.mag-search { border-radius: 12px; }
.project-index .filter-controls select { background-color: var(--soft); }
.project-index .results-count { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-block: 13px 17px; }
.project-index .project-grid { align-items: stretch; gap: clamp(14px, 2vw, 24px); }
.project-index .project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.project-index .project-card .project-media { --project-image-height: clamp(194px, 23vw, 257px); }
.project-index .project-card .project-caption { gap: 3px; padding: 11px 10px 8px; }
.project-index .project-caption h3 { font-size: clamp(19px, 2vw, 25px); line-height: 1.45; }
.project-index .project-card .project-summary { font-size: 15px; line-height: 1.65; }
.project-index .project-card .project-meta { padding-top: 4px; font-size: 14px; }
.project-index .project-card:has(.project-media) .project-meta .badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    inset-inline-end: 12px;
    padding: 4px 10px;
    font-size: 12px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 65%, transparent);
}
.project-index .project-card .round-arrow { width: 35px; height: 35px; inset-inline-end: 2px; bottom: 0; }
.project-index .project-card:not(.has-cutout) .project-media { width: 100%; }
.project-index .project-card:not(.has-cutout) .project-photo {
    width: 100%;
    aspect-ratio: 1.95;
    height: auto;
    object-fit: cover;
    border: 0;
    border-radius: 15px;
}
.project-index .project-card.cover-top .project-photo { object-position: top; }
.project-index .project-card:not(.has-cutout) .round-arrow { inset-inline-end: 8px; bottom: -8px; }
.project-index .empty-state { border: 1px solid var(--line); border-radius: 20px; background: var(--soft); }

.project-case .project-details,
.collaboration-case .project-details {
    padding: 20px 0;
    border: 0;
    border-block: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.project-case .project-details > :nth-child(2),
.collaboration-case .project-details > :nth-child(2) { border-inline-start: 1px solid var(--line); padding-inline-start: clamp(18px, 3vw, 38px); }
.project-case .project-details h2,
.collaboration-case .project-details h2 { font-size: clamp(20px, 2vw, 25px); }
.project-case .cta-band { padding: clamp(16px, 2.8vw, 27px); }
.project-case .cta-band h2 { font-size: clamp(20px, 2.4vw, 30px); }
.project-case .notice { margin-block: 20px; }
.project-case .project-media-note { max-width: 74ch; }
.container.project-case.film-case { max-width: 880px; }
.film-case .project-case-hero { display: block; padding-bottom: 18px; }
.film-case .project-case-hero .page-intro { max-width: 720px; }
.film-presentation { margin-block: 0 20px; }
.film-poster {
    display: grid;
    place-items: center;
    overflow: hidden;
    height: clamp(190px, 30vw, 325px);
    border-radius: 18px;
    background: radial-gradient(ellipse at 55% 73%, #494a3b, #242924 68%);
}
.film-poster img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; min-height: 0; }
.film-presentation .project-video { width: 100%; border-radius: 18px; display: block; max-height: min(68vh, 500px); }
.film-watch { display: flex; width: 100%; gap: 10px; margin-top: 10px; justify-content: center; }
.film-watch .icon:last-child { width: 16px; height: 16px; }
.collaboration-case .collaboration-deliverables { gap: 14px; }
.collaboration-case .collaboration-output { border-radius: 20px; padding: 12px; }
.collaboration-case .collaboration-output h2 { font-size: clamp(20px, 2vw, 26px); }

.st-product-list .st-product-row { padding: 14px 20px; gap: 0; box-shadow: var(--shadow); }
.st-product-list .st-product-row > div { margin-inline-start: clamp(12px,3vw,35px); padding-inline-start: clamp(12px,3vw,35px); border-inline-start: 1px solid var(--line); }
.st-product-list .st-product-row .application-cover { --project-image-height: clamp(120px,13vw,162px); }
.st-product-list .st-product-row .application-logo { inset-inline-start: 0; height: 40px; width: 68px; padding: 4px 7px; }
.st-product-list:nth-last-child(1) .st-product-row { background: var(--soft); }
.st-app-page .st-product-hero { padding-block: 22px 30px; border-bottom: 1px solid var(--line); }
.st-app-page .st-workflow { gap: 12px; }
.st-app-page .st-workflow li { background: linear-gradient(to bottom, var(--soft) 46px, var(--surface) 46px); border-radius: 16px; padding: 12px 16px; }
.st-app-page .st-workflow .st-icon { width: 25px; height: 25px; color: var(--ink); border: 0; background: none; font-weight: 650; }
.st-app-page #product-views .gallery-grid { gap: 14px; align-items: start; }
.st-app-page #product-views .gallery-item { border: 1px solid var(--line); background: var(--surface); padding: 8px; border-radius: 16px; min-width: 0; }
.st-app-page #product-views .gallery-item > img { max-height: 245px; width: 100%; object-fit: contain; background: var(--soft); border-radius: 11px; }
.st-app-page #product-views .gallery-item>span { text-align: start; padding: 8px; }
.st-app-page .st-product-status { padding: 17px 20px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }

.mag-index,.mag-detail { padding-top: clamp(24px, 3vw, 38px); }
.mag-masthead { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.mag-search { width: min(100%, 365px); border: 1px solid var(--line); }
.mag-search input { width: 100%; }
.mag-categories { margin-block: 8px 0; }
.mag-categories a { min-height: 42px; padding: 6px 13px; }
.mag-count { border: 0; margin-bottom: 6px; }
.mag-issue { padding: clamp(12px, 2vw, 22px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.mag-feature>h2,.mag-list-title { font-size: clamp(21px, 2.3vw, 28px); margin: 0 0 13px; }
.mag-issue .mag-grid { gap: 16px; }
.mag-feature .mag-lead { margin-bottom: 22px; }
.mag-feature .mag-lead>a { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.mag-feature .mag-lead .mag-tile-media { height: clamp(200px,22vw,255px); min-height: 0; }
.mag-feature .mag-lead .mag-tile-body { padding: clamp(16px,3vw,30px); }
.mag-issue .mag-tile:not(.mag-lead) .mag-tile-body { padding: 12px 16px; }
.mag-issue .mag-tile:not(.mag-lead) h2 { margin-block: 5px 12px; }
.mag-issue .mag-tile:not(.mag-lead) .mag-tile-media { aspect-ratio: 2.7; }
.mag-byline { gap: 5px; flex-wrap: wrap; }
.mag-byline time { direction: ltr; unicode-bidi: isolate; }
.mag-cover { border-radius: 20px; }
.mag-toc { padding: 0; border: 1px solid var(--line); border-radius: 16px; }
.mag-toc summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 15px;
    font-weight: 650;
    list-style: none;
}
.mag-toc summary::-webkit-details-marker { display:none; }
.mag-toc summary .icon:last-child { margin-inline-start: auto; }
.mag-toc[open] summary .icon:last-child { rotate: 180deg; }
.mag-toc nav { padding-inline: 15px; padding-bottom: 9px; }
.mag-prose section[id] { scroll-margin-top: 108px; }
.mag-prose section[id^='section-']>h2 { padding-inline-start: 9px; border-inline-start: 3px solid var(--accent); }
.mag-figure { background: var(--surface); }

.st-about-page .st-about-hero { gap: clamp(16px, 3vw, 45px); padding-bottom: 26px; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); }
.st-about-page .st-about-hero figure { margin: 0; min-width: 0; }
.st-about-page .st-about-hero figure img { height: auto; aspect-ratio: 1.55; object-position: 50% 60%; }
.st-about-page .st-process-box { border-inline: 0; border-radius: 0; box-shadow: none; padding-inline: 0; background: none; }
.st-about-page .st-roles article { border-top: 3px solid var(--accent); padding: 14px; }
.contact-layout .page-intro { margin: 0; }
.contact-layout .page-intro h1 { font-size: clamp(34px,4vw,50px); }
.contact-layout .page-intro p { font-size: 17px; }
.contact-layout .contact-art { max-width: 300px; margin: 10px auto; }
.contact-layout .contact-note { margin-top: 15px; }
.contact-layout .contact-note p { font-size: 15px; }
.contact-layout .form-panel { border-top: 4px solid var(--accent); border-radius: 20px; }

@media (max-width: 760px) {
    .project-case .project-details > :nth-child(2),
    .collaboration-case .project-details > :nth-child(2) { border-inline-start: 0; padding-inline-start: 0; }
    .st-about-page .st-about-hero { grid-template-columns: minmax(0, 1fr); }
    .st-about-page .st-about-hero figure img { aspect-ratio: 1.95; }
    .st-product-list .st-product-row { padding: 11px; }
    .st-app-page .st-workflow li { background: var(--surface); }
    .st-app-page .st-workflow .st-icon { border-radius: 8px; background: var(--soft); }
}
@media (max-width: 720px) {
    .mag-issue { background: transparent; border: 0; padding: 0; }
    .mag-count { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
    .mag-feature .mag-lead>a { display:flex; }
    .mag-feature .mag-lead .mag-tile-media { aspect-ratio: 2.4; height: auto; }
    .mag-issue .mag-tile { border-radius:16px; }
    .mag-toc { padding: 0; }
    .mag-search { margin: 0; }
}
@media (max-width: 640px) {
    .project-index .project-card .project-media { --project-image-height: clamp(177px,54vw,239px); }
    .project-index .project-card .project-summary { font-size: 15px; }
    .project-index .filter-tabs span { padding: 7px 10px; }
    .project-index .filter-controls { gap: 8px; }
    .project-index .filter-controls > .search-field { flex-basis: 100%; }
}
@media (max-width: 420px) {
    .st-product-list .st-product-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .st-product-list .st-product-row > div { margin-inline-start: 0; padding: 10px 2px 1px; border-inline-start: 0; border-top: 1px solid var(--line); }
    .st-product-list .st-product-row .application-cover { --project-image-height: 137px; }
    .mag-masthead, .mag-search { width: 100%; }
    .project-index .filter-tabs span { font-size: 13px; }
}
.film-poster.with-print { position: relative; isolation: isolate; }
.film-poster.with-print .film-atmosphere {
    position: absolute;
    z-index: -1;
    inset: -24px;
    width: calc(100% + 48px);
    max-width: none;
    height: calc(100% + 48px);
    max-height: none;
    object-fit: cover;
    filter: blur(16px) saturate(.7) brightness(.52);
}
.film-poster.with-print .film-image { position: relative; box-shadow: 0 4px 32px #0005; }
