/* adamslechta.cz – úvodní stránka (dark mode) */

:root {
  --bg: #0a0e0d;
  --bg-2: #0e1412;
  --surface: #121a18;
  --surface-2: #17211e;
  --line: rgba(220, 255, 240, .08);
  --line-2: rgba(220, 255, 240, .16);
  --text: #e8efec;
  --text-2: #a3b2ad;
  --text-3: #6f7f7a;
  --accent: #6ee7c8;
  --accent-2: #3fbfa3;
  --accent-glow: rgba(110, 231, 200, .22);

  --radius: 18px;
  --wrap: 1120px;
  --gutter: clamp(16px, 5vw, 48px);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);

  color-scheme: dark;
}

*, *::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: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

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

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #062019;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Navigace ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 14, 13, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__brand {
  display: block;
  width: 64px;
  color: #fff;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease);
}
.nav__brand svg { width: 100%; height: auto; fill: currentColor; }
.nav.is-scrolled .nav__brand {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav nav { display: flex; gap: 4px; }
.nav nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav nav a.is-active { color: var(--text); }

/* ---------- Úvod (hero) ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: -4% -3% -4% -3%;
  z-index: -3;
  will-change: transform;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 30%;
  animation: hero-in 1.8s var(--ease) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: none; }
}

/* Ztmavení vlevo kvůli logu a plynulý přechod do pozadí dole. */
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 9, 8, .62) 0%, rgba(6, 9, 8, .25) 38%, rgba(6, 9, 8, 0) 60%),
    linear-gradient(180deg, rgba(10, 14, 13, .35) 0%, rgba(10, 14, 13, 0) 18%, rgba(10, 14, 13, 0) 62%, var(--bg) 100%);
  pointer-events: none;
}

.hero__rain {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

.hero__content {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: clamp(240px, 36vw, 560px);
  transform: translateY(calc(-50% + var(--py, 0px)));
  will-change: transform, opacity;
}
@media (min-width: 1400px) {
  .hero__content { left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 - 40px)); }
}

.logo { line-height: 0; }
.logo__svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .55));
  animation: logo-in 1.4s .3s var(--ease) both;
}
@keyframes logo-in {
  from { opacity: 0; transform: translateX(-24px); filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .55)) blur(6px); }
  to   { opacity: 1; transform: none; }
}
.logo__base { fill: #f4f8f6; }
.logo__glow { mix-blend-mode: screen; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  transition: border-color .2s;
  animation: fade-in 1s 1.6s both;
}
.hero__scroll:hover { border-color: rgba(255, 255, 255, .7); }
.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  animation: scroll-dot 2.2s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  80%  { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Sekce ---------- */

.section {
  position: relative;
  padding: clamp(80px, 12vw, 150px) 0;
}

.section__head { max-width: 640px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow span {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.section__intro {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 18px;
}

/* O mně */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__text { display: grid; gap: 20px; color: var(--text-2); }
.about__text .lead {
  color: var(--text);
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.55;
}

/* Aplikace */
.apps { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 30%, var(--bg-2) 70%, var(--bg) 100%); }
.apps::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 80% 30%, rgba(110, 231, 200, .05), transparent 70%);
  pointer-events: none;
}

.apps__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin-top: clamp(40px, 6vw, 64px);
}

.card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgba(110, 231, 200, .07), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .3s, transform .4s var(--ease), box-shadow .4s;
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(110, 231, 200, .06);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 231, 200, .25), transparent 70%),
    #0c1311;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: box-shadow .4s, color .3s;
}
.card__icon svg { width: 46px; height: 46px; }
.card:hover .card__icon {
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 28px -4px var(--accent-glow);
}

.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .04em;
}
.card__version {
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text-2);
  font: 500 12px/1.4 var(--font);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.card__subtitle {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}
.card__desc {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 16px;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 16px;
  padding: 0;
  list-style: none;
}
.card__tags li {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
}

.card__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
/* Celá karta je klikací. */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card__url {
  margin-left: auto;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 400;
}
.card__link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}
.card:hover .card__link svg { transform: translateX(4px); }
.card:has(.card__link:focus-visible) { border-color: var(--accent); }
.card__link:focus-visible { outline: none; }

/* ---------- Patička ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  color: var(--text-3);
  font-size: 14px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__top {
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
}
.footer__top:hover { color: var(--accent); }

/* ---------- Postupné zobrazení při scrollu ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .apps__grid .reveal:nth-child(2) { transition-delay: .12s; }

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .apps__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { height: 60px; }
  .nav nav a { padding: 8px 10px; font-size: 14px; }

  /* Na výšku je postava uprostřed – logo jde dolů přes tmavší část fotky. */
  .hero__bg img { object-position: 84% 20%; }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(10, 14, 13, .45) 0%, rgba(10, 14, 13, 0) 22%, rgba(10, 14, 13, 0) 45%, rgba(10, 14, 13, .82) 78%, var(--bg) 100%);
  }
  .hero__content {
    top: auto;
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: min(78vw, 360px);
    transform: translateY(var(--py, 0px));
  }
  .card__url { display: none; }
  .card__link svg { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
