/* ============================================================
   Patrik Matejda · vývoj webu a design
   Aesthetic: developer's studio, editorial dark, acid-lime accent
   ============================================================ */

:root {
  --bg:        #0b0c0e;
  --bg-2:      #111317;
  --surface:   rgba(243, 242, 236, 0.035);
  --surface-2: rgba(243, 242, 236, 0.06);
  --text:      #f3f2ec;
  --muted:     #9a9ba3;
  --muted-2:   #6f7079;
  --line:      rgba(243, 242, 236, 0.10);
  --line-2:    rgba(243, 242, 236, 0.18);
  --accent:    #c9f24e;
  --accent-2:  #a6d63f;
  --accent-ink:#0b0c0e;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --wrap: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.12rem);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Atmospheric base: two soft accent glows + deep vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 50vw at 78% -8%, rgba(201, 242, 78, 0.10), transparent 60%),
    radial-gradient(50vw 40vw at 0% 12%, rgba(166, 214, 63, 0.06), transparent 55%),
    var(--bg);
}

/* Fine film grain */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(11,12,14,0.85), rgba(11,12,14,0.55));
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--wrap); margin: 0 auto; padding: 0.85rem var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.brand-mark {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.82rem;
  color: var(--accent-ink); background: var(--accent);
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; letter-spacing: -0.02em;
}
.brand-name { font-family: var(--font-display); letter-spacing: -0.01em; }

.nav-menu {
  list-style: none; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem);
  margin: 0; padding: 0;
}
.nav-menu a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important; border: 1px solid var(--line-2);
  padding: 0.5rem 1rem; border-radius: 999px; transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--accent); background: var(--surface); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.28s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-family: var(--font-body);
  padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #d6fb62; transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.05rem; font-family: var(--font-mono); font-weight: 500; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 75% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(120% 90% at 75% 0%, #000 30%, transparent 75%);
  opacity: 0.5;
}
.hero-inner { position: relative; z-index: 1; max-width: 920px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.18em;
  margin: 0 0 1.5rem;
}
.eyebrow .dot { color: var(--muted-2); margin: 0 0.4em; }
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.7rem, 7.2vw, 5.6rem);
  line-height: 0.99; letter-spacing: -0.03em;
  margin: 0 0 1.5rem; text-wrap: balance;
}
.hero-title .hl {
  color: var(--accent);
  -webkit-text-decoration: none; text-decoration: none;
  position: relative; white-space: nowrap;
}
.hero-title .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 0.09em;
  background: var(--accent); opacity: 0.45; border-radius: 2px;
}
.hero-lead {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  color: var(--muted); max-width: 56ch; margin: 0 0 2.2rem; line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.6rem; }
.hero-code { font-size: 0.92rem; color: var(--muted-2); margin: 0; }
.caret {
  display: inline-block; width: 0.62em; height: 1.05em; margin-left: 0.35em;
  background: var(--accent); vertical-align: -0.15em; border-radius: 1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; position: relative; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-no, .card-no, .step-no {
  display: inline-block; color: var(--accent); font-size: 0.85rem;
  letter-spacing: 0.1em; margin-bottom: 0.75rem;
}
.section-head h2, .about-head h2, .contact-inner h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.1rem);
  line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance;
}

/* ---------- Cards (služby) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.6rem 1.8rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.card:hover::before { transform: scaleX(1); }
.card-no { position: absolute; top: 1.3rem; right: 1.4rem; color: var(--muted-2); margin: 0; }
.card-icon { color: var(--accent); display: inline-flex; margin-bottom: 1.1rem; }
.card-icon svg { width: 30px; height: 30px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 0 0 0.55rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- About ---------- */
.section-about { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(243,242,236,0.018), transparent); }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-head h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); }
.about-body .lead { font-size: 1.25rem; color: var(--text); margin: 0 0 1.1rem; font-weight: 500; }
.about-body p { color: var(--muted); margin: 0 0 1.6rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--text); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Steps (jak pracuji) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: none; }
.step { position: relative; padding-top: 1.6rem; border-top: 1px solid var(--line-2); }
.step-no { font-size: 1.6rem; font-weight: 400; color: var(--accent); margin: 0 0 0.7rem; display: block; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.5rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Contact ---------- */
.section-contact { text-align: center; }
.contact-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.contact-inner h2 { font-size: clamp(2.2rem, 1.6rem + 3.2vw, 4rem); margin-bottom: 0.8rem; }
.contact-lead { color: var(--muted); font-size: 1.2rem; margin: 0 0 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0 2rem; margin-top: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
.footer-mail { color: var(--muted); transition: color 0.2s; }
.footer-mail:hover { color: var(--accent); }
.footer-credit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem;
  margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.footer-meta { color: var(--muted-2); font-size: 0.82rem; }
.made-by { color: var(--muted-2); font-size: 0.82rem; }
.made-by a { color: var(--muted); border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: color 0.2s ease, border-color 0.2s ease; }
.made-by a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Load reveal (page-load only, NOT scroll-triggered) ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem; padding: 2rem var(--pad);
    background: var(--bg-2); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -30px 0 60px rgba(0,0,0,0.4);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { font-size: 1.2rem; }
  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .caret { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
