/* klementa.cz */

/* --- Tokens --------------------------------------------------------------- */

:root {
  color-scheme: light;
  --brand: #0066cc;
  --brand-strong: #0052a3;
  --hero-bg: var(--brand);
  --hero-text: #fff;

  --bg: #fff;
  --bg-alt: #f4f6f9;
  --surface: #fff;
  --text: #1d2630;
  --muted: #5b6672;
  --link: #0066cc;
  --border: #e1e6ec;
  --logo-bg: #fff;

  --nav-bg: #1f2429;
  --nav-text: #c9d0d7;
  --footer-bg: #1f2429;
  --footer-text: #aeb7c0;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 4px 16px rgb(16 24 40 / 0.06);
  --nav-h: 3.5rem;
  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1419;
  --bg-alt: #151b22;
  --surface: #1b222a;
  --text: #e4e8ec;
  --muted: #9aa5b1;
  --link: #74b6ff;
  --border: #2a333d;
  --logo-bg: #f1f3f5;
  --nav-bg: #0b0f13;
  --footer-bg: #0b0f13;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
}

/* --- Base ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] {
  scroll-margin-top: var(--nav-h);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  font-weight: 600;
  border-radius: 6px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}

.nav__brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav__list {
  display: flex;
  gap: 0.25rem;
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.75rem;
  color: var(--nav-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}

.nav__link:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

@media (max-width: 26rem) {
  .nav__brand {
    display: none;
  }

  .nav__inner {
    justify-content: center;
  }

  .nav__link {
    padding-inline: 0.6rem;
  }
}

.nav__inner > nav {
  margin-left: auto;
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: 0.25rem;
  padding: 0;
  color: var(--nav-text);
  background: transparent;
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.3);
}

.nav :focus-visible {
  outline-color: #fff;
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon--sun,
[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding-block: clamp(3rem, 9vw, 6rem);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  text-align: center;
}

.hero__photo {
  width: clamp(10rem, 30vw, 15rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgb(255 255 255 / 0.9);
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__role {
  margin-top: 0.5rem;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 48rem) {
  .hero__inner {
    flex-direction: row;
    justify-content: center;
    text-align: left;
  }

  .hero__actions {
    justify-content: flex-start;
  }
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--light {
  background: #fff;
  color: var(--brand-strong);
}

.btn--light:hover {
  background: #eaf3ff;
}

.btn--outline {
  color: #fff;
  border-color: rgb(255 255 255 / 0.75);
}

.btn--outline:hover {
  background: rgb(255 255 255 / 0.12);
  border-color: #fff;
}

.hero .btn:focus-visible {
  outline-color: #fff;
}

/* --- Sections ------------------------------------------------------------- */

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

.section--alt {
  background: var(--bg-alt);
}

