/* Portfolio page: what home.css and pages.css do not have. The film has its own file, portfolio-mac.css. */

/* Hero: text on the header's edge, the three real phones on the plane, whole. Their sizes keep the ratio of the renders. */
.hm-pf-hero { display: grid; gap: 40px 12px; }
.hm-pf-trio { position: relative; width: 100%; max-width: 640px; margin-inline: auto; aspect-ratio: 1080 / 984; }
.hm-pf-trio img { position: absolute; max-width: none; height: auto; }
.hm-pf-trio__a { left: 0; bottom: 1%; width: 36.4%; }
.hm-pf-trio__b { left: 28.1%; bottom: 0; z-index: 1; width: 43.06%; }
.hm-pf-trio__c { right: 0; bottom: 1%; width: 36.9%; }
.pfm-live .hm-pf-hero { padding-bottom: 64px; }

/* A project: the text, the object, the facts. On a wide window the facts sit under the text, at the object's bottom edge. */
.hm-pf-proj { display: grid; gap: 24px 12px; }
.hm-pf-proj__txt .hm-p { max-width: 32rem; margin-top: 16px; }
.hm-pf-proj__txt .hm-more { margin: 12px 0 -12px; }
.hm-pf-status { margin-top: 12px; color: var(--i3); font: var(--t13); letter-spacing: 0; }
.hm-pf-onpaper { display: none; }
.hm-pf-nb { white-space: nowrap; }

/* The surface's height and the phone's place: the phone runs into the label row, which makes it a shelf. */
.hm-pf-ph .hm-surf { flex: 1 1 auto; min-height: 100cqw; }
.hm-pf-ph .hm-phone, .hm-pf-zm img { position: absolute; left: 50%; top: 24px; width: 66cqw; max-width: none; transform: translateX(-50%); }
/* On a plain plate a shadow only draws a dirty halo. The silver rim is edge enough, the window keeps its hairline. */
.hm-plate .hm-phone > img { filter: none; }
.hm-plate .hm-win { box-shadow: 0 0 0 1px rgba(255, 255, 255, .09); }

.hm-plate video::-webkit-media-controls-start-playback-button, .hm-pf-reel video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* The label wraps, the control stays in its row. */
.hm-pf-ph .hm-plate__foot, .hm-pf-kin .hm-plate__foot { flex-wrap: nowrap; }

/* A round control in a label row or above the rail. Flat, the colour of a tag. */
.hm-pf-btn { display: grid; flex: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; touch-action: manipulation; transition: transform 180ms var(--e1), background-color 120ms linear; }
.hm-pf-btn svg { width: 16px; height: 16px; }
.hm-pf-btn--lg { width: 44px; height: 44px; }
.hm-pf-btn--prev svg { transform: scaleX(-1); }
.hm-pf-btn[disabled] { opacity: .32; pointer-events: none; }
.hm-pf-btn[data-state="playing"] .i-play, .hm-pf-btn[data-state="paused"] .i-pause, .hm-pf-btn[data-state="on"] .i-off, .hm-pf-btn[data-state="off"] .i-on { display: none; }

/* Bistro Kinečko: head, then one plate as wide as the page. */
.hm-pf-kinhead { display: grid; gap: 20px 12px; margin-bottom: 24px; }
.hm-pf-kin .hm-surf { flex: none; height: 77cqw; }
.hm-pf-kin .hm-win { left: 16px; top: 16px; width: 124cqw; }
.hm-pf-kin .hm-phone { right: 14px; top: 13cqw; width: 34cqw; }

/* The admin: three views in one grid cell, so nothing below moves when the tab changes. */
.hm-pf-admin { margin-top: 48px; }
.hm-pf-admin .hm-h2 { letter-spacing: -.012em; }
/* Two sentences, each starts its own line, whatever the width. */
.hm-pf-admin .hm-h2 span { display: block; }
.hm-pf-views { display: grid; }
.hm-pf-view { display: grid; grid-area: 1 / 1; min-width: 0; border-radius: 16px; transition: opacity 120ms linear 80ms, visibility 0s; }
.hm-pf-view[hidden] { display: grid !important; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 80ms linear, visibility 0s linear 80ms; }
.hm-pf-view .hm-surf { flex: none; height: calc(61.3cqw + 14px); }
.hm-pf-view .hm-win { left: 3.74cqw; right: 3.74cqw; top: 3.74cqw; }
.hm-pf-view .hm-plate__foot { flex: 1 1 auto; align-items: flex-start; min-height: 0; padding-block: 15px; color: var(--i2); font: var(--t14r); }
.hm-pf-view--qr .hm-phone { left: 50%; top: 3.74cqw; width: 50cqw; transform: translateX(-50%); }
.hm-pf-view--qr .hm-phone__scr img { width: 100%; height: 100%; object-fit: cover; }
.hm-pf-tabs.hm-tabs { order: 0; margin: 12px 0 0; }

