/* Digital Projections: the portfolio page (portfolio.html), after css/base.css and css/site.css. Ported from
   pelland.com/portfolio.html: every site in a searchable grid on a warm stone paper, each opening larger in a viewer,
   under the page's title. (Until 2026-11-22 it opened with the title, a paragraph and the home page's showcase on a
   painted sunflower field: _backup/portfolio-2026-11-22-before-no-opening.*.) */

.folio-page .site-main { background-color: rgb(22,10,24); }

/* ---------- the grid ---------- */
/* On a warm stone paper (the long run's paper, its sheen and soft bevel, in a neutral that lets the sites' own colours
   lead): warm charcoal type, the label in the flag red (as "After you launch"), the chosen filter, the links and the
   button in the header's navy, and each site on a card of whiter paper. The colours are all here, as the theme. */
.site-main .folio-list {
  --paper: linear-gradient(180deg, #f2ebdf, #e4d8c6);         /* the paper: light at the top, a shade deeper at the foot */
  --ink: 51,42,33;                                             /* warm charcoal: headings, and (faded) lines and shadows */
  --ink-text: #4e4336; --ink-soft: #74685a;                    /* the words; the quieter ones (places, counts, labels) */
  --label: #b22234;                                            /* the section's label */
  --tone: #2a2370; --tone-deep: #16123a; --tone-rgb: 42,35,112;   /* the navy: the chosen filter, links, the button */
  --card: #fdfaf4; --shot: #ebe2d3;                            /* the cards' paper; behind a screenshot while it loads */
  padding-top: 88px; border-top: 0;
  background: var(--placard-sheen), var(--paper); box-shadow: var(--placard-tb);
}
.folio-inner { max-width: 1520px; margin: 0 auto; }
.folio-list h2 { color: rgb(var(--ink)); margin-bottom: 0; text-wrap: balance; }   /* (no word alone on its second line on phones) */
/* the page's title in the headline serif, in the navy (as What's New's, on the same paper), the line under it as before */
.folio-list h1 {
  margin: 0 0 14px; font-family: 'Projections Serif', Georgia, serif; font-weight: 600; font-size: clamp(42px, 4.6vw, 72px); line-height: 1.08;
  letter-spacing: 0; color: var(--tone);
}
@media (max-width: 1099px) { .folio-list h1 { font-weight: 650; } }
.folio-list :focus-visible { outline-color: rgb(var(--ink)); }
.folio-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 40px; }
.folio-search { display: flex; flex-direction: column; gap: 8px; width: min(100%, 340px); }
.folio-search span { font: 300 12.5px/1 'Lexend Exa', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.folio-search input {
  width: 100%; padding: 13px 16px 13px 44px; border: 1px solid rgba(var(--ink),0.22); border-radius: 10px;
  font: 400 16px/1.3 var(--body-font); color: rgb(var(--ink));   /* 16px: no zooming in on phones */
  background: rgba(255,255,255,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e2924' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px 50% / 18px 18px;
  box-shadow: inset 0 1px 2px rgba(var(--ink),0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.folio-search input::placeholder { color: var(--ink-soft); }
.folio-search input:focus { outline: none; border-color: var(--tone); background-color: #fff; box-shadow: 0 0 0 3px rgba(var(--tone-rgb),0.16); }

.folio-count { margin: 34px 0 0; font: 300 13px/1.2 'Lexend Exa', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

.folio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 26px; }
@media (max-width: 1199px) { .folio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .folio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 520px) { .folio-grid { grid-template-columns: minmax(0, 1fr); } }
.folio-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 14px;
  background: var(--card); border: 1px solid rgba(var(--ink),0.13);
  box-shadow: inset 0 1px 0 #fff, 0 16px 30px -20px rgba(var(--ink),0.55);
}
.folio-card.is-hidden { display: none; }
/* the screenshot: a button, it opens the viewer */
.folio-shot {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; overflow: hidden; cursor: zoom-in;
  background: var(--shot); line-height: 0; -webkit-tap-highlight-color: transparent;
}
.folio-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) { .folio-shot:hover img { transform: scale(1.035); } }
.folio-shot:focus-visible { outline: 2px solid rgb(var(--ink)); outline-offset: -4px; }
.folio-meta { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; border-top: 1px solid rgba(var(--ink),0.1); }
.folio-meta h3 { margin: 0; font-size: 18.5px; line-height: 1.3; color: rgb(var(--ink)); }
.folio-meta p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.folio-meta a {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px;
  font-size: 15.5px; font-weight: 500; color: var(--tone); text-decoration: none;
}
.folio-meta a svg { transition: transform 0.25s cubic-bezier(.22,1,.36,1); }
.folio-meta a:hover { color: var(--label); }
.folio-meta a:hover svg { transform: translate(2px, -2px); }
/* The featured sites (the first FOLIO_FEATURED, includes/portfolio.inc): two to a row, with large screenshots, the name
   and place on the left of the card's foot and the link on the right. An odd one out at the foot sits in the middle. */
.folio-grid[hidden] { display: none; }
.folio-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.folio-featured .folio-card.is-lone { grid-column: 1 / -1; justify-self: center; width: calc(50% - 16px); }
.folio-featured .folio-card { border-radius: 16px; }
.folio-featured .folio-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: end; gap: 0 24px;
  padding: 22px 26px 24px;
}
.folio-featured .folio-meta h3 { grid-column: 1; font-size: 22px; line-height: 1.3; }
.folio-featured .folio-meta p { grid-column: 1; margin-top: 6px; font-size: 17.5px; }
.folio-featured .folio-meta a { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; padding: 0 0 2px; font-size: 17.5px; }
.folio-featured .folio-meta h3:last-of-type:not(:has(+ p)) { grid-row: 1 / span 2; align-self: end; }   /* (a site with no place) */
@media (max-width: 860px) { .folio-featured { gap: 20px; } .folio-featured .folio-card.is-lone { width: calc(50% - 10px); } }
@media (max-width: 699px) {
  .folio-featured { grid-template-columns: minmax(0, 1fr); }
  .folio-featured .folio-card.is-lone { width: auto; justify-self: stretch; }
  .folio-featured .folio-meta { padding: 18px 20px 20px; }
  .folio-featured .folio-meta h3 { font-size: 20px; }
  .folio-featured .folio-meta p, .folio-featured .folio-meta a { font-size: 16.5px; }
}
@media (max-width: 420px) {   /* the link under the name and place */
  .folio-featured .folio-meta { grid-template-columns: minmax(0, 1fr); }
  .folio-featured .folio-meta a { grid-column: 1; grid-row: auto; justify-self: start; padding: 14px 0 0; }
}
/* "See More Websites": the rest of the sites, in the four-column grid under it (a search or a filter shows them too,
   and the button steps aside). A navy outline on the paper, its chevron turning over once they're shown. */
.folio-more-bar { display: flex; justify-content: center; margin-top: 48px; }
.folio-more-bar[hidden] { display: none; }
.folio-more-btn {
  appearance: none; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 2px 26px 0 30px; border-radius: 999px; cursor: pointer;   /* (2px above: the label on its capitals' centre, measured) */
  border: 2px solid var(--tone); background: rgba(255,255,255,0.55); color: var(--tone);
  font: 500 19px/1 var(--body-font); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -8px rgba(var(--ink),0.5);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.folio-more-btn svg { flex: none; transition: transform 0.3s cubic-bezier(.22,1,.36,1); }
.folio-more-btn.is-open svg { transform: rotate(180deg); }
@media (hover: hover) { .folio-more-btn:hover { background: linear-gradient(180deg, var(--tone), var(--tone-deep)); color: var(--accent); } }
.folio-more-btn:focus-visible { outline: 2px solid rgb(var(--ink)); outline-offset: 3px; }
.folio-rest { margin-top: 40px; }
.folio-featured[hidden] ~ .folio-rest { margin-top: 26px; }
.folio-rest.is-in { animation: folio-in 0.6s cubic-bezier(.22,1,.36,1) both; }
@keyframes folio-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .folio-rest.is-in { animation-name: folio-fade; }
  @keyframes folio-fade { from { opacity: 0; } to { opacity: 1; } }
}
.folio-none { margin: 40px 0 0; color: var(--ink-text); font-size: 19px; }
/* the button in the theme's colour (navy: as the estimate's "Get a firm quote") */
.folio-cta { margin-top: 64px; text-align: center; }
.folio-cta .btn {
  margin: 0; padding: 15px 28px; border-radius: 8px; font-size: 19px; font-weight: 500;
  background: linear-gradient(180deg, var(--tone), var(--tone-deep)); color: var(--accent) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 18px -8px rgba(var(--ink),0.7); transition: filter 0.2s ease;
}
.folio-cta .btn:hover { filter: brightness(1.3); }
.folio-cta .btn svg { transition: transform 0.25s cubic-bezier(.22,1,.36,1); }
.folio-cta .btn:hover svg { transform: translateX(3px); }
@media (max-width: 820px) {
  .site-main .folio-list { padding-top: 64px; }
  .folio-cta { margin-top: 48px; }
}
@media (max-width: 520px) {
  .folio-meta h3 { font-size: 18px; }
}

/* ---------- the viewer: a site's screenshot, larger, over the dimmed page; back and next go through the grid as filtered ---------- */
.folio-viewer {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 28px 84px;
  background: rgba(14,8,16,0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.folio-viewer[hidden] { display: none; }
.folio-viewer figure { margin: 0; max-width: 100%; }
.folio-viewer img {
  display: block; width: auto; height: auto; max-width: min(100%, 1400px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
  border-radius: 6px; box-shadow: 0 30px 70px -20px rgba(0,0,0,0.75);
}
.folio-viewer figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 16px; }
.folio-viewer-name { font: 600 19px/1.3 'Wix Madefor Display', system-ui, sans-serif; color: var(--accent); }
.folio-viewer-link { flex: none; font-size: 16px; font-weight: 500; color: #f1efcf; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(241,239,207,0.5); }
.folio-viewer-link:hover { color: #fff; text-decoration-color: #fff; }
.folio-viewer-close, .folio-viewer-step {
  position: absolute; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); transition: background-color 0.2s ease;
}
.folio-viewer-close:hover, .folio-viewer-step:hover { background: rgba(255,255,255,0.17); }
.folio-viewer-close:focus-visible, .folio-viewer-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.folio-viewer-close { top: 18px; right: 18px; width: 46px; height: 46px; }
.folio-viewer-step { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); }
.folio-viewer-step[data-step="-1"] { left: 18px; }
.folio-viewer-step[data-step="1"] { right: 18px; }
@media (max-width: 860px) {
  .folio-viewer { padding: 76px 14px 24px; }
  .folio-viewer img { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  .folio-viewer-step { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .folio-viewer figcaption { flex-direction: column; gap: 6px; padding-right: 0; }
  .folio-viewer figure { padding-bottom: 56px; }
}
