/* ONN Architects – specialization pages: shared styles
   (hero crossfade, big numbers, calm reference list, project gallery layer). */

/* ── Hero: three photos from the category's references crossfade slowly ── */
.hero-fade { position: absolute; inset: 0; overflow: hidden; }
.hero-fade img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 1.5s ease;
    animation: hero-zoom 20s ease-in-out infinite alternate;
}
.hero-fade img.is-on { opacity: 0.4; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }

/* ── Big numbers (same format on every specialization and on the home page) ── */
.stat-block { border-left: 2px solid #583E82; padding: 0.5rem 0 0.5rem 1.5rem; }
.stat-num { font-size: clamp(2.25rem, 3.6vw, 3.75rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; color: #111; margin-bottom: 0.5rem; }
.stat-num--text { font-size: clamp(1.5rem, 2.3vw, 2.25rem); letter-spacing: -0.03em; }

/* ── References: a calm editorial list, one project per row ── */
.ref-list { border-top: 1px solid rgba(17,17,17,0.12); }
.ref-row {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem;
    padding: 2.75rem 0; border-bottom: 1px solid rgba(17,17,17,0.12); align-items: center;
}
.ref-row__media { overflow: hidden; background: #e7e7ea; }
.ref-row .ref-media {
    width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ref-row:hover .ref-media { transform: scale(1.03); }
.ref-row__title { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.98; color: #111; margin: 0 0 1rem; }
.ref-row__lead { color: #6b6b6b; font-weight: 300; line-height: 1.65; margin: 0; max-width: 34rem; }
.ref-facts { margin: 1.5rem 0 0; padding: 1rem 0 0; border-top: 1px solid rgba(17,17,17,0.1); display: grid; gap: 0.45rem; }
.ref-facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.ref-facts dt { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #6b6b6b; }   /* #888 was 3.5:1 on white */
.ref-facts dd { margin: 0; font-size: 0.92rem; line-height: 1.45; color: #1a1a1a; }
@media (max-width: 480px) { .ref-facts > div { grid-template-columns: 1fr; gap: 0.1rem; } .ref-facts > div + div { margin-top: 0.35rem; } }
.ref-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ref-gal-btn {
    display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer;
    padding: 0.8rem 1.4rem; border-radius: 999px; border: 1px solid rgba(17,17,17,0.22);
    background: transparent; color: #111; font: inherit; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.ref-gal-btn svg { width: 1rem; height: 1rem; }
.ref-gal-btn:hover { background: #111; border-color: #111; color: #fff; }
.ref-gal-btn:focus-visible { outline: 2px solid #583E82; outline-offset: 3px; }
/* Direct links to one reference (…/rezidencni.html#zalanka): land below the header, flash the row once. */
.ref-row[id] { scroll-margin-top: 5.5rem; }
@keyframes ref-target {
    0%, 25% { background-color: rgba(217, 203, 226, 0.55); box-shadow: 0 0 0 1rem rgba(217, 203, 226, 0.55); }
    100% { background-color: rgba(217, 203, 226, 0); box-shadow: 0 0 0 1rem rgba(217, 203, 226, 0); }
}
.ref-row:target { animation: ref-target 3s ease-out 0.5s both; }
@media (prefers-reduced-motion: reduce) { .ref-row:target { animation: none; } }
@media (min-width: 1024px) {
    .ref-row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3.5rem; padding: 3.5rem 0; }
    .ref-row__media { grid-column: span 7; }
    .ref-row__body { grid-column: span 5; }
    .ref-row:nth-child(even) .ref-row__media { order: 2; }
}

/* Drobné stavby: the smaller projects as a quiet grid */
.mini-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: minmax(0, 1fr); margin-top: 3.5rem; }
@media (min-width: 640px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mini-card__media { overflow: hidden; background: #e7e7ea; margin-bottom: 1.1rem; }
.mini-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.mini-card:hover .mini-card__media img { transform: scale(1.04); }
.mini-card__type { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: #583E82; margin-bottom: 0.5rem; display: block; }
.mini-card h3 { font-size: 1.35rem; font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 0.5rem; color: #111; }
.mini-card p { font-size: 0.92rem; line-height: 1.55; font-weight: 300; color: #6b6b6b; margin: 0; }

/* ── Project gallery: a separate layer over the page ── */
.gal { position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: #111; overflow-y: auto; }
.gal::backdrop { background: rgba(0,0,0,0.6); }
.gal[open] { animation: gal-in 0.35s ease; }
@keyframes gal-in { from { opacity: 0; } to { opacity: 1; } }
/* The layer is one screen: header, the big picture filling what is left, thumbnails. */
.gal__inner { max-width: 90rem; margin: 0 auto; padding: 1.25rem 1.25rem 1.25rem; min-height: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
@media (min-width: 768px) { .gal__inner { padding: 1.75rem 2.5rem 1.75rem; } }
/* Close button sits beside eyebrow + title only; the description runs the full width below
   (on phones it was squeezed into a narrow column next to the button – Jakub, 24. 9. 2026). */
.gal__bar { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.gal__bar > div { display: contents; }
.gal__eyebrow { grid-column: 1; grid-row: 1; }
.gal__title { grid-column: 1; grid-row: 2; }
.gal__close { grid-column: 2; grid-row: 1 / span 2; }
.gal__text { grid-column: 1 / -1; grid-row: 3; }
.gal__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gal__eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: #583E82; display: block; margin-bottom: 0.6rem; }
.gal__title { font-size: clamp(1.75rem, 3.4vw, 3rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.98; margin: 0; }
.gal__text { margin: 0.75rem 0 0; max-width: 52rem; color: #6b6b6b; font-weight: 300; line-height: 1.6; font-size: 0.95rem; }
.gal__close {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
    padding: 0.7rem 1.2rem; border-radius: 999px; border: 1px solid rgba(17,17,17,0.2); background: #fff; color: #111;
    font: inherit; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.gal__close:hover { background: #111; color: #fff; }
.gal__close svg { width: 1rem; height: 1rem; }
.gal__stage { position: relative; flex: 1 1 auto; min-height: 240px; background: #f1f1f3; }
.gal__media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gal__media img, .gal__media video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.gal__nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px;
    border: 1px solid rgba(17,17,17,0.15); background: rgba(255,255,255,0.9); color: #111; display: grid; place-items: center; cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.gal__nav:hover { background: #111; color: #fff; }
.gal__nav svg { width: 20px; height: 20px; }
.gal__nav--prev { left: 1rem; } .gal__nav--next { right: 1rem; }
.gal__count { position: absolute; right: 1rem; bottom: 1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; background: rgba(255,255,255,0.9); padding: 0.35rem 0.7rem; border-radius: 999px; }
.gal__thumbs { flex: 0 0 auto; display: flex; gap: 0.6rem; margin-top: 0.9rem; overflow-x: auto; padding-bottom: 0.2rem; }
.gal__thumb { position: relative; flex: 0 0 auto; width: 6.5rem; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; background: #eee; cursor: pointer; opacity: 0.55; transition: opacity 0.25s ease, border-color 0.25s ease; }
.gal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal__thumb:hover { opacity: 1; }
.gal__thumb[aria-current="true"] { opacity: 1; border-color: #583E82; }
.gal__thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,0.25); }
.gal__thumb-play svg { width: 1.6rem; height: 1.6rem; }
.gal button:focus-visible { outline: 2px solid #583E82; outline-offset: 2px; }
html.gal-lock { overflow: hidden; }
/* Short or narrow screens: let the layer scroll instead of squeezing the picture. */
@media (max-height: 560px), (max-width: 640px) { .gal__inner { height: auto; } .gal__stage { flex: 0 0 auto; height: 62vw; min-height: 220px; } }

@media (prefers-reduced-motion: reduce) {
    .hero-fade img { animation: none; transition: none; }
    .ref-row .ref-media, .mini-card__media img { transition: none; }
    .ref-row:hover .ref-media, .mini-card:hover .mini-card__media img { transform: none; }
    .gal[open] { animation: none; }
}

/* author display rules must not beat the hidden attribute */
.gal [hidden] { display: none !important; }

/* ── Service items ("Co umíme", "Co pro vás zařídíme"): a small, calm hover.
   The item itself never moves (its entrance stagger owns the transform), only
   what is inside it: a purple line runs along the top rule, the number steps
   right, the title turns purple and the copy darkens. ── */
.svc-card { position: relative; cursor: default; }
.svc-card::before {
    content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 2px; background: #583E82;
    transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-card:hover::before { width: 100%; }
.svc-card .svc-num { display: inline-block; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.svc-card:hover .svc-num { transform: translateX(8px); }
.svc-card h3 { transition: color 0.3s ease; }
.svc-card:hover h3 { color: #583E82; }
.svc-card p { transition: color 0.3s ease; }
.svc-card:hover p { color: #333; }
@media (prefers-reduced-motion: reduce) {
    .svc-card::before, .svc-card .svc-num { transition: none; }
    .svc-card:hover .svc-num { transform: none; }
}

/* Half-O arcs from the ONN logo around the main pill buttons – same as the home-page hero. */
.cta-with-arcs { position: relative; display: inline-flex; align-items: center; }
.cta-with-arcs > a { position: relative; z-index: 2; }
.cta-arc {
    position: absolute; top: 50%; z-index: 1; pointer-events: none;
    width: 3.5rem; height: auto; filter: brightness(0) invert(1);
    transition: transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.cta-arc-left  { left: 0.75rem;  transform: translate(0, -50%) rotate(90deg); }
.cta-arc-right { right: 0.75rem; transform: translate(0, -50%) rotate(-90deg); }
@media (hover: hover) {
    .cta-with-arcs:hover .cta-arc-left  { transform: translate(-165%, -50%) rotate(90deg); }
    .cta-with-arcs:hover .cta-arc-right { transform: translate(165%, -50%) rotate(-90deg); }
}
@media (prefers-reduced-motion: reduce) { .cta-arc { transition: none; } }

/* CZ / EN picker in the header (all screen sizes) */
.lang-switch { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 2px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; line-height: 1; }
.lang-switch > * { display: inline-block; padding: 0.42rem 0.6rem; border-radius: 999px; color: rgba(255,255,255,0.7); text-decoration: none; transition: background-color 0.3s ease, color 0.3s ease; }
.lang-switch > [aria-current="true"] { background: #fff; color: #111; }
.lang-switch > a:hover { color: #fff; background: rgba(255,255,255,0.12); }
.lang-switch > a:focus-visible { outline: 2px solid #D9CBE2; outline-offset: 2px; }
/* CZ/EN switch hidden for now (Jakub, 24. 9. 2026) – delete these two rules to show it again. */
.lang-switch { display: none; }
div:has(> .lang-switch--menu) { display: none; }
