/* Project Detail (single-project.php). Depends on home.css for design
   tokens, .home-container, .home-button, .home-eyebrow, reveal/menu
   behaviour and the shared header/footer. Every rule here is scoped under a
   .pd-* class so it cannot leak onto the homepage, /case-studies, the Case
   Study detail template, or any other page. Deliberately shorter/lighter
   than case-study-single.css — no TOC, no process timeline, no architecture. */

/* ---------- Hero ---------- */
.pd-hero { position: relative; overflow: hidden; padding: 0 0 64px; border-bottom: 1px solid var(--home-line); background: var(--home-black); }
.pd-hero__grid-bg { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-position: center; background-size: 52px 52px; -webkit-mask-image: radial-gradient(ellipse 78% 68% at 74% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 78% 68% at 74% 40%, #000, transparent 75%); }

.pd-breadcrumb { position: relative; z-index: 2; padding: 32px 0 24px; }
.pd-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.pd-breadcrumb li { display: flex; align-items: center; color: var(--text-3-dark); font-size: 13px; }
.pd-breadcrumb li + li::before { margin: 0 8px; color: #4a4f54; content: '›'; }
.pd-breadcrumb a { color: #8b9197; font-weight: 500; transition: color .25s var(--home-ease); }
.pd-breadcrumb a:hover { color: #fff; }
.pd-breadcrumb li[aria-current] span { color: #c9cdd1; font-weight: 600; }

.pd-hero__layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 48px; }
.pd-hero__copy h1 { max-width: 560px; margin: 0 0 20px; color: #f7f7f4; font-size: var(--fs-h1); font-weight: 640; letter-spacing: var(--ls-heading); line-height: var(--lh-display); }
.pd-hero__lead { max-width: 460px; margin: 0 0 24px; color: #b5b9be; font-size: 16px; font-weight: 400; line-height: 1.68; }

.pd-hero__tech { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.pd-hero__tech li { padding: 8px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-sm); color: #c7cace; font: 600 12px/1 var(--font-sans); letter-spacing: .03em; }

.has-home-motion:not(.home-loaded) .pd-hero__copy > * { transform: translateY(8px); }
.has-home-motion .pd-hero__copy > * { transition: opacity .3s var(--home-ease), transform .3s var(--home-ease); }
.has-home-motion .pd-hero__copy > *:nth-child(2) { transition-delay: .06s; }
.has-home-motion .pd-hero__copy > *:nth-child(3) { transition-delay: .12s; }
.has-home-motion .pd-hero__copy > *:nth-child(4) { transition-delay: .18s; }
.has-home-motion .pd-hero__copy > *:nth-child(5) { transition-delay: .24s; }
.has-home-motion.home-loaded .pd-hero__copy > * { opacity: 1; transform: translateY(0); }

/* ---------- Hero visual ---------- */
.pd-hero__visual { position: relative; min-height: 320px; }
.has-home-motion:not(.home-loaded) .pd-hero__visual { transform: translateY(10px); }
.has-home-motion .pd-hero__visual { transition: opacity .7s .12s var(--home-ease), transform .7s .12s var(--home-ease); }
.has-home-motion.home-loaded .pd-hero__visual { opacity: 1; transform: translateY(0); }
.pd-hero__visual::before { position: absolute; inset: -10%; z-index: 0; background: radial-gradient(ellipse 58% 58% at 50% 50%, rgba(240,32,44,.12), transparent 72%); content: ''; pointer-events: none; }

.pd-visual__browser, .pd-visual__laptop { position: relative; z-index: 1; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #14171b; box-shadow: 0 34px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03); transition: transform .5s var(--home-ease); }
.pd-hero__visual[data-pd-parallax] .pd-visual__browser, .pd-hero__visual[data-pd-parallax] .pd-visual__laptop { transition: transform .3s ease-out; }
.pd-visual__browser-bar, .pd-visual__laptop-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
.pd-visual__browser-bar i, .pd-visual__laptop-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.16); }
.pd-visual__browser-bar i:first-child, .pd-visual__laptop-bar i:first-child { background: var(--home-red); }
.pd-visual__browser img, .pd-visual__laptop img { display: block; width: 100%; height: auto; }

.pd-visual__laptop { max-width: 600px; }
.pd-visual__phone { position: absolute; right: -4%; bottom: -6%; z-index: 2; width: 140px; overflow: hidden; border: 6px solid #101316; border-radius: 22px; background: #101316; box-shadow: 0 26px 50px rgba(0,0,0,.55); }
.pd-visual__phone img { display: block; width: 100%; height: auto; border-radius: 14px; }

.pd-visual__placeholder { position: relative; z-index: 1; display: flex; height: 320px; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: linear-gradient(165deg, rgba(24,28,33,.98), rgba(11,14,18,.99)); }
.pd-visual__placeholder i { width: 46px; height: 46px; border: 1px solid rgba(240,32,44,.4); border-radius: 10px; background: rgba(240,32,44,.08); }
.pd-visual__placeholder span { color: #8f959b; font: 700 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Meta strip ---------- */
.pd-meta { --eyebrow: var(--red-ink); border-bottom: 1px solid #dfe0df; background: var(--home-paper); color: var(--home-ink); }
.pd-meta__row { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 24px 0; }
.pd-meta__item { display: flex; align-items: center; gap: 12px; }
.pd-meta__item i { position: relative; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #c8cbcc; border-radius: var(--radius-md); background: #f8f8f6; }
.pd-meta__item span { display: block; margin-bottom: 3px; color: var(--text-3); font: 700 12px/1 var(--font-sans); letter-spacing: .07em; text-transform: uppercase; }
.pd-meta__item strong { display: block; max-width: 220px; color: var(--home-ink); font-size: 15px; font-weight: 650; line-height: 1.3; }

/* Klient: person */
.pd-meta__item[data-icon="client"] i::before { position: absolute; top: 10px; left: 50%; width: 7px; height: 7px; border: 1.5px solid var(--home-red); border-radius: 50%; content: ''; transform: translateX(-50%); }
.pd-meta__item[data-icon="client"] i::after { position: absolute; bottom: 8px; left: 50%; width: 14px; height: 7px; border: 1.5px solid var(--home-red); border-bottom: 0; border-radius: 7px 7px 0 0; content: ''; transform: translateX(-50%); }
/* Odvetvie: briefcase */
.pd-meta__item[data-icon="industry"] i::before { position: absolute; top: 13px; left: 50%; width: 14px; height: 10px; border: 1.5px solid var(--home-red); border-radius: 2px; content: ''; transform: translateX(-50%); }
.pd-meta__item[data-icon="industry"] i::after { position: absolute; top: 10px; left: 50%; width: 6px; height: 4px; border: 1.5px solid var(--home-red); border-bottom: 0; border-radius: 2px 2px 0 0; content: ''; transform: translateX(-50%); }
/* Typ projektu: tag */
.pd-meta__item[data-icon="project_type"] i::before { position: absolute; top: 9px; left: 8px; width: 15px; height: 15px; border: 1.5px solid var(--home-red); border-radius: 3px 6px 3px 3px; content: ''; transform: rotate(-45deg); }
.pd-meta__item[data-icon="project_type"] i::after { position: absolute; top: 13px; left: 19px; width: 3px; height: 3px; border-radius: 50%; background: var(--home-red); content: ''; }
/* Rok: calendar */
.pd-meta__item[data-icon="year"] i::before { position: absolute; top: 11px; left: 50%; width: 16px; height: 13px; border: 1.5px solid var(--home-red); border-radius: 2px; content: ''; transform: translateX(-50%); }
.pd-meta__item[data-icon="year"] i::after { position: absolute; top: 14px; left: 50%; width: 16px; height: 1.5px; background: var(--home-red); content: ''; transform: translateX(-50%); }
/* Služby: grid of dots */
.pd-meta__item[data-icon="services"] i::before, .pd-meta__item[data-icon="services"] i::after { position: absolute; width: 5px; height: 5px; border-radius: 1px; background: var(--home-red); content: ''; box-shadow: 9px 0 0 var(--home-red), 0 9px 0 var(--home-red), 9px 9px 0 var(--home-red); }
.pd-meta__item[data-icon="services"] i::before { top: 10px; left: 10px; }
.pd-meta__item[data-icon="services"] i::after { display: none; }

/* ---------- Main / shared section rhythm ---------- */
.pd-main { --eyebrow: var(--red-ink); background: var(--home-paper); color: var(--home-ink); }
.pd-section { padding: var(--section-y) 0; border-bottom: 1px solid #dfe0df; }
.pd-main .home-container > .pd-section:last-child, .pd-lower { border-bottom: 0; }
.pd-section h2 { margin: 0 0 20px; color: var(--home-ink); font-size: var(--fs-h3); font-weight: 650; letter-spacing: var(--ls-heading); }

/* ---------- About ---------- */
.pd-about { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 48px; align-items: center; }
.pd-about__copy p { margin: 0 0 16px; color: #3c4045; font-size: 16px; line-height: 1.75; }
.pd-about__points { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.pd-about__points li { position: relative; padding-left: 24px; color: #3c4045; font-size: 16px; line-height: 1.5; }
.pd-about__points li::before { position: absolute; top: 1px; left: 0; color: var(--home-red); content: '✓'; font-weight: 700; }
.pd-about__media { overflow: hidden; border: 1px solid #dfe0df; border-radius: var(--radius-md); box-shadow: 0 22px 46px rgba(17,19,22,.08); }
.pd-about__media img { display: block; width: 100%; height: auto; }

/* ---------- Delivered features (editorial row) ---------- */
.pd-features__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 32px; border-top: 1px solid #dfe0df; border-left: 1px solid #dfe0df; }
.pd-feature { padding: 24px 20px; border-right: 1px solid #dfe0df; border-bottom: 1px solid #dfe0df; }
.pd-feature i { display: block; margin-bottom: 12px; color: #b9bcbc; font: 700 13px/1 var(--font-sans); font-style: normal; }
.pd-feature strong { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 650; }
.pd-feature p { margin: 0; color: #62676c; font-size: 15px; line-height: 1.5; }

/* ---------- Screenshot story ---------- */
.pd-story__row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.pd-story-block { flex: 1 1 280px; margin: 0; }
.pd-story-block--full-width { flex-basis: 100%; }
.pd-story-block--left, .pd-story-block--right { flex-basis: 100%; display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: center; gap: 32px; }
.pd-story-block--right { grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); }
.pd-story-block--right .pd-story-block__media { order: 2; }
.pd-story-block__media { overflow: hidden; border: 1px solid #dfe0df; border-radius: var(--radius-md); background: #f4f4f2; box-shadow: 0 16px 36px rgba(17,19,22,.06); cursor: zoom-in; }
.pd-story-block__media img { display: block; width: 100%; height: auto; transition: transform .3s var(--home-ease); }
.pd-story-block__media:hover img { transform: scale(1.025); }
.pd-story-block figcaption { margin-top: 12px; }
.pd-story-block figcaption strong { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 650; }
.pd-story-block figcaption p { margin: 0; color: #7a7f84; font-size: 15px; line-height: 1.5; }

/* ---------- Technologies + optional Case Study CTA ---------- */
.pd-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 40px; align-items: stretch; padding-top: 64px; padding-bottom: 64px; }
.pd-lower:has(.pd-tech):not(:has(.pd-cs-cta)) { grid-template-columns: 1fr; }
.pd-tech__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.pd-tech-tile { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px 16px; border: 1px solid #dcdddc; border-radius: var(--radius-md); background: #fff; transition: border-color .3s var(--home-ease), transform .3s var(--home-ease); }
.pd-tech-tile:hover { border-color: #b7b9b9; transform: translateY(-2px); }
.pd-tech-tile img { width: 26px; height: 26px; flex: 0 0 auto; object-fit: contain; }
.pd-tech-tile i { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #c8cbcc; border-radius: 50%; background: #f8f8f6; color: var(--home-red); font: 700 9.5px/1 var(--font-sans); font-style: normal; }
.pd-tech-tile span { min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.3; }

.pd-cs-cta { position: relative; overflow: hidden; padding: 32px; border-radius: var(--radius-md); background: var(--home-black); }
.pd-cs-cta__bg { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: radial-gradient(ellipse 90% 100% at 100% 100%, #000, transparent 70%); mask-image: radial-gradient(ellipse 90% 100% at 100% 100%, #000, transparent 70%); }
.pd-cs-cta p.home-eyebrow { position: relative; z-index: 1; margin: 0 0 12px; }
.pd-cs-cta h3 { position: relative; z-index: 1; margin: 0 0 20px; color: #f7f7f4; font-size: 20px; font-weight: 620; line-height: 1.4; }
.pd-cs-cta .home-button { position: relative; z-index: 1; }

/* ---------- CTA ---------- */
.pd-cta { padding: var(--section-y) 0 calc(var(--section-y) / 2); background: var(--home-paper); }
.pd-cta__layout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.pd-cta__copy h2 { margin-bottom: 8px; }
.pd-cta__copy p:not(.home-eyebrow) { margin: 0; color: #b5b9be; font-size: 15px; }
.pd-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Related projects (compact cards) ---------- */
.pd-related { --eyebrow: var(--red-ink); padding: calc(var(--section-y) / 2) 0 var(--section-y); background: var(--home-paper); }
.pd-related h2 { margin: 0 0 32px; color: var(--home-ink); font-size: var(--fs-h3); font-weight: 640; }
.pd-related__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pd-related-card { position: relative; display: flex; align-items: center; gap: 16px; overflow: hidden; padding: 16px; border: 1px solid #dcdddc; border-radius: var(--radius-md); background: #fff; text-decoration: none; transition: border-color .3s var(--home-ease), transform .3s var(--home-ease); }
.pd-related-card:hover { border-color: rgba(215,25,38,.45); transform: translateY(-2px); }
.pd-related-card__media { width: 48px; height: 48px; flex: 0 0 auto; overflow: hidden; border-radius: var(--radius-md); background: #eceeed; }
.pd-related-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pd-related-card__body { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.pd-related-card__body strong { overflow: hidden; color: var(--home-ink); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pd-related-card__type { color: #62676c; font-size: 12px; }
.pd-related-card__tech { color: var(--text-3); font: 600 12px/1 var(--font-sans); letter-spacing: .02em; }
.pd-related-card__arrow { flex: 0 0 auto; margin-left: auto; color: #9aa0a6; font-style: normal; transition: color .3s var(--home-ease), transform .3s var(--home-ease); }
.pd-related-card:hover .pd-related-card__arrow { color: var(--home-red); transform: translateX(3px); }

/* ---------- Lightbox (minimal, no external library) ---------- */
.pd-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(7,9,11,.94); opacity: 0; visibility: hidden; transition: opacity .25s var(--home-ease), visibility .25s; }
.pd-lightbox.is-open { opacity: 1; visibility: visible; }
.pd-lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
/* Tall mobile screenshots scroll inside the overlay instead of shrinking to a sliver. */
.pd-lightbox.is-tall { align-items: flex-start; overflow-y: auto; }
.pd-lightbox.is-tall img { max-width: min(100%, 430px); max-height: none; }
html.has-pd-lightbox { overflow: hidden; }
[data-pd-lightbox] { cursor: zoom-in; }
[data-pd-lightbox]:focus-visible { outline: 2px solid var(--home-red); outline-offset: 3px; }
.pd-lightbox__close { position: fixed; z-index: 1; top: 20px; right: 24px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.04); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.pd-lightbox__close:hover { border-color: var(--home-red); background: rgba(240,32,44,.12); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.pd-features__row { grid-template-columns: repeat(3, 1fr); }
	.pd-related__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
	.pd-hero { padding-bottom: 48px; }
	.pd-hero__layout { grid-template-columns: 1fr; gap: 32px; }
	.pd-hero__visual { min-height: 260px; }
	.pd-visual__phone { width: 104px; right: 4%; }
	.pd-about { grid-template-columns: 1fr; }
	.pd-about__media { order: -1; }
	.pd-lower { grid-template-columns: 1fr; }
	.pd-story-block--left, .pd-story-block--right { grid-template-columns: 1fr; }
	.pd-story-block--right .pd-story-block__media { order: 0; }
}

@media (max-width: 768px) {
	.pd-meta__row { gap: 20px 24px; padding: 20px 0; }
	.pd-section { padding: 48px 0; }
	.pd-features__row { grid-template-columns: repeat(2, 1fr); }
	.pd-tech__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pd-related__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.pd-cta__layout { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
	.pd-features__row { grid-template-columns: 1fr; }
	.pd-story__row { flex-direction: column; }
	.pd-story-block { flex-basis: 100%; }
	.pd-related__grid { grid-template-columns: 1fr; }
	.pd-visual__phone { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pd-story-block__media img { transition: none; }
	.pd-story-block__media:hover img { transform: none; }
}

/* Folded phones / very narrow screens (< 360px): one tech tile per row. */
@media (max-width: 359px) {
	.pd-tech__grid { grid-template-columns: minmax(0, 1fr); }
}

/* "Čo som zastrešoval": the author's own scope on the project. */
.pd-about__scope { margin-top: 32px; padding-top: 24px; border-top: 1px solid #dfe0df; }
.pd-about__scope h3 { margin: 0 0 4px; color: var(--home-ink); font-size: 17px; font-weight: 650; letter-spacing: -.015em; }

/* Meta icons for the agency partner (two linked circles) and my role (code brackets). */
.pd-meta__item[data-icon="partner"] i::before, .pd-meta__item[data-icon="partner"] i::after { position: absolute; top: 50%; width: 11px; height: 11px; border: 1.5px solid var(--home-red); border-radius: 50%; content: ''; transform: translateY(-50%); }
.pd-meta__item[data-icon="partner"] i::before { left: 8px; }
.pd-meta__item[data-icon="partner"] i::after { left: 15px; }
.pd-meta__item[data-icon="role"] i::before { position: absolute; top: 50%; left: 50%; color: var(--home-red); font: 700 12px/1 var(--font-sans); content: '</>'; transform: translate(-50%, -50%); }

