/* ============================================================
   style.css — implementace-ai.cz
   ============================================================ */

/* ──────────────────────────────────────────
   DESIGN TOKENS
────────────────────────────────────────── */
:root {
  --bg:           #080c14;
  --bg-surface:   #0d1220;
  --bg-card:      #111827;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(79, 126, 247, 0.45);

  --accent:       #4f7ef7;
  --accent-alt:   #7c3aed;
  --accent-glow:  rgba(79, 126, 247, 0.32);

  --text-1: #f0f4ff;
  --text-2: #8899bb;
  --text-3: #4f617a;

  --font:      'Plus Jakarta Sans', sans-serif;
  --radius:    12px;
  --radius-lg: 20px;
  --ease:      0.25s ease;
  --max-w:     1160px;
}

/* ──────────────────────────────────────────
   RESET
────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

ul  { list-style: none; }
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ──────────────────────────────────────────
   LAYOUT UTILITIES
────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 108px 0; }

/* ──────────────────────────────────────────
   TYPOGRAPHY UTILITIES
────────────────────────────────────────── */
.section__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__title {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.section__sub {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 16px auto 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ──────────────────────────────────────────
   BUTTON
────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform var(--ease), box-shadow var(--ease);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  color: #fff;
  box-shadow: 0 4px 28px var(--accent-glow);
}

.btn--primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(79,126,247,.55); }
.btn--primary:active { transform: translateY(0);    box-shadow: 0 4px 28px var(--accent-glow); }

/* ──────────────────────────────────────────
   NAVIGATION
────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  padding: 18px 0;
  transition: background .4s, backdrop-filter .4s, box-shadow .4s;
}

.nav.scrolled {
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--ease);
}

.nav__link:hover { color: var(--text-1); }

.nav__link--cta {
  background: rgba(79, 126, 247, 0.1);
  color: var(--accent);
  padding: 9px 22px;
  border-radius: 7px;
  border: 1px solid rgba(79, 126, 247, 0.22);
  font-weight: 700;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.nav__link--cta:hover {
  background: rgba(79, 126, 247, 0.2);
  border-color: rgba(79, 126, 247, 0.4);
  color: #fff;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: 910;
  position: relative;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ──────────────────────────────────────────
   HERO
────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
}

/* Atmospheric glow + grid */
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 65% at 50% -5%,  rgba(79,126,247,.20) 0%, transparent 70%),
    radial-gradient(ellipse 55% 45% at 85% 65%,  rgba(124,58,237,.14) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%,  rgba(79,126,247,.08) 0%, transparent 60%);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 75% at 50% 0%, black, transparent 80%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 0 80px;
}

/* Animated badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 100px;
  background: rgba(79, 126, 247, 0.08);
  border: 1px solid rgba(79, 126, 247, 0.22);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}

.hero__badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: .45; transform: scale(.85); }
}

.hero__title {
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 44px;
  line-height: 1.72;
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-hint span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 100px;
  position: relative;
}

.hero__scroll-hint span::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 100px;
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%   { transform: translateX(-50%) translateY(0);   opacity: 1; }
  100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

/* ──────────────────────────────────────────
   SERVICES
────────────────────────────────────────── */
.services { background: var(--bg-surface); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Last card (5th) centered in a 3-col grid */
.services__grid .card:nth-child(4) { grid-column: 1; }
.services__grid .card:nth-child(5) {
  grid-column: 2;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}

/* Top accent line on hover */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 48px rgba(79,126,247,.1), 0 10px 36px rgba(0,0,0,.45);
  transform: translateY(-5px);
}

.card:hover::before { opacity: 1; }

.card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 126, 247, 0.1);
  border-radius: 13px;
  margin-bottom: 22px;
  color: var(--accent);
  transition: background .3s, box-shadow .3s;
}

.card__icon svg { width: 26px; height: 26px; }

.card:hover .card__icon {
  background: rgba(79, 126, 247, 0.18);
  box-shadow: 0 0 22px rgba(79,126,247,.28);
}

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card__desc {
  font-size: 0.91rem;
  color: var(--text-2);
  line-height: 1.72;
}

