/* HatchDesk theme: portfolio styles. Used by Home/Portfolio. Requires core.css. */

/* ==========================================================================
   Portfolio page (/Home/Portfolio) - markup lives in Views/Home/Portfolio.cshtml
   Reuses the home hero, stats, marquee, .hd-h2 and .hd-kick.
   ========================================================================== */
.hd.hd-pf { background: var(--hd-paper); margin-top: -96px; overflow-x: clip; }
.hd .hd-pf-h1 { max-width: 900px; }
.hd .hd-pf-hero-foot { display: grid; gap: 8px; align-items: end; }
.hd .hd-pf-hero-foot .hd-hero-ctas { margin-top: 28px; }

.hd .hd-pf-marquee { padding: 40px 0; }
.hd .hd-pf-marquee .hd-marquee-track { gap: 48px; font-size: 32px; font-weight: 700; color: rgba(11, 16, 32, .52); animation-duration: 40s; }
.hd .hd-pf-marquee .hd-marquee-track i { font-size: .6em; color: rgba(15, 117, 189, .4); }

.hd .hd-pf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.hd .hd-pf-hint { font-size: 12px; color: rgba(11, 16, 32, .4); }

/* featured case studies */
.hd .hd-pf-featured { padding: 48px 0 32px; }
.hd .hd-pf-cases { display: grid; gap: 28px; margin-top: 48px; }
.hd .hd-pf-case { display: grid; gap: 32px; align-items: center; padding: 20px; border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px rgba(11, 16, 32, .05); }
.hd .hd-pf-case > * { min-width: 0; }
.hd .hd-pf-browser { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px -30px rgba(11, 16, 32, .45), 0 0 0 1px rgba(11, 16, 32, .1); }
.hd .hd-pf-browser-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(11, 16, 32, .05); background: var(--hd-paper); }
.hd .hd-pf-browser-bar i { width: 10px; height: 10px; border-radius: 999px; background: #FF5F57; }
.hd .hd-pf-browser-bar i:nth-child(2) { background: #FEBC2E; }
.hd .hd-pf-browser-bar i:nth-child(3) { background: #28C840; }
.hd .hd-pf-browser-bar span { flex: 1; min-width: 0; margin-left: 10px; padding: 4px 12px; overflow: hidden; border-radius: 6px; background: #fff; font-family: var(--hd-mono); font-size: 11px; color: rgba(11, 16, 32, .5); white-space: nowrap; text-overflow: ellipsis; }
.hd .hd-pf-browser-shot { height: 260px; overflow: hidden; background: var(--hd-paper); }
/* screenshot pans from top to bottom on hover */
.hd .hd-pf-browser-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 4s ease; }
.hd .hd-pf-browser:hover .hd-pf-browser-shot img { object-position: 50% 100%; }
.hd .hd-pf-case-body h3 { margin-top: 12px; font-family: var(--hd-display); font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; color: var(--hd-ink); }
.hd .hd-pf-case-kind { margin-top: 6px; font-family: var(--hd-display); font-size: 17px; color: rgba(11, 16, 32, .5); }
.hd .hd-pf-case-text { margin-top: 18px; font-size: 16px; line-height: 1.7; }
.hd .hd-pf-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 24px 0 0; overflow: hidden; border-radius: 18px; background: rgba(11, 16, 32, .08); }
.hd .hd-pf-metrics div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 14px 18px; background: var(--hd-paper); }
.hd .hd-pf-metrics dd { margin: 0; font-family: var(--hd-display); font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--hd-ink); }
.hd .hd-pf-metrics dt { font-size: 12.5px; font-weight: 400; color: var(--hd-text); }
.hd .hd-pf-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hd .hd-pf-stack li { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(11, 16, 32, .1); font-size: 12px; font-weight: 500; color: var(--hd-ink); }
.hd .hd-pf-case-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 28px; }
.hd .hd-pf-btn-ink { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px; background: var(--hd-ink); font-family: var(--hd-display); font-size: 14px; font-weight: 700; color: #fff; transition: background-color .25s; }
.hd .hd-pf-btn-ink:hover, .hd .hd-pf-btn-ink:focus { background: var(--hd-brand); color: #fff; }
.hd .hd-pf-btn-ink i { font-size: 11px; }
.hd .hd-pf-btn-text { display: inline-flex; align-items: center; gap: 8px; padding: 13px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--hd-ink); transition: background-color .25s; }
.hd .hd-pf-btn-text:hover { background: var(--hd-paper); color: var(--hd-ink); }
.hd .hd-pf-btn-text i { font-size: 11px; transition: transform .25s var(--hd-ease); }
.hd .hd-pf-btn-text:hover i { transform: translateX(3px); }

/* all projects */
.hd .hd-pf-work { padding: 80px 0 40px; scroll-margin-top: 16px; }
.hd .hd-pf-count { font-size: 14px; color: rgba(11, 16, 32, .64); }
.hd .hd-pf-count b { color: var(--hd-ink); }
.hd .hd-pf-chips { position: sticky; top: 12px; z-index: 30; display: flex; gap: 8px; margin: 24px -8px 0; padding: 8px; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(245, 246, 250, .85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hd .hd-pf-chips::-webkit-scrollbar { display: none; }
.hd .hd-pf-chip { flex-shrink: 0; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(11, 16, 32, .1); background: #fff; font-size: 14px; font-weight: 500; color: var(--hd-ink); transition: border-color .2s, background-color .2s, color .2s; }
.hd .hd-pf-chip sup { margin-left: 2px; font-family: var(--hd-mono); font-size: 10px; opacity: .5; }
.hd .hd-pf-chip:hover { border-color: rgba(11, 16, 32, .4); }
.hd .hd-pf-chip.is-on { border-color: var(--hd-ink); background: var(--hd-ink); color: #fff; }
.hd .hd-pf-grid { display: grid; gap: 20px; margin-top: 28px; }
.hd .hd-pf-card { position: relative; display: flex; flex-direction: column; padding: 12px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px rgba(11, 16, 32, .05); transition: transform .35s var(--hd-ease), box-shadow .35s; }
.hd .hd-pf-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -24px rgba(11, 16, 32, .35), 0 0 0 1px rgba(11, 16, 32, .05); }
.hd .hd-pf-card-img { aspect-ratio: 16 / 11; overflow: hidden; border-radius: 16px; background: var(--hd-paper); }
.hd .hd-pf-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform .7s var(--hd-ease); }
.hd .hd-pf-card:hover .hd-pf-card-img img { transform: scale(1.05); }
.hd .hd-pf-card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 8px 8px; }
.hd .hd-pf-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hd .hd-pf-card-title h3 { font-family: var(--hd-display); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--hd-ink); }
.hd .hd-pf-card-title h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.hd .hd-pf-card-title span { flex-shrink: 0; font-size: 12px; color: rgba(11, 16, 32, .62); }
.hd .hd-pf-card-body > p { margin-top: 8px; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hd .hd-pf-card-body > p.hd-pf-card-stack { margin-top: auto; padding-top: 16px; font-size: 11px; color: rgba(11, 16, 32, .62); -webkit-line-clamp: 1; }
.hd .hd-pf-card-go { position: absolute; right: 24px; top: 24px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--hd-lime); color: var(--hd-ink); opacity: 0; transform: scale(.75); transition: opacity .3s, transform .3s var(--hd-ease); pointer-events: none; }
.hd .hd-pf-card:hover .hd-pf-card-go, .hd .hd-pf-card:focus-within .hd-pf-card-go { opacity: 1; transform: none; }
.hd .hd-pf-empty { margin-top: 32px; text-align: center; color: rgba(11, 16, 32, .5); }

/* testimonial + cta */
.hd .hd-pf-close { padding: 64px 0 80px; }
.hd .hd-pf-close-card { display: grid; overflow: hidden; border-radius: 32px; background: var(--hd-ink); color: #fff; }
.hd .hd-pf-quotes { position: relative; display: grid; padding: 40px 28px; }
.hd .hd-pf-quote-mark { font-size: 30px; color: var(--hd-lime); }
.hd .hd-pf-quote { grid-area: 2 / 1; margin-top: 24px; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .5s, transform .5s var(--hd-ease), visibility .5s; }
.hd .hd-pf-quote.is-on { opacity: 1; visibility: visible; transform: none; }
.hd .hd-pf-quote blockquote { font-family: var(--hd-display); font-size: 22px; font-weight: 600; line-height: 1.4; color: #fff; }
.hd .hd-pf-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.hd .hd-pf-quote figcaption img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; }
.hd .hd-pf-quote figcaption b { display: block; color: #fff; }
.hd .hd-pf-dots { grid-area: 3 / 1; display: flex; gap: 8px; margin-top: 28px; }
.hd .hd-pf-dots button { width: 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .25); transition: width .3s var(--hd-ease), background-color .3s; }
.hd .hd-pf-dots button.is-on { width: 28px; background: var(--hd-lime); }
.hd .hd-pf-cta { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 40px 28px; background: var(--hd-grad); }
.hd .hd-pf-cta > * { position: relative; z-index: 1; }
.hd .hd-pf-cta h2 { font-family: var(--hd-display); font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: #fff; }
.hd .hd-pf-cta p { margin-top: 12px; color: rgba(255, 255, 255, .8); }
.hd .hd-pf-cta .hd-hero-ctas { margin-top: 28px; flex-direction: column; align-items: flex-start; }
.hd .hd-pf-cta .hd-btn-pill { white-space: nowrap; }
.hd .hd-pf-btn-lime { background: var(--hd-lime); color: var(--hd-ink); padding: 8px 8px 8px 28px; }
.hd .hd-pf-btn-lime:hover, .hd .hd-pf-btn-lime:focus { background: #fff; color: var(--hd-ink); }
.hd .hd-pf-btn-lime .hd-btn-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--hd-ink); color: #fff; transition: transform .3s var(--hd-ease); }
.hd .hd-pf-btn-lime:hover .hd-btn-icon { transform: rotate(45deg); }

@media (min-width: 640px) {
    .hd .hd-pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd .hd-pf-case { padding: 32px; }
    .hd .hd-pf-browser-shot { height: 340px; }
    .hd .hd-pf-metrics { grid-template-columns: repeat(4, 1fr); }
    .hd .hd-pf-marquee .hd-marquee-track { font-size: 40px; }
    .hd .hd-pf-quotes, .hd .hd-pf-cta { padding: 56px 48px; }
    .hd .hd-pf-cta h2 { font-size: 38px; }
    .hd .hd-pf-quote blockquote { font-size: 26px; }
    .hd .hd-pf-close-card { border-radius: 40px; }
}
@media (min-width: 1024px) {
    .hd .hd-pf-hero-foot { grid-template-columns: 1fr auto; gap: 40px; }
    .hd .hd-pf-hero-foot .hd-hero-ctas { margin-top: 0; }
    .hd .hd-pf-case { grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px; }
    .hd .hd-pf-case.is-flip .hd-pf-browser { order: 2; }
    .hd .hd-pf-case-body h3 { font-size: 40px; }
    .hd .hd-pf-metrics { grid-template-columns: repeat(2, 1fr); }
    .hd .hd-pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .hd .hd-pf-close-card { grid-template-columns: 1.3fr 1fr; }
}
@media (min-width: 1280px) {
    .hd .hd-pf-metrics { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 639px) {
    .hd .hd-pf-hint { display: none; }
    .hd .hd-pf-featured { padding-top: 24px; }
    .hd .hd-pf-cases { margin-top: 32px; gap: 20px; }
    .hd .hd-pf-case { border-radius: 24px; }
    .hd .hd-pf-case-body h3 { font-size: 28px; }
    .hd .hd-pf-work { padding-top: 56px; }
    .hd .hd-pf-close { padding: 40px 0 56px; }
    .hd .hd-pf-close-card { border-radius: 24px; }
    .hd .hd-pf-cta .hd-hero-ctas .hd-btn-pill { width: 100%; }
    .hd .hd-pf-cta .hd-pf-btn-lime { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
    .hd .hd-pf-browser-shot img, .hd .hd-pf-card, .hd .hd-pf-card-img img, .hd .hd-pf-quote, .hd .hd-pf-card-go { transition: none; }
}

/* ==========================================================================
   Portfolio v2 additions (P5): 3D device stage on featured cases + industry filter
   ========================================================================== */
.hd .hd-pf-stage { --rx: 4deg; --ry: -8deg; position: relative; padding: 0 28px 28px 0; perspective: 1400px; }
.hd .hd-pf-case.is-flip .hd-pf-stage { --ry: 8deg; }
.hd .hd-pf-stage-in { position: relative; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .6s var(--hd-ease); }
.hd .hd-pf-stage:hover .hd-pf-stage-in { transition-duration: .15s; }
.hd .hd-pf-phone { position: absolute; right: -28px; bottom: -28px; width: 108px; aspect-ratio: 9 / 19; padding: 6px; border-radius: 22px; background: var(--hd-ink); box-shadow: 0 30px 50px -20px rgba(11, 16, 32, .6), inset 0 0 0 1px rgba(255, 255, 255, .12); transform: translateZ(60px); }
.hd .hd-pf-phone img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; object-position: 0 0; background: #fff; }
.hd .hd-pf-phone-notch { position: absolute; left: 50%; top: 10px; z-index: 1; width: 34px; height: 8px; margin-left: -17px; border-radius: 999px; background: var(--hd-ink); }
.hd .hd-pf-case.is-flip .hd-pf-stage { padding: 0 0 28px 28px; }
.hd .hd-pf-case.is-flip .hd-pf-phone { right: auto; left: -28px; }

.hd .hd-pf-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.hd .hd-pf-ind { position: relative; display: inline-flex; align-items: center; margin: 0; font-weight: 400; }
.hd .hd-pf-ind i { position: absolute; left: 16px; font-size: 13px; color: var(--hd-brand); pointer-events: none; }
.hd .hd-pf-ind::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 2px solid var(--hd-ink); border-bottom: 2px solid var(--hd-ink); transform: rotate(45deg); pointer-events: none; }
.hd .hd-pf-ind select { height: 42px; padding: 0 40px 0 40px; border: 1px solid rgba(11, 16, 32, .12); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--hd-ink); -webkit-appearance: none; appearance: none; cursor: pointer; transition: border-color .2s; }
.hd .hd-pf-ind select:hover, .hd .hd-pf-ind select:focus { border-color: var(--hd-brand); outline: 0; }

@media (min-width: 1024px) {
    .hd .hd-pf-case.is-flip .hd-pf-stage { order: 2; }
    .hd .hd-pf-phone { width: 128px; }
}
@media (max-width: 639px) {
    .hd .hd-pf-stage { padding: 0 18px 22px 0; }
    .hd .hd-pf-case.is-flip .hd-pf-stage { padding: 0 18px 22px 0; }
    .hd .hd-pf-case.is-flip .hd-pf-phone { left: auto; right: -18px; }
    .hd .hd-pf-phone { right: -18px; bottom: -22px; width: 84px; border-radius: 18px; padding: 5px; }
    .hd .hd-pf-phone img { border-radius: 13px; }
    .hd .hd-pf-head-tools { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
    .hd .hd-pf-stage-in { transition: none; }
}
