/* =====================================================================
   TEMPO GROUP — Shared design system
   Sdílené atomy a komponenty napříč všemi stránkami webu.
   Stránko-specifické styly (sekce, layouty) ponechte inline v <style>.
   ===================================================================== */

:root {
  --bg:       #0A0A0A;
  --bg-1:     #111111;
  --bg-2:     #161616;
  --line:     rgba(255, 255, 255, 0.08);
  --line-2:   rgba(255, 255, 255, 0.16);
  --text:     #F4F4EC;
  --muted:    #7C7C75;
  --yellow:   #FFD200;
  --yellow-d: #E5BD00;

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-serif:   "Instrument Serif", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1280px;
  --gutter: 24px;

  /* Transparentní 1×1 SVG kurzor + fallback `none`. Donutí browser
     vizuálně skrýt OS kurzor okamžitě po načtení (bez čekání na mousemove). */
  --cursor-none: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1' height='1'/>") 0 0, none;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  cursor: var(--cursor-none);
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: var(--cursor-none); }
button { font: inherit; cursor: var(--cursor-none); border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; cursor: var(--cursor-none); }

/* show native cursor on touch */
@media (hover: none) {
  html, a, button, input, textarea { cursor: auto; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
}
p { margin: 0; color: var(--text); }
em, .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none;
  width: 12px; height: 12px;
  border-radius: 999px;
  background: var(--yellow);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: width .25s cubic-bezier(.2,.8,.2,1),
              height .25s cubic-bezier(.2,.8,.2,1),
              background .2s ease;
}
.cursor.hover { width: 56px; height: 56px; background: var(--yellow); }
.cursor.click { transform: translate(-50%, -50%) scale(0.7); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  padding: 0 var(--gutter);
  margin: 0 auto;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px var(--yellow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500; font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform .25s ease,
              background .25s ease,
              color .25s ease,
              border-color .25s ease,
              box-shadow .25s ease;
  will-change: transform;
  position: relative;
  text-align: center;
}
.btn-primary {
  background: var(--yellow); color: #0A0A0A;
  box-shadow: 0 0 18px rgba(255, 210, 0, 0.18);
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255, 210, 0, 0.35);
}
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text);
  transform: translateY(-2px);
}
.btn-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.btn:hover .btn-arrow { transform: rotate(45deg); }

/* ---------- Sticker badges ---------- */
.sticker {
  position: absolute; z-index: 3;
  background: var(--yellow); color: #0A0A0A;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.78rem; letter-spacing: -0.01em;
  box-shadow: 0 8px 30px -10px rgba(255, 210, 0, 0.5);
  pointer-events: none;
  animation: stickerWobble 6s ease-in-out infinite;
}
.sticker.outline {
  background: transparent; color: var(--yellow);
  border: 1px solid var(--yellow);
  box-shadow: none;
}
@keyframes stickerWobble {
  0%, 100% { transform: rotate(var(--rot, -8deg)) translateY(0); }
  50%      { transform: rotate(calc(var(--rot, -8deg) + 4deg)) translateY(-6px); }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1),
              transform .9s cubic-bezier(.2,.8,.2,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ---------- Sticky nav ---------- */
.nav {
  position: sticky; top: 0;
  z-index: 50;
  transition: background .3s ease,
              backdrop-filter .3s ease,
              border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.nav.always-blur {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.04em;
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text);
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; display: block; }
.footer .logo { font-size: 1.6rem; }
.footer .logo-mark { width: 48px; height: 48px; }

.nav-links { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; }
.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
  position: relative;
}
.nav-links a:hover {
  color: var(--yellow);
  background: rgba(255, 210, 0, 0.08);
  border-color: rgba(255, 210, 0, 0.25);
}
.nav-links a.active {
  color: #0A0A0A;
  background: var(--yellow);
  border-color: var(--yellow);
}
.nav-links a.active:hover {
  background: var(--yellow);
  color: #0A0A0A;
}

