/* ============================================================
   UseHashtag.cz — design tokens
   ============================================================ */
:root {
  --bg:        #faf7f2;  /* krémová */
  --ink:       #1c1917;  /* text */
  --ink-2:     #6b6459;  /* sekundární text */
  --muted:     #a39e94;  /* potlačený */
  --accent:    #e8542f;  /* oranžová */
  --line:      #ddd6ca;  /* plná linka */
  --line-dash: #ccc4b6;  /* čárkovaná linka */
  --row-hover: #f2ebdd;
  --dark:      #1c1917;
  --on-dark:   #faf7f2;

  --maxw: 1200px;
  --pad: 48px;

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.btn-dark {
  background: var(--dark);
  color: var(--on-dark);
  padding: 16px 34px;
}
.btn-dark:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.hash { color: var(--accent); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}
.logo {
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo .hash { display: inline-block; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.nav > a {
  text-decoration: none;
  color: var(--ink);
  transition: color .2s ease;
}
.nav > a:not(.nav-cta):hover,
.nav > a.active:not(.nav-cta) { color: var(--accent); }
.nav-cta {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 600;
  transition: background .25s ease, color .25s ease;
}
.nav-cta:hover,
.nav-cta.active {
  background: var(--ink);
  color: var(--on-dark);
}

/* language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.lang-switch button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  transition: color .2s ease;
}
.lang-switch button.is-active { color: var(--ink); }
.lang-switch button:not(.is-active):hover { color: var(--ink-2); }
.lang-sep { color: var(--muted); }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 2px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 56px;
}
.hero-hash {
  position: absolute;
  right: -60px;
  top: -80px;
  font-size: 480px;
  font-weight: 700;
  color: var(--accent);
  opacity: .09;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  animation: uhFloat 14s ease-in-out infinite;
}
.hero-title {
  margin: 0;
  font-size: 88px;
  line-height: .98;
  font-weight: 700;
  letter-spacing: -0.04em;
  position: relative;
}
.hero-title span { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-top: 40px;
  position: relative;
}
.hero-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 460px;
}
.hero-bottom .btn { flex: none; }

/* ============================================================
   Tech ticker
   ============================================================ */
.ticker {
  background: var(--dark);
  color: var(--on-dark);
  padding: 20px 0;
  overflow: hidden;
  cursor: default;
  user-select: none;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: uhMarquee 30s linear infinite;
}
.ticker-group {
  display: flex;
  gap: 48px;
  align-items: center;
  padding-right: 48px;
  font-size: 22px;
  font-weight: 700;
}

/* ============================================================
   Služby
   ============================================================ */
.services {
  padding-top: 0;
}
.service-row {
  display: grid;
  grid-template-columns: 120px 320px 1fr;
  gap: 32px;
  padding: 40px 0;
  align-items: baseline;
  border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-num {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}
.service-name {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.service-desc {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ============================================================
   Stack + Klienti
   ============================================================ */
.stack-clients {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.col-label {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
}
.stack-index {
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.5;
}
.stack-row {
  display: grid;
  grid-template-columns: 44px 110px 1fr;
  gap: 16px;
  padding: 16px 8px;
  border-bottom: 1px dashed var(--line-dash);
  transition: background .2s ease, transform .2s ease;
  cursor: default;
}
.stack-row:last-child { border-bottom: none; }
.stack-row:hover {
  background: var(--row-hover);
  transform: translateX(8px);
}
.stack-n { color: var(--muted); }
.stack-tech { font-weight: 500; }
.stack-desc { color: var(--ink-2); }

.client-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.client-card {
  background: var(--dark);
  color: var(--on-dark);
  border-radius: 16px;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.client-card:not(.client-more):hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(28,25,23,.22);
}
.card-hash {
  position: absolute;
  right: -18px;
  bottom: -46px;
  font-size: 150px;
  font-weight: 700;
  color: var(--accent);
  opacity: .35;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.client-card:nth-child(1) .card-hash { animation: uhFloat 10s ease-in-out infinite; }
.client-card:nth-child(2) .card-hash { animation: uhFloat 12s ease-in-out infinite; }
.client-logo { position: relative; display: flex; align-items: center; }
.logo-ness  { height: 44px; width: auto; filter: brightness(0) invert(1); }
.logo-apait { height: 36px; width: auto; }
.client-desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  position: relative;
}
.client-more {
  background: none;
  border: 1.5px dashed var(--line-dash);
  border-radius: 16px;
  padding: 20px 28px;
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   Kontakt
   ============================================================ */
.contact {
  background: var(--accent);
  color: var(--on-dark);
}
.contact-inner {
  padding-top: 64px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-title {
  margin: 0 0 20px;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.contact-info {
  font-size: 16px;
  line-height: 2;
}
.contact-info .ci-strong { font-weight: 700; }
.ci-mail {
  color: var(--on-dark);
  font-weight: 700;
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 16px;
  padding: 15px 18px;
  border: none;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-submit {
  padding: 16px;
  text-align: center;
}
.btn-submit:hover {
  background: var(--bg);
  color: var(--ink);
}
.form-note {
  margin: 4px 0 0;
  font-size: 14px;
  min-height: 1.2em;
}
.form-note.error { font-weight: 600; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes uhFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes uhFloat {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(24px) rotate(6deg); }
}
.hero-hash { animation-direction: alternate; }
.card-hash { animation-direction: alternate; }

@keyframes uhMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes uhBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}
.blink { animation: uhBlink 3.5s ease-in-out infinite; }

/* Hero line stagger — applied after load via .loaded on body */
.reveal-lines span { opacity: 0; }
body.loaded .reveal-lines span { animation: uhFadeUp .7s ease both; }
body.loaded .reveal-lines span:nth-child(1) { animation-delay: .05s; }
body.loaded .reveal-lines span:nth-child(2) { animation-delay: .20s; }
body.loaded .reveal-lines span:nth-child(3) { animation-delay: .38s; }
body.loaded .hero-bottom { animation: uhFadeUp .7s ease .55s both; }

/* ============================================================
   Responsive — mobil (≤ 760px)
   ============================================================ */
@media (max-width: 760px) {
  :root { --pad: 20px; }

  .header-inner { padding-top: 18px; padding-bottom: 18px; }
  .logo { font-size: 17px; }

  .hamburger { display: flex; position: relative; z-index: 70; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 60;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 84px 28px 32px;
    background: var(--bg);
    border-bottom-left-radius: 20px;
    box-shadow: -14px 16px 40px rgba(28,25,23,.16);
    transform: translateX(105%);
    transition: transform .3s ease;
    font-size: 20px;
  }
  .nav.open { transform: none; }
  .nav-cta { align-self: flex-start; }
  .lang-switch { font-size: 15px; margin-top: 8px; }

  .hero { padding-top: 40px; padding-bottom: 32px; }
  .hero-hash { font-size: 260px; right: -40px; top: -50px; }
  .hero-title { font-size: 46px; line-height: 1; letter-spacing: -0.03em; }
  .hero-bottom { flex-direction: column; align-items: stretch; gap: 26px; margin-top: 20px; }
  .hero-lead { font-size: 16px; }
  .hero-bottom .btn { text-align: center; }

  .ticker-group { font-size: 16px; gap: 32px; padding-right: 32px; }

  .service-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 26px 0;
  }
  .service-name { font-size: 24px; }
  .service-desc { font-size: 15px; line-height: 1.55; }

  .stack-clients {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .stack-index { font-size: 14px; }
  .stack-row {
    grid-template-columns: 32px 86px 1fr;
    gap: 10px;
    padding: 12px 0;
  }
  .stack-row:hover { transform: none; background: none; }

  .client-card { border-radius: 14px; padding: 22px; }
  .client-more { border-radius: 14px; padding: 16px; font-size: 15px; }
  .logo-ness  { height: 36px; }
  .logo-apait { height: 30px; }
  .card-hash { font-size: 110px; right: -14px; bottom: -36px; }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 44px;
  }
  .contact-title { font-size: 32px; letter-spacing: -0.02em; }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    line-height: 1.6;
  }
}

/* Tablet in-between: relax the rigid service grid */
@media (max-width: 1000px) and (min-width: 761px) {
  .service-row { grid-template-columns: 90px 240px 1fr; gap: 24px; }
  .hero-title { font-size: 72px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-hash,
  .card-hash,
  .ticker-track,
  .blink { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-lines span,
  body.loaded .reveal-lines span,
  body.loaded .hero-bottom { opacity: 1; animation: none; }
}