.section__title {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section__title--center {
  text-align: center;
}

.section__title--label {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- About + certifikace -------------------------------------------------- */

.about__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.about__lead {
  max-width: 48rem;
  text-wrap: pretty;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.7;
}

.about__certs .section__title {
  margin-bottom: 1.25rem !important;
}

@media (min-width: 60rem) {
  .about__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: center;
  }

  .about__certs {
    padding-left: clamp(2rem, 4vw, 3.5rem);
    border-left: 1px solid var(--border);
  }
}

.certs {
  --s: 1;
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  justify-items: start;
  align-items: center;
  gap: 0.25rem clamp(1.25rem, 3vw, 2rem);
}

@media (max-width: 26rem) {
  .certs {
    --s: 0.85;
  }
}

.certs__link {
  display: flex;
  align-items: center;
  height: calc(4.75rem * var(--s));
  border-radius: 8px;
}

/* optical sizing: wider badges lower, round badge taller */
.certs__img {
  width: auto;
  height: calc(var(--h) * var(--s));
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.certs__img--google {
  --h: 48px;
  border-radius: 4px;
}

.certs__img--mergado {
  --h: 46px;
}

.certs__img--shoptet {
  --h: 40px;
}

.certs__img--firmy {
  --h: 76px;
  border-radius: 50%;
}

.certs__link:hover .certs__img {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgb(16 24 40 / 0.14);
}

[data-theme="dark"] .certs__img {
  opacity: 0.88;
}

[data-theme="dark"] .certs__link:hover .certs__img {
  opacity: 1;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.4);
}

/* --- Klienti (marquee) ---------------------------------------------------- */

.marquee {
  --gap: clamp(1.5rem, 4vw, 3rem);
  --speed: 45s;
  display: flex;
  overflow: hidden;
  padding-block: 0.5rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.marquee__track {
  display: flex;
  flex: none;
  gap: var(--gap);
  padding-right: var(--gap);
  animation: marquee var(--speed) linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

.marquee__item {
  display: grid;
  place-items: center;
  width: clamp(8rem, 18vw, 11rem);
  height: 5rem;
  padding-inline: 0.5rem;
}

.marquee__logo {
  width: auto;
  max-width: 100%;
  max-height: 3.25rem;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15);
  opacity: 0.75;
  transition: filter 0.25s, opacity 0.25s;
}

@media (hover: hover) {
  .marquee__item:hover .marquee__logo {
    filter: none;
    opacity: 1;
  }
}

[data-theme="dark"] .marquee__logo,
[data-theme="dark"] .marquee__item:hover .marquee__logo {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.6;
}

[data-theme="dark"] .marquee__item:hover .marquee__logo {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .marquee__track {
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
    animation: none;
  }

  .marquee__track[aria-hidden="true"] {
    display: none;
  }
}

/* --- Reference (carousel) ------------------------------------------------- */

.carousel {
  position: relative;
}

.quotes {
  --per-view: 1.1;
  --gap: clamp(1rem, 2.5vw, 1.5rem);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding-block: 0.5rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

@media (min-width: 40rem) {
  .quotes {
    --per-view: 2;
  }
}

@media (min-width: 64rem) {
  .quotes {
    --per-view: 3;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .quotes {
    scroll-behavior: smooth;
  }
}

.quotes:focus-visible {
  outline-offset: 6px;
}

.quote {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.quote::before {
  content: "“";
  display: block;
  height: 2.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--brand);
}

[data-theme="dark"] .quote::before {
  color: var(--link);
}

.quote__text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.7;
}

.quote__author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.quote__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.quote__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.quote__meta span {
  color: var(--muted);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .quote {
      animation: quote-in linear both;
      animation-timeline: view(inline);
      animation-range: entry 0% exit 100%;
    }

    @keyframes quote-in {
      entry 0% {
        opacity: 0.3;
        transform: scale(0.94);
      }
      entry 100%,
      exit 0% {
        opacity: 1;
        transform: none;
      }
      exit 100% {
        opacity: 0.3;
        transform: scale(0.94);
      }
    }
  }
}

.carousel__controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.carousel__controls[hidden],
.carousel__controls--idle {
  display: none;
}

.carousel__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, opacity 0.15s;
}

.carousel__btn:hover:not(:disabled) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel__btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Kontakt ------------------------------------------------------------- */

.contact {
  background: var(--hero-bg);
  color: var(--hero-text);
}

.contact__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 5rem);
  }
}

.contact__title {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.contact__lead {
  max-width: 30rem;
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  opacity: 0.92;
  text-wrap: pretty;
}

.contact__id {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.75;
}

.contact__list {
  display: grid;
  gap: 0.75rem;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}

.contact__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.18);
}

.contact .contact__item:focus-visible {
  outline-color: #fff;
}

.contact__icon-wrap {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}

[data-theme="dark"] .contact__icon-wrap {
  color: var(--link);
  background: color-mix(in srgb, var(--link) 15%, transparent);
}

.contact__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.contact__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__value {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.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;
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.95rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.footer__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--footer-text);
  border-radius: 8px;
}

.footer__link:hover {
  color: #fff;
}

.nav__brand:focus-visible,
.nav__link:focus-visible,
.footer__link:focus-visible {
  outline-color: #fff;
}

.footer__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- 404 ------------------------------------------------------------------ */

.error .hero__role {
  max-width: 28rem;
  margin-inline: auto;
}

.error {
  min-height: 50vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.error .btn {
  margin-top: 1.5rem;
}

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
