/* Jakub Petz – styl webu (vychází z WP šablony Twenty Twenty-Four) */

/* Písma rozdělená na latinku a rozšířenou latinku (čeština) – prohlížeč stáhne jen to, co stránka potřebuje */
@font-face { font-family: Inter; font-style: normal; font-weight: 300 900; font-display: fallback; src: url("fonts/inter-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: Inter; font-style: normal; font-weight: 300 900; font-display: fallback; src: url("fonts/inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Cardo; font-style: normal; font-weight: 400; font-display: fallback; src: url("fonts/cardo-400-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: Cardo; font-style: normal; font-weight: 400; font-display: fallback; src: url("fonts/cardo-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Cardo; font-style: normal; font-weight: 700; font-display: fallback; src: url("fonts/cardo-700-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: Cardo; font-style: normal; font-weight: 700; font-display: fallback; src: url("fonts/cardo-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --base: #f9f9f9;
  --white: #ffffff;
  --contrast: #111111;
  --contrast-2: #636363;
  --linkedin: #0d66c2;

  --content: 620px;
  --wide: 1280px;
  --gutter: min(6.5rem, 8vw);
  --s10: 1rem;
  --s20: min(1.5rem, 2vw);
  --s30: min(2.5rem, 3vw);
  --s40: min(4rem, 5vw);
  --s50: min(6.5rem, 8vw);
  --gap: 1.2rem;

  --fs-small: 0.9rem;
  --fs-medium: 1.05rem;
  --fs-large: clamp(1.39rem, 1.39rem + ((1vw - 0.2rem) * 0.767), 1.85rem);
  --fs-xl: clamp(1.85rem, 1.85rem + ((1vw - 0.2rem) * 1.083), 2.5rem);
  --fs-h4: clamp(1.1rem, 1.1rem + ((1vw - 0.2rem) * 0.767), 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--contrast);
  font-family: Inter, sans-serif;
  font-size: var(--fs-medium);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h4 { font-family: Cardo, serif; font-weight: 400; line-height: 1.2; margin: 0; }
h1, h2 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-h4); }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--contrast); text-decoration: underline; text-underline-offset: .1em; }
a:hover { text-decoration: none; }

.large { font-size: var(--fs-large); }
.icon { display: inline-block; height: 1em; overflow: visible; vertical-align: -0.125em; fill: currentColor; }

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

/* Viditelný rámeček při ovládání klávesnicí */
a:focus-visible, button:focus-visible { outline: 2px solid var(--contrast); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); padding: .5rem 1rem; }

/* Tlačítko */
.button {
  display: inline-block;
  background: var(--contrast);
  color: var(--base);
  border-radius: 0.33rem;
  padding: 0.6rem 1rem;
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
}
.button:hover, .button:focus-visible { background: var(--contrast-2); color: var(--base); }

/* Hlavička */
.site-header { padding: var(--s20); }
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
}
.site-title { font-size: var(--fs-large); font-weight: 600; line-height: 1.55; }
.site-title a { text-decoration: none; }

.main-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 1.92rem; }
.menu { list-style: none; margin: 0 0 0 calc(30px + 1.92rem); padding: 0; display: flex; gap: 1.92rem; }
.menu a { font-weight: 500; text-decoration: none; white-space: nowrap; }
.main-nav .button { white-space: nowrap; }
.site-title { white-space: nowrap; }
.menu a:hover { text-decoration: underline; }
.main-nav .button { margin-left: calc(50px + 1.92rem); }

.menu-open, .menu-close { display: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--contrast); }
.menu-open svg, .menu-close svg { width: 24px; height: 24px; fill: currentColor; display: block; }

@media (max-width: 1100px) {
  .header-inner { min-height: 0; }
  .menu-open { display: flex; align-items: center; gap: .5rem; margin-left: auto; padding: .45rem .6rem .45rem .85rem; border: 1px solid var(--contrast); border-radius: 9999px; }
  .menu-open:hover { background: var(--contrast); color: var(--base); }
  .menu-label { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1; }
  .menu-open svg { width: 20px; height: 20px; }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--base);
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding: var(--s20) calc(var(--s20) + 1rem);
    gap: 1.92rem;
    overflow-y: auto;
  }
  .main-nav.is-open .menu-close { display: block; }
  .main-nav.is-open .menu { flex-direction: column; align-items: flex-end; margin: 70px 0 0; }
  .main-nav.is-open .button { margin: 50px 0 0; }
  body.menu-is-open { overflow: hidden; }
}

