:root {
  /* palette: color.adobe.com Neutral Palette (40352C, A69B92, D9D0C7, F2EEEB, 0D0D0D) */
  --bg: #f2eeeb;
  --fg: #0d0d0d;
  --muted: #6e645b;
  --line: #d9d0c7;
  --accent: #a69b92;
  --dark: #262626;  /* anthracite */
  --pad: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Inter Tight", system-ui, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, .slider-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header + footer */
header { position: absolute; inset: 0 0 auto; z-index: 10; background: linear-gradient(rgba(0,0,0,.45), transparent); display: flex; justify-content: space-between; align-items: center; padding: 20px var(--pad); color: #fff; }
header.solid { position: static; background: none; color: var(--fg); }  /* sub-pages without a hero photo */
.logo { font-size: 20px; letter-spacing: .02em; }
.logo b { font-weight: 800; } .logo span { font-weight: 300; }
nav { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
header nav { font-weight: 300; }
nav a:hover { opacity: .6; }
/* phones: the header menu shows only its last link (Kontakt) */
@media (max-width: 640px) { header nav a:not(:last-child) { display: none; } }
footer { padding: 24px var(--pad); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
footer nav { text-transform: none; letter-spacing: 0; font-size: 13px; flex-wrap: wrap; }
main:has(.pager) ~ footer { border-top: 0; }  /* project pages: pager and footer share the tinted page colour */

/* Hero: full-screen photo with the title at the bottom; .small on project pages */
.hero { position: relative; height: 100svh; min-height: 520px; color: #fff; display: flex; align-items: flex-end; padding: var(--pad); overflow: hidden; }
.hero.small { height: 80svh; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; animation: zoom 20s ease-out both; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 60%); z-index: -1; }
.hero h1 { font-size: clamp(40px, 9vw, 128px); font-weight: 800; line-height: .92; letter-spacing: -.03em; }
.hero.small h1 { font-size: clamp(36px, 6vw, 88px); max-width: 16ch; }
.hero h1 .line { display: block; overflow: hidden; }  /* homepage title lines rise out of a mask */
.hero h1 .line > * { display: block; animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 .line:nth-child(2) > * { animation-delay: .15s; }
.hero h1 .line span { font-weight: 300; }
.hero p { margin-top: 20px; max-width: 34ch; font-size: clamp(16px, 1.6vw, 20px); font-weight: 300; animation: fade 1s .7s both; }
@keyframes zoom { from { transform: scale(1.08); } }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }

/* Sections, headings, small labels */
section { padding: clamp(72px, 12vw, 160px) var(--pad); }
#projekty, #oceneni, #sluzby, #o-nas, #media, #kontakt { padding-block: clamp(48px, 6vw, 88px); }  /* homepage: one equal spacing */
section.page { padding-top: 48px; }  /* Projekty, Média */
.tone { background: var(--dark); color: var(--bg); --line: rgba(242,238,235,.16); --muted: #a69b92; }  /* dark homepage sections */
h2 { font-size: clamp(32px, 5vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; max-width: 18ch; }
#projekty h2 { max-width: none; }  /* one line on wide screens */
.eyebrow { font-size: 13px; font-weight: 300; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 24px; }
.hero .eyebrow { color: #ddd; }
/* labels set like the header menu: O nás, Kontakt, Ateliér…, Investor / Lokalita */
#o-nas .eyebrow, #kontakt .eyebrow, .contact-info h3, .info dt { font-size: 14px; font-weight: 300; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.more { display: inline-block; margin-top: 56px; border-bottom: 1px solid var(--fg); padding-bottom: 4px; font-weight: 600; }
.more:hover { color: var(--accent); border-color: var(--accent); }

/* Project / press cards */
.grid { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 48px 24px; }
.card figure { aspect-ratio: 4/3; overflow: hidden; background: var(--line); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.05); }
.card h3 { margin-top: 16px; font-size: 18px; font-weight: 600; }
.card p { font-size: 14px; color: var(--muted); }
#press { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }  /* 4 in a row on landscape screens, 2×2 on portrait */
@media (orientation: landscape) { #press { grid-template-columns: repeat(4, 1fr); } }
#press .card h3 { font-weight: 300; }

/* Homepage slider: swipe / arrows, 4 cards visible (2 on portrait); arrows half over the photos */
.slider-wrap { position: relative; margin-top: 56px; container-type: inline-size; --gap: 16px; --n: 2; }
@media (orientation: landscape) { .slider-wrap { --n: 4; } }
.slider { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slider .card { flex: 0 0 calc((100cqw - (var(--n) - 1) * var(--gap)) / var(--n)); scroll-snap-align: start; }
.slider-arrow { position: absolute; z-index: 2; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  top: calc((100cqw - (var(--n) - 1) * var(--gap)) / var(--n) * .375 - 17px);  /* middle of the 4:3 photos */
  background: rgba(242, 238, 235, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(13, 13, 13, .06); color: rgba(13, 13, 13, .75); transition: background .25s, color .25s; }
.slider-arrow svg { display: block; }
.slider-arrow:hover { background: rgba(242, 238, 235, .9); color: var(--fg); }
.slider-arrow.prev { left: calc(-1 * min(17px, var(--pad) - 4px)); }  /* the narrow phone gutter keeps them on screen */
.slider-arrow.next { right: calc(-1 * min(17px, var(--pad) - 4px)); }

/* Homepage: awards, services, about, contact */
.awards, .media, .timeline, .services { list-style: none; padding: 0; }
.awards { margin-top: 40px; border-top: 1px solid var(--line); }
.awards li { display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.awards time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.awards b { display: block; font-size: 18px; font-weight: 600; }
.awards span { color: var(--muted); font-size: 15px; }
.awards a { font-size: 15px; white-space: nowrap; }
@media (max-width: 640px) {
  .awards li { grid-template-columns: 56px 1fr; gap: 4px 16px; }
  .awards a { grid-column: 2; white-space: normal; }
}
.services { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; border-top: 1px solid var(--line); }  /* 4 / 2 / 1 columns */
@media (orientation: landscape) { .services { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 540px) { .services { grid-template-columns: 1fr; } }
.services li { padding: 32px 24px 32px 0; border-bottom: 1px solid var(--line); }
.services h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.services p { color: var(--muted); font-size: 15px; }
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 56px; }
.about .lead { font-size: clamp(18px, 1.8vw, 22px); font-weight: 300; margin-top: 24px; max-width: 46ch; }
.timeline { border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.contact-info { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; font-size: 16px; }
.contact-info h3 { margin-bottom: 8px; }
.social { display: inline-flex; align-items: center; gap: 8px; }
.social svg { width: 18px; height: 18px; flex: none; }
.awards a:hover, .contact-info a:hover, .text a:hover, .pager a:hover b, .media a:hover { color: var(--accent); }

/* Projekty: category filter */
.filters { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: inherit; font-size: 14px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--fg); cursor: pointer; }
.filters button:hover { border-color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Project page */
.badges { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { font-size: 14px; padding: 6px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 99px; background: rgba(0,0,0,.25); }
.badges:empty { display: none; }
section:has(> .text) { padding-block: clamp(32px, 4vw, 56px); }  /* short description, close to hero and photos */
.text { max-width: 68ch; font-size: 17px; }
.text p { font-size: clamp(17px, 1.75vw, 21px); font-weight: 300; line-height: 1.5; }
.text p + p { margin-top: 1em; }
.text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text .credit { margin-top: 12px; font-size: 13px; color: var(--muted); }
/* gallery in justified rows (built in projekt.html): each photo's width share = its proportions (--r) */
.gallery { padding-block: 0; display: grid; gap: 16px; }
.hero + .gallery { padding-top: var(--pad); }  /* project without a description */
.gallery .row { display: flex; gap: 16px; }
.gallery button { flex: var(--r) 1 0; min-width: 0; padding: 0; border: 0; background: var(--line); cursor: zoom-in; }
.gallery img, .gallery video { display: block; width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: opacity .3s; }
.gallery button:hover > * { opacity: .85; }
.info { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 48px var(--pad) 0; }  /* Investor / Lokalita */
.info dd { margin: 4px 0 0; font-size: 17px; }
.pager { display: flex; justify-content: space-between; gap: 24px; padding: 72px var(--pad) 48px; }  /* evenly between photos and footer */
.pager a { max-width: 45%; }
.pager a:last-child { text-align: right; }
.pager small { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.pager b { font-size: clamp(18px, 2.4vw, 28px); font-weight: 600; }

/* Lightbox */
dialog { max-width: none; max-height: none; width: 100vw; height: 100vh; border: 0; padding: 0; background: rgba(10,10,10,.96); color: #fff; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog img, dialog video { width: 100%; height: 100%; object-fit: contain; padding: 56px 16px; }
dialog [hidden] { display: none; }
dialog button { position: absolute; background: none; border: 0; color: #fff; font: inherit; font-size: 32px; padding: 16px 20px; cursor: pointer; opacity: .7; }
dialog button:hover { opacity: 1; }
dialog .prev { left: 0; top: 50%; transform: translateY(-50%); }
dialog .next { right: 0; top: 50%; transform: translateY(-50%); }
dialog .close { right: 0; top: 0; }
dialog .count { position: absolute; left: 20px; top: 20px; font-size: 14px; opacity: .7; }

/* Média page: one list, like the awards */
.media { margin-top: 40px; border-top: 1px solid var(--line); }
.media li { display: grid; grid-template-columns: 56px 1fr minmax(0, 220px); gap: 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.media time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.media li > div { min-width: 0; }
.media li > div a { display: block; font-size: 17px; font-weight: 600; }
.media span { color: var(--muted); font-size: 14px; }
.media .proj { font-size: 14px; text-align: right; }
@media (max-width: 640px) {
  .media li { grid-template-columns: 1fr; gap: 4px; }
  .media .proj { text-align: left; }
}

/* Scroll reveal (classes added by site.js, so content stays visible without JS) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s, transform .8s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