/* ──────────────────────────────────────────
   USE CASES
────────────────────────────────────────── */
.use-cases__grid {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.use-case {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 36px;
  align-items: start;
  padding: 44px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background .25s;
}

.use-case:last-child { border-bottom: none; }
.use-case:hover { background: rgba(79,126,247,.04); }

.use-case__number {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(79, 126, 247, 0.35);
  padding-top: 4px;
  user-select: none;
}

.use-case__body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.use-case__body p {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.76;
  margin-bottom: 18px;
}

.use-case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.use-case__tags span {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(79, 126, 247, 0.08);
  border: 1px solid rgba(79, 126, 247, 0.18);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ──────────────────────────────────────────
   ABOUT
────────────────────────────────────────── */
.about { background: var(--bg-surface); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: center;
}

.about__content .section__label { display: block; }
.about__content .section__title { margin: 0 0 22px; }

.about__content p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.76;
  margin-bottom: 15px;
}

.about__list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.about__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.5;
}

.about__list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* Expertise card */
.stats__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.stats__card::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,126,247,.14) 0%, transparent 70%);
  pointer-events: none;
}

.expertise {
  display: flex;
  align-items: center;
  gap: 16px;
}

.expertise__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 126, 247, 0.1);
  border-radius: 10px;
  color: var(--accent);
}

.expertise__icon svg { width: 20px; height: 20px; }

.expertise__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}

.expertise__desc {
  font-size: 0.8rem;
  color: var(--text-2);
}

/* ──────────────────────────────────────────
   CONTACT
────────────────────────────────────────── */
.contact { background: var(--bg); }

.contact__email-wrap {
  display: flex;
  justify-content: center;
}

.contact__email-block {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 36px;
  transition: border-color .3s, box-shadow .3s;
}

.contact__email-block:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 32px rgba(79,126,247,.1);
}

.contact__email-block svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.contact__email-block a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1);
  transition: color var(--ease);
}

.contact__email-block a:hover { color: var(--accent); }

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: start;
  padding-bottom: 48px;
}

.footer__brand .nav__logo { font-size: 0.95rem; }

.footer__brand p {
  font-size: 0.84rem;
  color: var(--text-3);
  margin-top: 8px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__nav a,
.footer__contact a {
  font-size: 0.87rem;
  color: var(--text-2);
  transition: color var(--ease);
}

.footer__nav a:hover      { color: var(--text-1); }
.footer__contact a:hover  { color: var(--accent);  }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer__bottom p {
  text-align: center;
  font-size: 0.79rem;
  color: var(--text-3);
}

/* ──────────────────────────────────────────
   SCROLL REVEAL ANIMATIONS
────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings inside grids */
.services__grid .card.reveal:nth-child(2)       { transition-delay: .07s; }
.services__grid .card.reveal:nth-child(3)       { transition-delay: .14s; }
.services__grid .card.reveal:nth-child(4)       { transition-delay: .21s; }
.services__grid .card.reveal:nth-child(5)       { transition-delay: .28s; }

.use-cases__grid .use-case.reveal:nth-child(2)  { transition-delay: .07s; }
.use-cases__grid .use-case.reveal:nth-child(3)  { transition-delay: .14s; }
.use-cases__grid .use-case.reveal:nth-child(4)  { transition-delay: .21s; }

/* ──────────────────────────────────────────
   RESPONSIVE — 1024px
────────────────────────────────────────── */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reset 5th card column override */
  .services__grid .card:nth-child(4) { grid-column: auto; }
  .services__grid .card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 440px;
    margin: 0 auto;
  }

  .about__inner { gap: 56px; }
}

/* ──────────────────────────────────────────
   RESPONSIVE — 900px
────────────────────────────────────────── */
@media (max-width: 900px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact__inner { grid-template-columns: 1fr; gap: 40px; }

  .footer__top { grid-template-columns: 1fr; gap: 28px; }
}

/* ──────────────────────────────────────────
   RESPONSIVE — 768px (mobile nav)
────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 76px 0; }

  /* Show hamburger */
  .nav__hamburger { display: flex; }

  /* Slide-in drawer */
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: 270px;
    background: rgba(13, 18, 32, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    padding: 100px 32px 40px;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    border-left: 1px solid var(--border);
    z-index: 800;
  }

  .nav__links.open { transform: translateX(0); }

  .nav__link       { font-size: 1.1rem; }
  .nav__link--cta  { width: 100%; text-align: center; padding: 12px 22px; }

  /* Use case stacked layout */
  .use-case {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 32px 24px;
  }

  .use-case__number { font-size: 1.8rem; }

}

/* ──────────────────────────────────────────
   RESPONSIVE — 500px
────────────────────────────────────────── */
@media (max-width: 500px) {
  .container { padding: 0 18px; }

  .hero__title { font-size: 2.1rem; }

  .services__grid { grid-template-columns: 1fr; }
  .services__grid .card:nth-child(5) { grid-column: auto; max-width: none; }

  .card { padding: 28px 22px; }

  .stats__card { flex-direction: column; }
}