/* Pásy přes celou šířku */
main > * + * { margin-top: var(--gap); }
.band { background: var(--white); }

/* Hero */
.hero {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  min-height: 70vh;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: right top;
}
.band--padded { padding: 0 var(--gutter); }
.hero::after { content: ""; display: block; clear: both; }

.hero-text {
  position: relative;
  float: left;
  width: 50%;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-right: var(--s10);
}
.hero-text h1 { max-width: var(--content); }
.hero-text h1 + p { margin-top: 20px; }
.hero-text p + p { margin-top: 1rem; max-width: var(--content); }
.hero-text p + .button { margin-top: 30px; }

.asterisk::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 3rem;
  background: var(--contrast-2);
  clip-path: path("M 11.93 0.684 v 8.039 l 5.633 -5.633 l 1.216 1.23 l -5.66 5.66 h 8.04 v 1.737 H 13.2 l 5.701 5.701 l -1.23 1.23 l -5.742 -5.742 V 21 h -1.737 v -8.094 l -5.77 5.77 l -1.23 -1.217 l 5.743 -5.742 H 0.842 V 9.98 h 8.162 l -5.701 -5.7 l 1.23 -1.231 l 5.66 5.66 V 0.684 h 1.737 Z");
}

/* Kontakty – hero */
.hero-text--contact { flex-direction: row; align-items: center; padding: 0 var(--s20); }
.contact-box { padding: 0 var(--s10); max-width: calc(var(--content) + 2rem); }
.contact-box .lead { padding: var(--s20) 0; }
.contact-row { display: flex; align-items: center; gap: var(--gap); margin-top: var(--gap); }
.contact-row a, .contact-row--links a { text-decoration: none; }
.contact-row--links { margin: var(--s40) 0; }
.contact-row .icon-envelope { font-size: 2em; }
.contact-row .icon-phone { font-size: 2.4em; }

@media (max-width: 768px) {
  .hero-img { object-fit: cover; object-position: left top; }
  .hero-text { width: 100%; background: rgba(255, 255, 255, .75); }
  .band--padded { padding: 0; }
  .band--padded .hero-text { padding: 0 var(--gutter); }
}

/* Animace ikon (podle Font Awesome) – přehrají se 3× a zastaví */
@media (prefers-reduced-motion: no-preference) {
  .fa-fade { animation: fa-fade 1s cubic-bezier(.4, 0, .6, 1) 3; }
  .fa-shake { animation: fa-shake 1s linear 3; }
  .fa-bounce { animation: fa-bounce 1s cubic-bezier(.28, .84, .42, 1) 3; }
}
@keyframes fa-fade { 50% { opacity: .4; } }
@keyframes fa-shake {
  0% { transform: rotate(-15deg); } 4% { transform: rotate(15deg); }
  8%, 24% { transform: rotate(-18deg); } 12%, 28% { transform: rotate(18deg); }
  16% { transform: rotate(-22deg); } 20% { transform: rotate(22deg); }
  32% { transform: rotate(-12deg); } 36% { transform: rotate(12deg); }
  40%, 100% { transform: rotate(0); }
}
@keyframes fa-bounce {
  0% { transform: scale(1) translateY(0); }
  10% { transform: scale(1.1, .9) translateY(0); }
  30% { transform: scale(.9, 1.1) translateY(-.5em); }
  50% { transform: scale(1.05, .95) translateY(0); }
  57% { transform: scale(1) translateY(-.125em); }
  64%, 100% { transform: scale(1) translateY(0); }
}

