/* ==========================================================================
   KAMA design — štýly
   1. Písma  2. Premenné  3. Základ  4. Spoločné prvky  5. Hlavička
   6. Úvod  7. Prístup  8. Projekty  9. Služby  10. Spolupráca
   11. O mne  12. Kontakt  13. Pätička  14. Detail projektu  15. Pohyb
   ========================================================================== */

/* 1. Písma (uložené lokálne, bez externých služieb) ----------------------- */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 300 500; font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 300 500; font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Premenné ------------------------------------------------------------- */
:root {
  --paper: #f6f2eb;        /* teplá slonovinová – hlavné pozadie */
  --paper-deep: #ece5d9;   /* greige – striedanie sekcií */
  --ink: #26231f;          /* teplá antracitová – text */
  --ink-soft: #5d564d;     /* tlmený text */
  --line: #d8cfc1;         /* jemné deliace čiary */
  --wood: #9a7650;         /* dubový akcent */
  --sage: #646b54;         /* olivový akcent */
  --night: #24211d;        /* tmavé sekcie */
  --night-line: rgba(246, 242, 235, 0.18);
  --night-soft: rgba(246, 242, 235, 0.72);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --max: 82rem;
  --header-h: 5.5rem;      /* hlavička po posunutí stránky */
  --header-top: 8.75rem;   /* hlavička na začiatku stránky */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 3. Základ --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}
