/* Foundry Gallery shares DFVN's native palette, header, footer and theme picker. */
.foundry-page{padding-block:var(--page-start-space) var(--space);min-width:0}
.foundry-directory{padding-block-start:22px}
.foundry-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:24px;color:var(--muted);font-size:var(--type-small-size)}
.foundry-hero{display:grid;grid-template-columns:.8fr 1.2fr;gap:16px}
.foundry-hero:not(:has(.foundry-cover)){grid-template-columns:1fr}
.foundry-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:24px;padding:clamp(24px,4vw,64px);border-radius:var(--card-radius);background:var(--surface);min-width:0}
.foundry-copy h1{margin:0;font-size:clamp(48px,7.2vw,113px);font-weight:var(--font-heading);line-height:1;letter-spacing:-.055em;overflow-wrap:anywhere}
.foundry-intro{font-size:var(--lead-size);line-height:var(--lead-leading);max-width:32ch;color:var(--muted)}.foundry-intro p{margin:0}.foundry-intro p+p{margin-top:12px}
.foundry-cover{position:relative;min-width:0;display:flex;flex-direction:column}.foundry-cover img{display:block;width:100%;height:100%;min-height:360px;object-fit:cover}
.foundry-catalog{padding-top:clamp(48px,7vw,100px);scroll-margin-top:var(--header-height)}
.foundry-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding-bottom:24px;margin-bottom:28px;border-bottom:1px solid var(--line)}
.foundry-section-head h2{font-size:var(--section-title-size);font-weight:var(--font-heading);line-height:1.08;letter-spacing:-.04em;margin:0;overflow-wrap:anywhere}.foundry-section-head>span{color:var(--muted);font-size:var(--type-copy-size);white-space:nowrap}
.foundry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(30px,3.5vw,52px) clamp(20px,2.8vw,40px)}
.foundry-tile{min-width:0}.foundry-tile .card-meta h3{font-size:clamp(20px,2vw,28px);font-weight:var(--font-medium);line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere}
.foundry-featured-visual{position:relative;flex:1;min-height:0;--card-tool-inset:clamp(16px,2vw,28px)}.foundry-featured-art{display:block;width:100%;height:100%;aspect-ratio:auto;overflow:hidden;border-radius:var(--card-radius)}.foundry-featured-name{position:absolute;z-index:4;right:0;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:44%;min-height:52px;padding:14px 12px 0 24px;border-top-left-radius:24px;background:var(--bg);color:var(--ink);font-size:var(--type-copy-size);font-weight:var(--font-medium);line-height:1.35;overflow-wrap:anywhere}
.foundry-featured-name::before,.foundry-featured-name::after{content:"";position:absolute;width:24px;height:24px;pointer-events:none;background:radial-gradient(circle at 0 0,transparent 24px,var(--bg) 24.5px)}
.foundry-featured-name::before{right:0;bottom:100%}.foundry-featured-name::after{right:100%;bottom:0}
.foundry-featured-visual:has(.foundry-featured-name:is(:hover,:focus-visible)):not(:has(.card-cart:hover)) .foundry-featured-art::after{opacity:0;transition:none}
.foundry-featured-visual:has(.foundry-featured-name:is(:hover,:focus-visible)) .foundry-featured-art img{transform:none}
.foundry-featured-name:is(:hover,:focus-visible){opacity:1;background:var(--bg)}
@media(prefers-reduced-motion:no-preference){
 .foundry-featured-name .dfvn-icon{transition:transform 180ms ease}
 .foundry-featured-name:is(:hover,:focus-visible) .dfvn-icon{transform:translateX(4px)}
}
@media(max-width:900px){
 .foundry-featured-name{max-width:calc(100% - 100px)}
 .foundry-featured-visual .card-cart{left:var(--card-tool-inset);transform:none;align-items:flex-start}
 .foundry-featured-visual .card-cart-tooltip{left:0;transform:none;max-width:min(240px,70vw)}
 .foundry-featured-visual .card-cart-status{left:0;transform:none}
}
.foundry-featured-name .dfvn-icon{flex-shrink:0}.foundry-status{font-size:var(--type-copy-size);color:var(--muted)}.foundry-status:empty{display:none}.foundry-catalog [aria-busy=true]{opacity:.6;pointer-events:none}
.foundry-art-fallback{display:grid;place-items:center;min-height:250px;padding:24px;font-size:clamp(24px,4vw,56px);overflow-wrap:anywhere}
.foundry-directory-heading{--studio-gradient-ink:#f7f7f2;--studio-gradient-mask:#13132db3;position:relative;isolation:isolate;overflow:hidden;margin-bottom:clamp(36px,4vw,60px);padding:64px 56px 44px;border-radius:28px;background:var(--studio-gradient-base);color:var(--studio-gradient-ink)}
.foundry-directory-heading::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,var(--studio-gradient-mask),transparent 78%)}
.foundry-directory-heading>.studio-ambient{border-radius:inherit}
.foundry-directory-heading h1{font-size:var(--page-title-size);line-height:var(--page-title-leading);margin:var(--eyebrow-title-gap) 0 var(--title-lead-gap)}
.foundry-directory-heading p{color:#d9d5e2;margin:0;font-size:var(--lead-size);line-height:var(--lead-leading)}
.foundry-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px clamp(18px,2.4vw,36px)}
.foundry-directory-grid.is-list{grid-template-columns:1fr;gap:0;max-width:960px;margin-inline:auto}
.foundry-directory-card a{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:18px;min-height:96px;height:100%;padding:16px clamp(16px,2vw,28px);border:0;border-radius:20px;background:var(--surface);color:var(--ink);text-decoration:none}
.foundry-directory-card a:is(:hover,:focus-visible){background:color-mix(in srgb,var(--surface) 90%,var(--ink));opacity:1}
.foundry-directory-pagination{margin-top:clamp(28px,4vw,52px)}
@media(prefers-reduced-motion:no-preference){
 .foundry-directory-card a{transition:background-color 180ms ease,transform 180ms ease}
 .foundry-directory-card a>.dfvn-icon{transition:transform 180ms ease}
 .foundry-directory-card a:is(:hover,:focus-visible){transform:translateY(-2px)}
 .foundry-directory-card a:is(:hover,:focus-visible)>.dfvn-icon{transform:translateX(5px)}
}
.foundry-directory-card h2{margin:0;font-size:clamp(18px,1.55vw,23px);line-height:1.25;overflow-wrap:anywhere}
.foundry-directory-label>span{display:block;margin-top:5px;color:var(--muted);font-size:var(--type-meta-size)}
.foundry-directory-mark{display:grid;place-items:center;width:56px;height:56px;overflow:hidden;border-radius:14px;background:var(--bg);font-size:24px;font-weight:var(--font-heading)}
.foundry-directory-mark img{width:100%;height:100%;object-fit:contain}
.foundry-directory-grid.is-list .foundry-directory-card a{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.foundry-directory-grid.is-list .foundry-directory-card a:hover{background:var(--surface)}
.foundry-directory-grid.is-list .foundry-directory-mark{border-radius:50%;background:var(--surface)}
@media(max-width:1100px){.foundry-directory-heading{padding:44px 34px}}
@media(max-width:580px){.foundry-directory-heading{padding:33px 25px 30px;border-radius:20px}}
@media(max-width:680px){.foundry-hero,.foundry-grid{grid-template-columns:1fr}.foundry-cover img{min-height:0;aspect-ratio:1810/1213}.foundry-section-head{align-items:flex-start;flex-direction:column;gap:12px}}

.foundry-directory-label>.foundry-directory-featured{display:inline-block;margin-top:7px;padding:3px 8px;border-radius:var(--pill);background:var(--bg);color:var(--ink);font-size:var(--type-caption-size);font-weight:var(--font-medium)}