/* Video: the section is as wide as the window, its head and the rail's first card on the header's edge. */
.hm-pf-video { margin-top: var(--sec); }
.hm-pf-video__head { width: var(--hw); margin-inline: auto; }
.hm-pf-video__head .hm-p { max-width: 40rem; }
.hm-pf-arrows { display: none; flex: none; align-self: flex-end; gap: 4px; }
.hm-pf-rail { --pad: calc((100% - var(--hw)) / 2); display: grid; grid-auto-flow: column; grid-auto-columns: 62vw; gap: 12px; margin-block: -4px; padding: 4px var(--pad); overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: var(--pad); scroll-snap-type: x mandatory; scrollbar-width: none; }
.hm-pf-rail::-webkit-scrollbar { display: none; }
.hm-pf-rail:focus-visible { outline-offset: -2px; }
.hm-pf-rail.is-dragging, .hm-pf-rail.is-dragging .pf-reel__hit { cursor: grabbing; }
.hm-pf-rail.is-dragging { scroll-snap-type: none; -webkit-user-select: none; user-select: none; }
.hm-pf-reel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: start; align-content: start; scroll-snap-align: start; }
.hm-pf-reel .hm-reel__v { grid-column: 1 / -1; }
.hm-pf-reel .hm-reel__v:active { transform: scale(.992); transition: none; }
.hm-pf-reel figcaption { grid-area: 2 / 1; font: var(--t14); text-wrap: balance; }
.hm-pf-reel figcaption span { display: block; color: var(--i3); font: var(--t13); letter-spacing: 0; }
.hm-pf-reel__ctl { display: flex; grid-area: 2 / 2; gap: 4px; }
.pf-reel__hit { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }

/* zmaturuj.app: measured numbers, each on its own hairline. */
.hm-pf-nums { margin-top: 28px; column-gap: 12px; row-gap: 0; }
.hm-pf-nums > div { padding: 14px 0 20px; border-top: var(--hl); }

/* How we work. */
.hm-pf-ways { row-gap: 0; }
.hm-pf-ways > div { padding: 20px 0 28px; border-top: var(--hl); }
.hm-pf-ways h3 { font: var(--t18); letter-spacing: -.004em; }
.hm-pf-ways p { margin-top: 4px; color: var(--i2); letter-spacing: -.004em; }

/* Closer */
.hm-pf-end .hm-start__mail { margin-top: 20px; }