.contact :focus-visible,
.hero :focus-visible,
.site-header:not(.is-solid):not(.is-open) :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--ink); color: var(--paper);
  text-decoration: none; font-size: 0.9rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* 4. Spoločné prvky ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.eyebrow {
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sage);
}
.eyebrow::before {
  content: ""; width: 2rem; height: 1px; background: currentColor; flex: none;
}
.eyebrow-light { color: rgba(255, 255, 255, 0.82); }

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-head {
  display: grid; gap: 1.5rem 4rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-note { max-width: 26rem; color: var(--ink-soft); font-size: 1rem; }
@media (min-width: 56rem) {
  .section-head { grid-template-columns: 1fr auto; align-items: end; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.85rem 1.9rem;
  border: 1px solid transparent; border-radius: 0;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  text-align: center;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding-block: 0.6rem;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.text-link::after { content: "→"; font-size: 1rem; letter-spacing: 0; }
.text-link:hover { color: var(--wood); gap: 1.1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.5;
}

.wordmark {
  --mark: 7.5rem;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  flex: none; width: var(--mark); height: var(--mark);
  border: 2.5px solid currentColor; border-radius: 50%;
  background: rgba(22, 19, 16, 0.32);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-decoration: none; line-height: 1; white-space: nowrap;
  transform-origin: left center;
  transition: background-color 0.25s var(--ease), transform 0.35s var(--ease);
}
.wordmark:hover { background: rgba(22, 19, 16, 0.5); }
.is-solid .wordmark, .is-open .wordmark, .site-footer .wordmark { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.is-solid .wordmark:hover, .is-open .wordmark:hover, .site-footer .wordmark:hover { background: rgba(127, 127, 127, 0.14); }
.wordmark-kama {
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.34em; margin-right: -0.34em;
}
.wordmark-design {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.3rem;
  letter-spacing: 0.01em; margin-top: 0.3rem; padding-bottom: 0.15rem;
}

.site-header.is-solid .wordmark { transform: scale(0.62); }

/* 5. Hlavička ------------------------------------------------------------- */
.site-header {
  --h: var(--header-top);
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: #fff;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-header.is-solid {
  --h: var(--header-h);
  background: rgba(246, 242, 235, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: var(--h);
  transition: height 0.35s var(--ease);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto; padding-inline: var(--gutter);
}

.site-nav ul { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.site-nav a {
  position: relative;
  display: inline-block; padding-block: 0.6rem;
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav .nav-cta {
  padding: 0.6rem 1.3rem; border: 1px solid currentColor;
  transition: background-color 0.25s var(--ease);
}
.site-nav .nav-cta:hover { background: #fff; color: var(--ink); border-color: #fff; }
.is-solid .site-nav .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.menu-toggle {
  display: none; align-items: center; gap: 0.75rem;
  min-height: 2.75rem; padding: 0.25rem 0 0.25rem 0.75rem; margin-right: -0.25rem;
  background: none; border: 0;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.menu-toggle-icon { position: relative; width: 1.6rem; height: 0.6rem; }
.menu-toggle-icon span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle-icon span:first-child { top: 0; }
.menu-toggle-icon span:last-child { top: 100%; }
.is-open .menu-toggle-icon span:first-child { top: 50%; transform: rotate(45deg); }
.is-open .menu-toggle-icon span:last-child { top: 50%; transform: rotate(-45deg); }

@media (max-width: 55.99rem) {
  :root { --header-h: 4.75rem; --header-top: 7.25rem; }
  .site-header .wordmark { --mark: 6.25rem; }
  .site-header.is-solid .wordmark { transform: scale(0.66); }
  .menu-toggle { display: inline-flex; }
  .site-header.is-open {
    background: var(--paper); color: var(--ink);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-bottom-color: var(--line);
  }
  .site-nav {
    position: fixed; inset: var(--h) 0 0 0;
    display: flex; flex-direction: column;
    padding: 1.5rem var(--gutter) 2.5rem;
    background: var(--paper); color: var(--ink);
    overflow-y: auto;
    visibility: hidden; opacity: 0;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .is-open .site-nav { visibility: visible; opacity: 1; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; margin-top: 2rem; }
  .site-nav a:not(.nav-cta) {
    display: block; padding-block: 1.1rem;
    font-family: var(--serif); font-weight: 300; font-size: 1.9rem;
    letter-spacing: -0.01em; text-transform: none;
  }
  .site-nav a:not(.nav-cta)::after { display: none; }
  .site-nav .nav-cta {
    display: flex; justify-content: center; align-items: center; min-height: 3.25rem;
    background: var(--ink); color: var(--paper); border-color: var(--ink);
    font-weight: 600; letter-spacing: 0.14em;
  }
}

/* 6. Úvod ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-top) + 2rem) 0 clamp(3rem, 7vw, 6rem);
  color: #fff;
  background: #6f6253;
  overflow: hidden;
}
.hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(26, 22, 18, 0.74) 0%, rgba(26, 22, 18, 0.4) 36%, rgba(26, 22, 18, 0.04) 68%),
    linear-gradient(to bottom, rgba(26, 22, 18, 0.5) 0%, rgba(26, 22, 18, 0) 24%),
    linear-gradient(to right, rgba(26, 22, 18, 0.38) 0%, rgba(26, 22, 18, 0) 62%);
}
.hero-content {
  position: relative; width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto; padding-inline: var(--gutter);
}
.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.9rem, 8.4vw, 7rem);
  line-height: 1; letter-spacing: -0.025em;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.hero h1 em { font-style: italic; font-weight: 300; white-space: nowrap; }
.hero-lead {
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem); line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-caption {
  position: absolute; right: var(--gutter); bottom: clamp(3rem, 7vw, 6rem);
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  writing-mode: vertical-rl; transform: rotate(180deg);
}
@media (max-width: 40rem) {
  .hero-image { object-position: 86% 50%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-caption { display: none; }
}

/* 7. Prístup -------------------------------------------------------------- */
.intro-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.intro-copy { display: grid; gap: 1.1rem; max-width: 34rem; margin-block: 2rem 2.25rem; color: var(--ink-soft); }
.intro-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 50%; }
.intro-figure figcaption,
.about-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft);
}
@media (min-width: 56rem) {
  .intro-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (max-width: 55.99rem) {
  .intro-figure img { aspect-ratio: 4 / 3; }
}

/* 8. Projekty ------------------------------------------------------------- */
.portfolio { background: var(--paper-deep); }

.filters { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.filter {
  position: relative;
  min-height: 2.75rem; padding: 0.5rem 0 0.9rem;
  background: none; border: 0;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.filter::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--ink); transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.filter[aria-pressed="true"]::after { transform: scaleX(1); }
.filter sup { margin-left: 0.3em; font-size: 0.7em; letter-spacing: 0; color: var(--ink-soft); }

.project-grid { display: grid; gap: clamp(2rem, 3vw, 2.75rem) clamp(1rem, 2vw, 1.75rem); grid-template-columns: 1fr; }

.project-card {
  display: block; width: 100%; padding: 0;
  background: none; border: 0; text-align: left;
}
.project-media { display: block; position: relative; overflow: hidden; background: #ddd5c8; aspect-ratio: 4 / 3; }
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.project-card:hover .project-media img,
.project-card:focus-visible .project-media img { transform: scale(1.035); }
.project-count {
  position: absolute; left: 0; bottom: 0;
  padding: 0.4rem 0.8rem;
  background: var(--paper); color: var(--ink);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
}
.project-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; }
.project-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.25; letter-spacing: -0.005em;
  transition: color 0.25s var(--ease);
}
.project-card:hover .project-title { color: var(--wood); }
.project-label {
  flex: none;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}

@media (min-width: 38rem) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid > li:last-child:nth-child(odd) { grid-column: span 2; }
  .project-grid > li:last-child:nth-child(odd) .project-media { aspect-ratio: 2 / 1; }
}
@media (min-width: 62rem) {
  .project-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .project-media { aspect-ratio: auto; height: clamp(19rem, 31vw, 31rem); }
  .project-grid > li:nth-child(6n + 1), .project-grid > li:nth-child(6n + 6) { grid-column: span 4; }
  .project-grid > li:nth-child(6n + 2), .project-grid > li:nth-child(6n + 5) { grid-column: span 2; }
  .project-grid > li:nth-child(6n + 3), .project-grid > li:nth-child(6n + 4) { grid-column: span 3; }
  .project-grid > li:last-child:nth-child(odd) { grid-column: span 6; }
  .project-grid > li:last-child:nth-child(odd) .project-media { aspect-ratio: auto; height: clamp(22rem, 40vw, 40rem); }
  .project-grid > li:nth-child(6n + 2) .project-meta,
  .project-grid > li:nth-child(6n + 5) .project-meta { flex-direction: column; gap: 0.35rem; }
}
@media (max-width: 30rem) {
  .project-meta { flex-direction: column; gap: 0.3rem; }
}

.noscript-note { padding: 2rem 0; color: var(--ink-soft); }

/* 9. Služby --------------------------------------------------------------- */
.services-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); }
.services-head > p:last-child { margin-top: 1.75rem; max-width: 28rem; color: var(--ink-soft); }
.service {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 0 1rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service-num {
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.15rem;
  color: var(--wood); padding-top: 0.3rem;
}
.service h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.8rem;
}
.service p { max-width: 38rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
@media (min-width: 56rem) {
  .services-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .services-head { position: sticky; top: calc(var(--header-h) + 2.5rem); }
}
@media (max-width: 30rem) {
  .service { grid-template-columns: 1fr; }
  .service-num { margin-bottom: 0.4rem; }
}

/* 10. Spolupráca ---------------------------------------------------------- */
.process { background: var(--paper-deep); }
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 0.3rem 1rem;
  padding-block: 1.6rem; border-top: 1px solid var(--line);
}
.step-num {
  grid-row: span 2;
  font-family: var(--serif); font-weight: 300; font-size: 2.6rem; line-height: 1;
  color: var(--wood);
}
.step h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.25;
  letter-spacing: -0.005em;
}
.step p { color: var(--ink-soft); font-size: 0.975rem; line-height: 1.65; }
@media (min-width: 62rem) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem; }
  .step {
    display: block; position: relative; padding: 2rem 0 0;
    border-top: 1px solid var(--ink);
  }
  .step::before {
    content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px;
    border-radius: 50%; background: var(--ink);
  }
  .step-num { display: block; font-size: 3.4rem; margin-bottom: 1.5rem; }
  .step h3 { margin-bottom: 0.7rem; min-height: 2.5em; }
}

/* 11. O mne --------------------------------------------------------------- */
.about-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about-figure { max-width: 30rem; }
.about-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.about-copy { display: grid; gap: 1.1rem; max-width: 35rem; margin-block: 2rem; color: var(--ink-soft); }
.signature {
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 56rem) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* 12. Kontakt ------------------------------------------------------------- */
.contact { background: var(--night); color: var(--paper); }
.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); }
.contact-intro > p:not(.eyebrow) { margin-top: 1.75rem; max-width: 28rem; color: var(--night-soft); }