/* Kontakty – sociální sítě */
.social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--gap); padding: var(--s30) var(--s20); }
.social-pill {
  display: flex;
  align-items: center;
  margin: var(--s10) 0;
  padding: 9px 24px;
  border-radius: 9999px;
  background: var(--linkedin);
  color: #fff;
  font-size: 36px;
  line-height: 0;
  text-decoration: none;
}
.social-pill:hover { transform: scale(1.1); transition: transform .1s ease; }
.social-pill svg { width: 1em; height: 1em; fill: currentColor; }
.social-pill span { font-size: .65em; line-height: 1; margin: 0 .325em; }

/* Kontakty – fakturační údaje */
.billing { padding: var(--s20) var(--gutter); }
.billing-inner { max-width: var(--wide); margin: 0 auto; }
.billing h2 { padding: var(--s10) 0; scroll-margin-top: 1rem; }
.billing-list { display: flex; flex-wrap: wrap; gap: var(--s20); padding: var(--s20) 0; margin-top: var(--s10); }
.billing-item { padding: var(--s10) 0; max-width: var(--content); }
.billing-item .name { font-size: clamp(0.984rem, 0.984rem + ((1vw - 0.2rem) * 0.86), 1.5rem); }

/* Textová stránka */
.page { padding: var(--s20) var(--gutter); }
.page > * { max-width: var(--content); margin: var(--gap) auto 0; }
.page > *:first-child { margin-top: 0; }
.page h1 { line-height: 1.15; }