@media (min-width: 640px) {
  .hm-pf-rail { grid-auto-columns: 34vw; }
  .hm-pf-arrows { display: flex; }
  /* A title that wraps must not push its column's text out of line with the others. */
  @supports (grid-template-rows: subgrid) {
    .hm-pf-ways > div { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  }
  .hm-pf-ph .hm-surf { min-height: 78cqw; }
  .hm-pf-ph .hm-phone, .hm-pf-zm img { width: 56cqw; }
  /* Window and phone stand side by side, whole, tops and bottoms level, with the same margin all round. */
  .hm-pf-kin .hm-surf { height: 50.62cqw; }
  .hm-pf-kin .hm-win { left: 1.85cqw; top: 1.85cqw; bottom: 1.85cqw; width: 71.75cqw; }
  .hm-pf-kin .hm-win__bar { height: 2cqw; min-height: 20px; }
  .hm-pf-kin .hm-win > img { height: calc(100% - max(2cqw, 20px)); object-fit: cover; object-position: 0 0; }
  .hm-pf-kin .hm-phone { right: 1.85cqw; top: 1.85cqw; width: 22.7cqw; }
}
@media (min-width: 800px) {
  .hm-pf-hero { gap: 56px 12px; }
  .hm-pf-kinhead { margin-bottom: 32px; }
  .hm-pf-admin { margin-top: 64px; }
  .hm-pf-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .hm-pf-nums > div { padding-left: 0; border-left: 0; }
}
@media (min-width: 1000px) {
  .hm-pf-hero { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .hm-pf-hero__txt { grid-column: 1 / span 5; }
  .hm-pf-trio { grid-column: 6 / -1; justify-self: end; width: 94.3%; max-width: none; margin-inline: 0; aspect-ratio: 1000 / 838; }
  .hm-pf-trio__a { width: 33.4%; }
  .hm-pf-trio__b { left: 30.2%; width: 39.6%; }
  .hm-pf-trio__c { width: 33.9%; }
  .hm-pf-proj { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; }
  .hm-pf-proj__txt, .hm-pf-proj__list { grid-column: 1 / span 5; }
  .hm-pf-proj__list { grid-row: 2; align-self: end; }
  .hm-pf-proj__obj { grid-column: 7 / -1; grid-row: 1 / span 2; min-width: 0; }
  .hm-pf-kinhead { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .hm-pf-kinhead > .hm-pf-proj__txt { grid-column: 1 / span 5; }
  .hm-pf-kinhead > .hm-rows { grid-column: 7 / -1; }
  /* The values start on column 9, where the Lighthouse row above has its hairline. */
  .hm-pf-kinhead > .hm-rows > div { grid-template-columns: calc((100% - 60px) / 3 + 12px) minmax(0, 1fr); }
  .hm-pf-rail { grid-auto-columns: calc((100% - 36px) / 4); }
}
/* A narrow text column makes the tile tall: the phone grows with it, so it always runs into the label row. */
@media (min-width: 1000px) and (max-width: 1199px) {
  .hm-pf-ph .hm-phone, .hm-pf-zm img { width: 62cqw; }
}
@media (min-width: 1200px) {
  .hm-pf-end { margin-top: 160px; }
}
/* The four links in one row where it fits beside the phones, otherwise two and two: never three and an orphan. */
@media (min-width: 1000px) and (max-width: 1399px) {
  .hm-pf-hero .hm-phero__cta { display: grid; grid-template-columns: repeat(2, max-content); }
}
@media (min-width: 1400px) {
  .hm-pf-hero .hm-phero__cta { flex-wrap: nowrap; width: max-content; }
}
@media (max-height: 500px) {
  .hm-pf-trio { max-width: 360px; }
}
@media (hover: hover) and (pointer: fine) {
  .hm-pf-rail { cursor: grab; }
}
@media (hover: hover) {
  .hm-pf-btn:hover { background: rgba(255, 255, 255, .18); }
}
/* After the hover, or a press would change nothing. */
.hm-pf-btn:active { transform: scale(.94); transition: none; }
@media (pointer: coarse) {
  .hm-pf-btn { width: 44px; height: 44px; }
  .hm-pf-ph .hm-plate__foot, .hm-pf-kin .hm-plate__foot { padding-block: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-pf-btn:active, .hm-pf-reel .hm-reel__v:active { transform: none; opacity: .7; }
  .hm-pf-view, .hm-pf-view[hidden] { transition: none; }
}
@media (prefers-contrast: more) {
  .hm-pf-btn { box-shadow: inset 0 0 0 1px var(--l2); }
}
@media (forced-colors: active) {
  .hm-pf-btn { border: 1px solid ButtonText; }
}

/* JavaScript off: every view stays readable, the posters stand in for the videos, the controls go. */
@media (scripting: none) {
  .hm-pf-btn, .hm-pf-arrows, .pf-reel__hit { display: none !important; }
  .hm-pf-views { row-gap: 12px; }
  .hm-pf-view, .hm-pf-view[hidden] { grid-area: auto; visibility: visible; opacity: 1; }
  .hm-pf-reel .hm-reel__v video { display: block !important; }
  .hm-pf-phzd .hm-phone__scr { background: url(portfolio/zd-poster.jpg?v=20261025a) center / cover; }
  .hm-pf-kin .hm-phone__scr { background: url(portfolio/kin-live-poster.jpg?v=20261108a) center / cover; }
}

/* Paper: what the moving parts say stays, the moving parts go. */
@media print {
  .hm-pf-onpaper { display: inline; }
  .hm-pf-trio, .hm-pf-btn, .hm-pf-arrows, .hm-pf-phzd, .hm-pf-kin, .hm-pf-view--qr .hm-surf, .hm-pf-zm .hm-surf, .hm-pf-reel .hm-reel__v { display: none !important; }
  .hm-pf-hero { padding-bottom: 0 !important; }
  .hm-pf-proj, .hm-pf-kinhead { display: block; }
  .hm-pf-proj > * + *, .hm-pf-kinhead > * + * { margin-top: 16px; }
  .hm-pf-admin { margin-top: 32px; }
  .hm-pf-view, .hm-pf-view[hidden] { display: block !important; grid-area: auto; visibility: visible; opacity: 1; }
  .hm-pf-views { row-gap: 12px; }
  .hm-pf-rail { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); width: var(--hw); margin: 12px auto 0; padding: 0; overflow: visible; }
  .hm-pf-video { margin-top: 32px; }
  .hm-pf-end { margin-top: 32px; }
}
/* The list above already ends on a hairline: two with nothing between them read as an empty row. */
#zeleny-dvor .hm-lh { border-top: 0; padding-top: 0; }