.contact-list { margin-top: 2.5rem; display: grid; gap: 0; max-width: 28rem; }
.contact-list > div {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: baseline;
  padding-block: 0.9rem; border-top: 1px solid var(--night-line);
}
.contact-list > div:last-child { border-bottom: 1px solid var(--night-line); }
.contact-list dt {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--night-soft);
}
.contact-list dd a { text-decoration: none; border-bottom: 1px solid var(--night-line); transition: border-color 0.25s; overflow-wrap: anywhere; }
.contact-list dd a:hover { border-bottom-color: var(--paper); }
.contact-pending {
  margin-top: 2.5rem; padding: 1rem 1.25rem; max-width: 28rem;
  border: 1px dashed var(--night-line);
  font-size: 0.9rem; color: var(--night-soft);
}

.contact-form { display: grid; gap: 1.5rem; }
.field-row { display: grid; gap: 1.5rem; }
@media (min-width: 38rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label {
  display: block; margin-bottom: 0.35rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--night-soft);
}
.field .optional { font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 3rem;
  padding: 0.6rem 0; border: 0; border-bottom: 1px solid rgba(246, 242, 235, 0.4); border-radius: 0;
  background: transparent; color: var(--paper);
  font-size: 1.0625rem; line-height: 1.5;
  transition: border-color 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f6f2eb' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.25rem center; background-size: 0.75rem;
}
.field select option { color: var(--ink); background: var(--paper); }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--paper); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-bottom-color: var(--paper); box-shadow: 0 2px 0 0 var(--paper);
}
.field [aria-invalid="true"] { border-bottom-color: #e9a48f; }
.field-error { margin-top: 0.45rem; font-size: 0.875rem; color: #f0b3a0; }
.form-note { font-size: 0.9rem; color: var(--night-soft); max-width: 36rem; }
.contact-form .btn { justify-self: start; }

.draft { display: grid; gap: 1.1rem; }
.draft:focus { outline: none; }
.draft h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; }
.draft > p { color: var(--night-soft); max-width: 36rem; }
.draft textarea {
  width: 100%; padding: 1.1rem 1.25rem;
  border: 1px solid var(--night-line); border-radius: 0;
  background: rgba(246, 242, 235, 0.05); color: var(--paper);
  font-size: 0.95rem; line-height: 1.6; resize: vertical;
}
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; }
.btn-link {
  min-height: 2.75rem; padding: 0.4rem 0; background: none; border: 0;
  color: var(--night-soft); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 0.25em;
}
.btn-link:hover { color: var(--paper); }
.draft-status { min-height: 1.6em; font-size: 0.9rem; color: var(--paper); }
[hidden] { display: none !important; }