.nav-toggle { display: none; }
.nav-mobile { display: none; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 999px;
    background: var(--yellow); color: #0A0A0A;
  }
  .nav-mobile {
    position: fixed; inset: 0; background: var(--bg);
    z-index: 60; flex-direction: column;
    padding: 100px 24px 40px;
  }
  .nav-mobile.open { display: flex; }
  .nav-mobile a {
    font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
    padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text);
    letter-spacing: -0.03em;
  }
  .nav-mobile a.active { color: var(--yellow); }
  .nav-mobile-close {
    position: absolute; top: 20px; right: 20px;
    width: 44px; height: 44px; border-radius: 999px;
    background: var(--yellow); color: #0A0A0A;
    display: inline-flex; align-items: center; justify-content: center;
  }
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.footer-mega {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4rem, 18vw, 18rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--text);
  margin-bottom: 80px;
}
.footer-mega em {
  font-family: var(--font-serif); font-weight: 400; color: var(--yellow);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: var(--text); transition: color .2s ease, padding .2s ease;
  font-size: 1rem;
  position: relative; display: inline-block;
}
.footer-links a:hover { color: var(--yellow); padding-left: 14px; }
.footer-links a:hover::before { content: "→"; position: absolute; left: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
  flex-wrap: wrap; gap: 12px;
}
.socials { display: flex; gap: 8px; }
.socials a {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .25s ease;
  color: var(--text);
}
.socials a:hover { background: var(--yellow); color: #0A0A0A; border-color: var(--yellow); transform: rotate(-8deg); }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating mobile CTA ---------- */
.floating-cta {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  z-index: 40;
  display: none;
  justify-content: center;
  pointer-events: none;
}
.floating-cta .btn { pointer-events: auto; box-shadow: 0 10px 30px -8px rgba(0,0,0,0.6); }
@media (max-width: 720px) {
  body.show-floating-cta .floating-cta { display: flex; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor { display: none; }
}

/* ---------- Embedded kontaktní formulář (.tg-cf-*) ----------
   Sdílený formulářový komponent pro embed na PPC detail, Weby detail
   a dalších konverzních landing pages. Renderuje ho PHP helper
   tg_render_contact_form_embed( $source ) v inc/contact-form.php.
   Posílá na admin-post.php → wp_mail → redirect na /dekujeme/ (konverzní URL).
   ----------------------------------------------------------------------- */
.tg-cf {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  position: relative;
  scroll-margin-top: 100px; /* anchor scroll target offset (sticky nav) */
}
.tg-cf::before {
  content: "";
  position: absolute;
  top: -1px; left: 32px; right: 32px;
  height: 2px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 210, 0, 0.6);
}
.tg-cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .tg-cf-row { grid-template-columns: 1fr; }
}
.tg-cf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tg-cf-field label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tg-cf-req { color: var(--yellow); }
.tg-cf-field input,
.tg-cf-field textarea {
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .25s ease;
  outline: none;
  width: 100%;
  font-size: 16px; /* iOS — eliminuje auto-zoom na focus */
}
.tg-cf-field textarea { resize: vertical; min-height: 110px; padding-top: 14px; }
.tg-cf-field input:focus,
.tg-cf-field textarea:focus { border-color: var(--yellow); }
.tg-cf-field input::placeholder,
.tg-cf-field textarea::placeholder { color: rgba(255, 255, 255, 0.22); }

.tg-cf-submit {
  margin-top: 18px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--yellow);
  color: #0A0A0A;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 0 18px rgba(255, 210, 0, 0.18);
}
.tg-cf-submit:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255, 210, 0, 0.35);
}
.tg-cf-submit svg { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.tg-cf-submit:hover svg { transform: rotate(45deg); }
.tg-cf-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 4px 0 0;
}

/* Wrap sekce kolem embed formu — sjednocuje vertical spacing a header */
.tg-cf-section {
  padding: clamp(60px, 8vw, 110px) var(--gutter);
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  position: relative;
}
.tg-cf-section-head {
  text-align: center;
  margin-bottom: clamp(36px, 4vw, 56px);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.tg-cf-section-head .tg-cf-eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.tg-cf-section-head .tg-cf-eyebrow::before { content: '/ '; color: var(--yellow); margin-right: 6px; }
.tg-cf-section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw + 0.4rem, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0 0 14px;
}
.tg-cf-section-head h2 .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
}
.tg-cf-section-head p {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.4vw + 0.92rem, 1.12rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ---------- Troll-Face soutěž ("najdi 5 troll face a vyhraj") ----------
   5 instancí rozeseto napříč webem (home/mh-section, /qa/, /cookies/,
   /projekty-some/, /case-tempo-group-some/). Sdílená base, per-location
   pozicování řeší inline style nebo přídavná class.
   ----------------------------------------------------------------------- */
.troll-find {
  position: absolute;
  width: 38px; /* base +20 % vs 1.41 (32 → 38) */
  height: auto;
  opacity: 0.7;
  pointer-events: auto;
  user-select: none;
  z-index: 5;
  /* Invert(1) převrátí černé tahy SVG na bílé, grayscale(1) sjednotí ostatní
     barvy do bílo-šedé škály. Brightness 0.98 = "skoro bílé" (ne pure white,
     ale velmi blízko). */
  filter: invert(1) grayscale(1) brightness(0.98);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1), filter .3s ease;
  cursor: pointer;
}
.troll-find:hover {
  opacity: 1;
  transform: scale(1.25) rotate(-6deg);
  /* Na hover plné originální barvy SVG — žlutá face + černé tahy */
  filter: none;
}
/* Reveal varianta — schovaný do .is-found triggeru (např. po dohrání minihry) */
.troll-find.is-reveal {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}
.troll-find.is-reveal.is-found {
  opacity: 0.7;
  transform: scale(1);
  pointer-events: auto;
  animation: trollWiggle 2.2s ease-in-out 0.4s 1;
}
@keyframes trollWiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20%      { transform: scale(1.12) rotate(-10deg); }
  50%      { transform: scale(1.05) rotate(8deg); }
  80%      { transform: scale(1.08) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .troll-find { transition: opacity .2s ease; }
  .troll-find:hover { transform: none; }
  .troll-find.is-reveal.is-found { animation: none; }
}
