/* Website catalog. Uses the site's own tokens (--orange, --ink, --muted, --line, --motion-ease) so
   it reads as part of ErieWeb rather than a bolted-on page. Class names are all catalog-specific:
   style.css defines 188 classes and none of these collide with it. */

.catalog-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.catalog-head{max-width:1280px;margin:auto;padding:56px 5% 8px}
.catalog-head h1{font-size:clamp(38px,5.4vw,68px);letter-spacing:-.05em;line-height:1.04;margin:14px 0 18px}
.catalog-head h1 span{color:var(--orange)}
.catalog-head>p{max-width:60ch;font-size:17px;line-height:1.7;color:var(--muted);margin:0 0 30px}

/* ---- search ---------------------------------------------------------------------------------- */
.catalog-search{position:relative;max-width:620px}
.catalog-search input{width:100%;border:1px solid var(--line);border-radius:50px;background:#fff;padding:18px 52px 18px 22px;font-size:16px;line-height:1.4;min-height:58px}
.catalog-search input:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
.catalog-search input::-webkit-search-cancel-button{display:none}
.catalog-clear{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:#f1f2f3;color:var(--ink);font-size:19px;line-height:1;cursor:pointer}
.catalog-help{max-width:620px;font-size:13px;color:var(--muted);margin:10px 0 26px}

/* The dropdown is a real listbox, not a datalist: it carries thumbnails and context. */
.catalog-suggest{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:30;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 48px #202b3426;overflow:hidden}
.tpl-suggest{display:flex;gap:13px;align-items:flex-start;width:100%;border:0;border-bottom:1px solid #f0f1f2;background:#fff;padding:12px 14px;text-align:left;cursor:pointer}
.tpl-suggest img{flex:none;width:84px;height:57px;object-fit:cover;border-radius:8px;background:#f0f1f1}
.tpl-suggest-text{display:block;min-width:0}
.tpl-suggest-text strong{display:block;font-size:14px;line-height:1.35;color:var(--ink)}
.tpl-suggest-industry{display:block;font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:var(--orange);margin:3px 0}
.tpl-suggest-desc{display:block;font-size:12px;line-height:1.5;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tpl-suggest[aria-selected=true],.tpl-suggest:hover,.tpl-suggest:focus-visible{background:#fff6ee;outline:none}
.tpl-suggest-none{margin:0;padding:15px 16px;font-size:13px;color:var(--muted);border-bottom:1px solid #f0f1f2}
/* Always present, whatever has been typed. */
.tpl-suggest-all{display:block;width:100%;border:0;background:#fafafa;padding:14px;font-size:13px;font-weight:650;color:var(--ink);cursor:pointer;text-align:left}
.tpl-suggest-all[aria-selected=true],.tpl-suggest-all:hover,.tpl-suggest-all:focus-visible{background:#fff1e3;color:#93400e;outline:none}

/* ---- industry chips -------------------------------------------------------------------------- */
.catalog-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.tpl-chip{border:1px solid var(--line);background:#fff;border-radius:50px;padding:10px 15px;font-size:13px;color:var(--ink);cursor:pointer;min-height:44px}
.tpl-chip span{color:var(--muted);font-size:11px;margin-left:5px}
.tpl-chip.is-on{border-color:var(--orange);background:#fff5ec;color:#93400e;font-weight:650}
.tpl-chip.is-on span{color:#b4703f}
.tpl-chip:focus-visible{outline:3px solid var(--orange);outline-offset:2px}

/* ---- results --------------------------------------------------------------------------------- */
.catalog-results{max-width:1280px;margin:auto;padding:22px 5% 80px}
.catalog-count{font-size:13px;color:var(--muted);margin:0 0 18px}
.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:26px}

.tpl-card{display:flex;flex-direction:column;background:#fff;border:1px solid #e0e3e5;border-radius:18px;overflow:hidden;min-width:0}
/* height:auto matters: the img carries width/height attributes, and an explicit height would win
   over aspect-ratio and leave a tall empty box - the exact bug fixed in the planner's picker. */
.tpl-art{position:relative;aspect-ratio:840/570;background:#f0f1f1}
.tpl-art img{display:block;width:100%;height:auto;aspect-ratio:840/570;object-fit:cover;object-position:top center}

/* Two real controls so touch and keyboard reach both; hover is only how they are revealed.
   Explore previews the design; Use starts a build with it already chosen. */
.tpl-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#202b34a8;opacity:0;transition:opacity 200ms var(--motion-ease)}
.tpl-explore,.tpl-use{border-radius:50px;padding:13px 20px;font-size:14px;font-weight:650;cursor:pointer;min-height:46px;display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;transform:translateY(6px);transition:transform 200ms var(--motion-ease)}
/* Primary action is starting the build, so it carries the orange. Explore is the quieter one. */
.tpl-use{background:var(--orange);color:#fff;border:0}
.tpl-explore{background:#ffffff;color:var(--ink);border:0}
.tpl-card:hover .tpl-overlay,.tpl-card:focus-within .tpl-overlay{opacity:1}
.tpl-card:hover .tpl-explore,.tpl-card:focus-within .tpl-explore,
.tpl-card:hover .tpl-use,.tpl-card:focus-within .tpl-use{transform:translateY(0)}
.tpl-explore:focus-visible,.tpl-use:focus-visible{outline:3px solid #fff;outline-offset:3px}

.tpl-body{padding:18px 18px 20px}
.tpl-industry{display:block;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;color:var(--orange);margin-bottom:7px}
.tpl-body h3{font-size:17px;line-height:1.35;margin:0 0 8px;color:var(--ink)}
.tpl-body p{font-size:13px;line-height:1.6;color:#39454c;margin:0 0 10px}
.tpl-body small{font-size:11px;color:var(--muted)}

/* Match the site's card motion: individual translate, never a compound transform. */
@media(hover:hover) and (pointer:fine){
 /* translate is no longer part of the hover treatment, so it is not transitioned here either -
    the entrance reveal owns that property. */
 .tpl-card{transition:box-shadow 200ms var(--motion-ease),border-color 200ms}
 /* The card itself is NOT clickable - data-preview sits on the .tpl-explore button, not the
   article - so it no longer lifts. The overlay reveal below stays: that is not decoration, it is
   how the two buttons become available, and removing it would strand them on desktop. */
.tpl-card:hover{box-shadow:0 16px 34px #202b341f;border-color:#d2d7da}
}
@media(hover:none){
 /* No hover on touch, so both actions are always visible rather than hidden behind a gesture. */
 .tpl-overlay{opacity:1;background:linear-gradient(to top,#202b34cc,#202b3400 62%);flex-direction:row;align-items:flex-end;justify-content:center;gap:8px;padding:0 10px 12px}
 .tpl-explore,.tpl-use{transform:none;font-size:13px;padding:11px 14px;flex:1 1 0;min-width:0}
}

/* ---- empty state ------------------------------------------------------------------------------ */
.catalog-empty{text-align:center;padding:62px 6%;border:1px dashed var(--line);border-radius:18px;background:#fcfcfb}
.catalog-empty h2{font-size:22px;margin:0 0 10px;color:var(--ink)}
.catalog-empty p{font-size:15px;color:var(--muted);margin:0 0 22px}
.catalog-noscript{max-width:1280px;margin:auto;padding:0 5% 60px;font-size:15px}

/* ---- portfolio (our-work) ---------------------------------------------------------------------- */
/* Shares the catalog's card vocabulary so the two pages read as one family. */
.work-card .tpl-explore{display:inline-flex;align-items:center;text-decoration:none}
.work-noshot{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:#eceeef;color:#9aa3a8;font-size:54px;font-weight:700}
.work-needs{max-width:46ch;margin:0 auto 18px;padding:0;list-style:none;text-align:left}
.work-needs li{position:relative;padding:7px 0 7px 22px;font-size:14px;line-height:1.55;color:#39454c}
.work-needs li::before{content:"·";position:absolute;left:6px;color:var(--orange);font-weight:700}
.work-needs-note{font-size:13px!important;color:var(--muted);margin:0 0 22px!important}
.work-needs-note code{background:#f1f2f3;border-radius:5px;padding:2px 6px;font-size:12px}

/* ---- preview dialog --------------------------------------------------------------------------- */
.tpl-preview{width:min(1180px,94vw);max-width:none;height:min(88vh,900px);border:0;border-radius:18px;padding:0;overflow:hidden;background:#fff}
.tpl-preview::backdrop{background:#202b34b8}
.tpl-preview-top{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}
.tpl-preview-top h2{font-size:18px;margin:0;color:var(--ink)}
.tpl-preview-top p{font-size:12px;color:var(--muted);margin:5px 0 0}
.tpl-preview-actions{display:flex;gap:14px;align-items:center;flex:none}
.tpl-preview-actions a{font-size:13px;color:#93400e;text-decoration:underline}
.tpl-preview-close{border:1px solid var(--line);background:#fff;border-radius:50px;padding:10px 17px;font-size:13px;cursor:pointer;min-height:44px}
.tpl-preview iframe{width:100%;height:calc(100% - 152px);border:0;background:#f6f6f5}
.tpl-preview .button{margin:14px 20px;padding:14px 22px;font-size:14px}

@media(max-width:760px){
 .catalog-head{padding-top:36px}
 .catalog-grid{grid-template-columns:1fr;gap:20px}
 .tpl-preview{width:100vw;height:100vh;border-radius:0}
 .tpl-preview iframe{height:calc(100% - 170px)}
 .tpl-suggest-desc{white-space:normal}
}

/* ---- card entrance ---------------------------------------------------------------------------- */
/* Matches the site's established language: a short fade with a small upward move, the same
   cubic-bezier(.22,.7,.3,1) easing micro-motion.js uses, staggered within a row.
   opacity/translate only - never `transform` - so it composes with the hover lift on .tpl-card
   instead of fighting it (the hover rule animates `translate` too).
   The distance is deliberately small: a long slide repeated across 70 cards reads as theatrical.
   Search and filter changes reuse this, which is why it is fast: a re-render re-observes, and
   anything already on screen reveals almost immediately rather than replaying a full entrance. */
.tpl-card{opacity:0;translate:0 14px;transition:opacity 420ms var(--motion-ease) var(--tpl-delay,0ms),translate 420ms var(--motion-ease) var(--tpl-delay,0ms)}
.tpl-card.tpl-in{opacity:1;translate:0 0}
/* Without JavaScript nothing adds .tpl-in, so the cards must not be left invisible. */
html:not(.js) .tpl-card{opacity:1;translate:none}

@media(hover:hover) and (pointer:fine){
 /* Once revealed, the hover lift takes over the same property. Restricting the hover transition to
    the settled state stops the two overlapping mid-entrance. */
 .tpl-card.tpl-in{transition:opacity 420ms var(--motion-ease),translate 200ms var(--motion-ease),box-shadow 200ms var(--motion-ease),border-color 200ms}
}

@media(prefers-reduced-motion:reduce){
 .tpl-card,.tpl-overlay,.tpl-explore{transition:none!important}
 .tpl-card:hover{translate:none}
 /* Reduced motion gets the content, never a blank grid: no fade, no offset, nothing to wait for.
    website-templates.js also skips the observer entirely and marks every card revealed. */
 .tpl-card{opacity:1;translate:none}
}