/* Životopis – stejná šířka jako hero na HP, text zarovnaný vlevo */
.page.cv > * { max-width: var(--wide); margin-left: max(0px, calc((100% - var(--wide)) / 2)); margin-right: 0; }
.page.cv > p { max-width: 50rem; }
.cv h2 { margin-top: var(--s40); }
.page.cv > .cv-more { margin-top: var(--s40); font-weight: 500; }
.cv-areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s30); }
#s-cim-pomuzu { scroll-margin-top: 1rem; }
/* S čím pomůžu – zvýrazněný audit + karty */
.services-num { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--contrast-2); margin-bottom: .6rem; }
.page.cv > .services-feature { max-width: var(--wide); display: grid; grid-template-columns: 1fr 2fr; gap: var(--s30); align-items: start; padding: var(--s30); background: var(--contrast); color: var(--base); border-radius: .5rem; margin-top: var(--s30); }
.services-feature h4 { font-size: var(--fs-large); }
.services-feature > p { font-size: var(--fs-large); line-height: 1.4; color: #cfcfcf; }
.services-feature strong { color: var(--base); font-weight: 600; }
.services-feature .services-num { color: #9a9a9a; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s30); }
.page.cv > .services-label { margin-top: var(--s40); margin-bottom: 0; }
.page.cv > .services-grid { margin-top: 1rem; }
.service-card { border-top: 2px solid var(--contrast); padding-top: 1rem; }
.service-card h4 { margin-bottom: .4rem; }
.service-card > p:last-child { color: var(--contrast-2); }
.service-card h4 a { text-decoration: none; }
.service-card h4 a:hover { text-decoration: underline; }
.ref-meta { font-size: var(--fs-small); font-weight: 500; margin-bottom: .4rem; }
.ref-section { padding-top: var(--s40); padding-bottom: var(--s50); }
.page.cv > .brand-list { list-style: none; padding: 0; margin-top: var(--s30); display: flex; flex-wrap: wrap; gap: .4rem 0; font-family: Cardo, serif; font-size: var(--fs-h4); line-height: 1.3; }
.brand-list li:not(:last-child):not(:nth-last-child(2))::after { content: "·"; margin: 0 .7rem; color: var(--contrast-2); }
.brand-list li:nth-last-child(2)::after { content: ""; margin-right: .4em; }
.brand-list .brand-more { color: var(--contrast-2); font-style: italic; }
.page.cv > .brand-list { margin-top: .6rem; }
.page.cv > .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s30); margin-top: var(--s30); max-width: var(--wide); }
.stat { border-top: 2px solid var(--contrast); padding-top: 1rem; }
.stat-num { font-family: Cardo, serif; font-size: clamp(2.2rem, 2.2rem + 2vw, 3.6rem); line-height: 1; }
.stat-label { margin-top: .5rem; color: var(--contrast-2); max-width: 22rem; }
.person-more { font-weight: 500; }
.page.cv > .ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s20); margin-top: var(--s30); align-items: stretch; }
.ref-grid .service-card { display: flex; flex-direction: column; padding: 1.25rem 1.4rem 1.4rem; background: var(--white); border-radius: 0 0 .4rem .4rem; }
.ref-section.band .ref-grid .service-card { background: var(--base); }
.ref-tags { list-style: none; padding: 0; margin: .2rem 0 .7rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.ref-tags li { padding: .1rem .5rem; border: 1px solid var(--contrast-2); border-radius: .25rem; font-size: .75rem; font-weight: 500; color: var(--contrast-2); }@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .page.cv > .services-feature { grid-template-columns: 1fr; }
  .page.cv > .ref-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .page.cv > .ref-grid { grid-template-columns: 1fr; }
  .page.cv > .stats { grid-template-columns: 1fr; }
}
.cv-item { display: grid; grid-template-columns: 11rem 1fr; column-gap: var(--s30); }
.cv-item > * { grid-column: 2; max-width: 50rem; }
.cv-item > .cv-date { grid-column: 1; grid-row: 1 / span 3; padding-top: .3rem; }
.cv-area h4, .cv-item h4 { margin-bottom: .3rem; }
.cv-item h4 a { text-decoration: none; }
.cv-item h4 a:hover { text-decoration: underline; }
.media-badge { display: inline-block; margin-right: .4rem; padding: .05rem .45rem; border: 1px solid var(--contrast-2); border-radius: .25rem; font-size: .75rem; font-weight: 500; color: var(--contrast-2); vertical-align: .1em; }
.cv-area p, .cv-item p { color: var(--contrast-2); }
.cv-area p strong { color: var(--contrast); }
.cv-list { list-style: none; padding: 0; }
.cv-item { padding: var(--gap) 0; border-top: 1px solid #e2e2e2; }
.cv-item:last-child { border-bottom: 1px solid #e2e2e2; }
.cv-item .cv-date { font-size: var(--fs-small); color: var(--contrast-2); margin-bottom: .3rem; }
.cv-item .cv-org { color: var(--contrast); font-weight: 500; margin-bottom: .4rem; }

/* Patička */
.site-footer { margin-top: var(--gap); padding: var(--s50) var(--gutter); }
/* Když stránka končí šedým pásem, oddělí patičku jemná linka */
main:has(> section:last-of-type:not(.band)) + .site-footer { margin-top: 0; border-top: 1px solid #e4e4e4; }
.footer-cols { max-width: var(--wide); margin: 0 auto; display: flex; gap: var(--gap); }
.footer-col { flex: 0 1 33%; }
.footer-col > * + * { margin-top: var(--gap); }
.footer-contacts a { text-decoration: none; font-size: .8em; }
.footer-contacts .icon-envelope { width: 1.25em; }
.footer-contacts .icon-phone, .footer-contacts .icon-linkedin { width: .875em; }
.footer-heading { font-family: Cardo, serif; font-weight: 700; font-size: var(--fs-h4); line-height: 1.2; }

.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: var(--gap); }
.footer-nav .menu { flex-direction: column; gap: var(--gap); margin: calc(30px + var(--gap)) 0 0; }
.footer-nav .button { margin-top: calc(50px + var(--gap)); }

.footer-bottom { max-width: var(--wide); margin: var(--gap) auto 0; padding-top: var(--s50); text-align: center; }
.footer-bottom .small-link { font-size: .8rem; }
.copyright { margin-top: var(--gap); font-size: var(--fs-small); color: var(--contrast-2); }

@media (max-width: 781px) {
  .cv-areas { grid-template-columns: 1fr; }
  .cv-item { grid-template-columns: 1fr; }
  .cv-item > *, .cv-item > .cv-date { grid-column: 1; grid-row: auto; padding-top: 0; }
  .footer-cols { flex-direction: column; gap: 2rem; }
  .footer-col--empty { display: none; }
}