@media (min-width: 56rem) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
@media (max-width: 30rem) {
  .contact-form .btn, .draft-actions .btn { width: 100%; }
}

/* 13. Pätička ------------------------------------------------------------- */
.site-footer { background: var(--night); color: var(--paper); border-top: 1px solid var(--night-line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 3rem; padding-block: 2.25rem;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.site-footer nav a {
  display: inline-block; padding-block: 0.5rem;
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: var(--night-soft); transition: color 0.25s;
}
.site-footer nav a:hover { color: var(--paper); }
.footer-legal { flex-basis: 100%; padding-top: 1.5rem; border-top: 1px solid var(--night-line); font-size: 0.8125rem; line-height: 1.7; color: var(--night-soft); }

/* 14. Detail projektu ----------------------------------------------------- */
.project-dialog {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
  overflow: hidden;
}
.project-dialog::backdrop { background: var(--paper); }
.dialog-inner { position: relative; display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr); }

.dialog-stage {
  position: relative; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-deep);
  padding: clamp(0.75rem, 2.5vw, 2.5rem);
}
.dialog-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.stage-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 3rem; height: 3rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 50%;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.stage-nav:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stage-nav svg, .dialog-close svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.stage-prev { left: clamp(0.5rem, 1.5vw, 1.5rem); }
.stage-next { right: clamp(0.5rem, 1.5vw, 1.5rem); }

.dialog-info {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 1.25rem var(--gutter) 2.5rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
}
.dialog-close {
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 2.75rem; padding: 0.25rem 0; background: none; border: 0;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.dialog-close:hover { color: var(--wood); }
@media (max-width: 61.99rem) {
  .dialog-close {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
    padding: 0.25rem 0.9rem; background: var(--paper); border: 1px solid var(--line);
  }
  .dialog-stage { padding-top: 4.25rem; }
  .dialog-stage img { max-height: 44vh; max-height: 44dvh; }
}
.dialog-info .eyebrow { margin-bottom: 0; }
.dialog-info h2 {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance;
}
.dialog-counter { font-size: 0.875rem; color: var(--ink-soft); }
.dialog-info > p:not(.eyebrow):not(.dialog-counter) { color: var(--ink-soft); }

.thumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.thumbs button {
  display: block; width: 5.5rem; padding: 0; background: none;
  border: 1px solid transparent; opacity: 0.55;
  transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease);
}
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--ink); }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dialog-info .text-link { margin-top: 0.75rem; }

@media (min-width: 62rem) {
  .dialog-inner { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) clamp(22rem, 30vw, 28rem); }
  .dialog-info { padding: 1.5rem 2.5rem 2.5rem; gap: 1.25rem; border-left: 1px solid var(--line); }
  .dialog-close { margin-bottom: clamp(1rem, 6vh, 4rem); }
}

/* 15. Pohyb --------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .project-card:hover .project-media img { transform: none; }
}
