/* The collections and the home gallery share the site's paper and forest palette. */
@media screen {
  body.fd-forma .collection .section-heading,
  body.fd-forma .gallery-section .gallery-heading {align-items: end; gap: clamp(20px, 5vw, 100px);}
  body.fd-forma :is(.collection, .gallery-section) .section-heading h2 {
    font: 400 clamp(36px, 4.2vw, 68px)/1.02 var(--linen-serif) !important;
    text-transform: none; letter-spacing: -.05em !important;
  }
  body.fd-forma .collection {background: #faf8f2 !important;}
  body.fd-forma .collection .category-grid {
    display: grid; grid-template-columns: repeat(12, minmax(0,1fr));
    grid-auto-rows: auto; gap: clamp(12px, 1.55vw, 25px);
  }
  body.fd-forma .collection .category-card {
    grid-column: span 3; grid-template: "photo" auto "caption" 1fr / 1fr;
    border: 1px solid var(--linen-line) !important; min-width: 0;
  }
  body.fd-forma .collection .category-card>img {
    grid-area: photo; position: static; width: 100%; height: auto; aspect-ratio: 1.22;
    min-height: 0; object-fit: cover; align-self: stretch;
  }
  body.fd-forma .collection .category-caption {
    grid-area: caption; display: flex; flex-direction: column; align-items: flex-start;
    width: auto; align-self: stretch; padding: clamp(16px, 1.65vw, 28px);
    background: #fffdf8; border: 0;
  }
  body.fd-forma .collection .category-caption small {
    display: block; color: #646652; font-size: 10px; letter-spacing: .1em; margin: 0 0 8px;
  }
  body.fd-forma .collection .category-caption b {min-height: 0; margin-bottom: 20px;}
  body.fd-forma .collection .category-link {
    display: flex; width: 100%; gap: 8px; align-items: center; justify-content: space-between;
    margin: auto 0 0; padding-top: 12px; border-top: 1px solid #d5d0c4;
    font: 550 12px/1.4 var(--fr-sans); letter-spacing: 0; text-transform: none;
  }
  body.fd-forma .collection .category-card.category-wide {
    grid-column: span 6; grid-template: "cover" minmax(300px,1fr) / minmax(0,1fr);
    isolation: isolate; background: #29322b !important; border-color: #686b5c !important;
  }
  body.fd-forma .collection .category-wide>img {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
    aspect-ratio: auto; object-position: center 55%;
  }
  body.fd-forma .collection .category-wide .category-caption {
    grid-area: cover; position: relative; z-index: 1; align-self: end; inset: auto;
    padding: 50px clamp(18px,2vw,34px) clamp(18px,2vw,32px);
    background: linear-gradient(transparent, #17211be8 65%, #17211bf2);
  }
  body.fd-forma .collection .category-wide .category-caption :is(small,b,.category-link) {color: white !important;}
  body.fd-forma .collection .category-wide .category-caption b {font-size: clamp(30px,3.1vw,48px) !important; margin-bottom: 10px;}
  body.fd-forma .collection .category-wide .category-link {border-color: #ffffff70;}
  body.fd-forma .collection .category-wide .fd-photo-mark {z-index: 2;}

  body.fd-forma #galeria {
    background: #29352e !important; color: #f7f4eb;
    padding-block: clamp(46px,6vw,96px);
  }
  body.fd-forma #galeria .gallery-heading h2 {color: #fffaf1 !important;}
  body.fd-forma #galeria .gallery-heading :is(.eyebrow,.heading-copy) {color: #e1e4d8 !important;}
  body.fd-forma #galeria .gallery-heading .eyebrow>span {background: #cfb78a;}
  body.fd-forma #galeria .fd-studio-tools {
    padding-block: 12px; margin-bottom: 20px; border-block: 1px solid #778478;
    gap: 8px 20px;
  }
  body.fd-forma #galeria .gallery-filters {display: flex; flex-wrap: wrap; gap: 4px;}
  body.fd-forma #galeria .filter {
    min-height: 44px; padding: 9px 14px; font: 550 13px/1.3 var(--fr-sans);
    letter-spacing: 0; text-transform: none; color: #f6f3e8 !important;
    border: 1px solid transparent !important; border-radius: 0; background: transparent !important;
  }
  body.fd-forma #galeria .filter[aria-pressed=true] {background: #f5efdf !important; color: #29352e !important;}
  body.fd-forma #galeria .fd-board-jump {color: #fffaf1 !important; gap: 6px;}
  body.fd-forma #galeria .gallery-grid {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: auto;
    grid-auto-flow: row; gap: clamp(14px,2vw,32px);
  }
  .fd-folio-card {position: relative; min-width: 0; isolation: isolate;}
  .fd-folio-card:has(>.gallery-tile[hidden]) {display: none;}
  body.fd-forma #galeria .fd-folio-card>.gallery-tile {
    display: grid; grid-template-rows: auto 1fr; height: 100%; padding: 0;
    border: 0; background: #f4f0e7; color: #233028;
  }
  body.fd-forma #galeria .gallery-tile::after,
  body.fd-forma #galeria .gallery-tile.fd-idea-saved::before,
  body.fd-forma #galeria .fr-gallery-number {display: none;}
  body.fd-forma #galeria .gallery-tile>img {
    display: block; width: 100%; height: auto; aspect-ratio: 1.55;
    object-fit: cover; object-position: center; filter: none !important; transform: none;
    background: #ede8dc;
  }
  body.fd-forma #galeria .gallery-tile.fd-object>img {object-fit: contain; padding: 8px; box-sizing: border-box; background: #f7f5ef;}
  body.fd-forma #galeria .tile-caption {
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: center;
    position: relative; inset: auto; padding: clamp(13px,1.4vw,23px); gap: 4px 12px;
    color: #233028; background: #f4f0e7; text-shadow: none; text-transform: none;
  }
  body.fd-forma #galeria .tile-caption small {
    grid-column: 1; font: 550 11px/1.4 var(--fr-sans); letter-spacing: .035em; color: #545d50;
  }
  body.fd-forma #galeria .tile-caption strong {
    grid-column: 1; font: 400 clamp(19px,1.65vw,28px)/1.12 var(--linen-serif); letter-spacing: -.03em;
  }
  body.fd-forma #galeria .tile-caption i {
    grid-column: 2; grid-row: 1/3; align-self: center; display: grid; place-items: center;
    border: 1px solid #b6b7a9; background: transparent; color: #354b3d;
    width: 32px; height: 32px; border-radius: 50%;
  }
  body.fd-forma #galeria .tile-caption i svg {stroke: currentColor; width: 17px; height: 17px;}
  body.fd-forma #galeria .fd-folio-save {
    position: absolute; z-index: 2; top: 10px; right: 10px; display: inline-flex;
    align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px;
    background: #fffdf8; border: 1px solid #a6aa9b; color: #28392f; padding: 7px 10px;
    font: 550 12px/1.3 var(--fr-sans); cursor: pointer; border-radius: 3px;
  }
  body.fd-forma #galeria .fd-folio-save svg {width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5;}
  body.fd-forma #galeria .fd-folio-save[aria-pressed=true] {background: #25362a; color: white; border-color: #faf5e8;}
  body.fd-forma #galeria .fd-folio-save[aria-pressed=true] svg {fill: currentColor;}
  body.fd-forma #galeria .gallery-foot {border-color: #778478;}
  body.fd-forma #galeria .gallery-foot :is(span,a,svg) {color: #f6f1e3 !important;}
  body.fd-forma #galeria .fd-board {color: #253128; background: #f4f0e7;}
  body.fd-forma #galeria :is(a,button):focus-visible {outline: 3px solid #e9be75 !important; outline-offset: 2px; box-shadow: 0 0 0 2px #253128;}
  body.fd-forma .lightbox .fr-gallery-shell {background: #26332c;}
  body.fd-forma .lightbox .fr-lightbox-stage {background: #19231d;}
  body.fd-forma .lightbox .fr-lightbox-title {
    color: #fff8e8 !important; font: 400 clamp(24px,2.2vw,38px)/1.1 var(--linen-serif) !important;
    letter-spacing: -.035em !important; text-transform: none;
  }
  body.fd-forma .lightbox .fd-photo-save {color: #fffaf1; border-color: #b6bea9;}
  body.fd-forma .lightbox .fd-photo-save[aria-pressed=true] {background: #eee8da; color: #243128;}
  body.fd-forma #kollekciok .fr-collection-card {border-color: #d1ccbe !important;}
  body.fd-forma #kollekciok .fr-collection-card .cardbody {border-top: 2px solid #b8ab91; gap: 0;}
  body.fd-forma #kollekciok .fr-collection-card .cardbody h3 a {text-transform: none;}
  body.fd-forma #kollekciok .fr-collection-card .arrow {min-height: 44px; align-items: center; padding-top: 8px;}
  body.fd-forma #kollekciok .fr-collection-search {border-color: #c1bba9; background: #fffdf8;}
  body.fd-forma #kollekciok .fr-collection-filters button[aria-pressed=true] {background: #29382e !important; color: #fffdf6 !important;}
}
@media screen and (min-width: 1001px) {
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered) {grid-template-columns: repeat(4,minmax(0,1fr));}
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-feature {grid-column: span 2; grid-row: span 2;}
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-feature .gallery-tile {display: block;}
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-feature img {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;}
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-feature .tile-caption {position: absolute; inset: auto 16px 16px; background: #f4f0e7f5;}
}
@media screen and (max-width: 1000px) {
  body.fd-forma .collection .category-grid {grid-template-columns: repeat(2,minmax(0,1fr));}
  body.fd-forma .collection .category-card,
  body.fd-forma .collection .category-card.category-wide {grid-column: auto;}
  body.fd-forma .collection .category-card.category-wide {grid-template-rows: minmax(240px,1fr);}
  body.fd-forma #galeria .gallery-grid {grid-template-columns: repeat(2,minmax(0,1fr));}
}
@media screen and (max-width: 620px) {
  body.fd-forma .collection .category-grid {grid-template-columns: minmax(0,1fr);}
  body.fd-forma .collection .category-card:not(.category-wide) {grid-template: "photo caption" auto / 36% minmax(0,1fr); min-height: 138px;}
  body.fd-forma .collection .category-card:not(.category-wide)>img {width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; position: absolute; inset: 0;}
  body.fd-forma .collection .category-card:not(.category-wide) .fd-photo-mark {left: 8px; right: auto; top: 8px;}
  body.fd-forma .collection .category-card:not(.category-wide) .category-caption {padding: 14px;}
  body.fd-forma .collection .category-card:not(.category-wide) .category-caption small {font-size: 9px;}
  body.fd-forma .collection .category-card.category-wide {grid-template-rows: clamp(224px,62vw,320px);}
  body.fd-forma #galeria .gallery-grid {gap: 11px;}
  body.fd-forma #galeria .fd-studio-tools {gap: 6px;}
  body.fd-forma #galeria .filter {padding: 9px 10px;}
  body.fd-forma #galeria .fd-folio-save {top: 6px; right: 6px; padding: 4px 6px; gap: 4px; font-size: 11px;}
  body.fd-forma #galeria .gallery-tile>img {aspect-ratio: 1.08;}
  body.fd-forma #galeria .tile-caption {padding: 11px 9px; gap: 4px;}
  body.fd-forma #galeria .tile-caption i {display: none;}
  body.fd-forma #galeria .tile-caption small {font-size: 10px;}
  body.fd-forma #galeria .tile-caption strong {font-size: 18px;}
}
@media screen and (max-width: 360px) {
  body.fd-forma #galeria .fd-folio-save span {display: none;}
}
@media screen and (hover:hover) {
  body.fd-forma #galeria .filter:hover {border-color: #afb6a4 !important;}
  body.fd-forma #galeria .gallery-tile:hover .tile-caption {background: #e6decc;}
  body.fd-forma .collection .category-card:not(.category-wide):hover .category-caption {background: #f2eee4;}
}
@media screen and (hover:hover) and (prefers-reduced-motion:no-preference) {
  body.fd-forma #galeria .tile-caption i {transition: transform .2s ease-out;}
  body.fd-forma #galeria .gallery-tile:hover .tile-caption i {transform: scale(1.1);}
}
@media (forced-colors:active) {
  body.fd-forma #galeria button[aria-pressed=true] {outline: 2px solid ButtonText;}
}
@media screen and (min-width: 1001px) {
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-card:nth-last-child(-n+2) {grid-column: span 2;}
  body.fd-forma #galeria .gallery-grid:not(.fr-filtered)>.fd-folio-card:nth-last-child(-n+2) img {aspect-ratio: 2.6;}
}
@media screen {
  body.fd-forma #kollekciok .cardbody>small {display: flex; align-items: center; gap: 9px; font-size: 11px; color: #435140;}
  body.fd-forma #kollekciok .cardbody .fd-material-mark {
    position: static; display: inline-grid; place-items: center; flex: none;
    width: 34px; height: 34px; min-width: 0; min-height: 0; background: #eee9dc;
    color: #344639; border: 1px solid #c5bca8; box-shadow: none;
  }
  body.fd-forma #kollekciok .cardbody .fd-material-mark svg {width: 25px; height: 25px;}
}
