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

:root {
  --accent: #ff5126;
  --accent-dark: #cc3b18;
  --dark: #0d1117;
  --dark-2: #161b22;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --border: rgba(255,255,255,0.08);
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --max-w: min(1680px, 90vw);
  --square-size: clamp(52px, 4vw, 96px);
  --square-offset: clamp(2rem, 3vw, 4rem);
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-dark);
}

/* PAGE WRAP & SNAP */
.page-wrap {
  height: 100vh;
  overflow: hidden;
}

.snap-sections {
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

.section-full {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem);
}

/* FRAME & DECO */
.border-frame {
  position: absolute;
  inset: 10px;
  border: 5px solid rgba(255,255,255,0.45);
  z-index: 10;
  pointer-events: none;
}

.section-full::after {
  content: '';
  position: absolute;
  bottom: var(--square-offset);
  left: var(--square-offset);
  width: var(--square-size);
  height: var(--square-size);
  background: var(--accent);
  z-index: 5;
  pointer-events: none;
}

.deco-square-outline {
  position: absolute;
  top: var(--square-offset);
  right: var(--square-offset);
  width: var(--square-size);
  height: var(--square-size);
  border: 3px solid rgba(255,81,38,0.45);
  z-index: 5;
  pointer-events: none;
}

/* HERO SECTION */
.hero {
  text-align: center;
  background-image: url('images/IMGA.JPG');
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.63);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero__logo {
  width: clamp(220px, 28vw, 620px);
  margin: 0 auto 2.5rem;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.8rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 9vw, 11rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero__headline em {
  font-style: normal;
  color: var(--accent);
}

.hero__cta {
  margin-top: 2.5rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2.4rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.hero__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 36px;
  background: var(--accent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* SERVICES SECTION */
.services {
  background-color: var(--dark-2);
  background-image: url('images/IMGB.JPG');
  background-size: cover;
  background-position: center;
  justify-content: flex-start;
  padding-top: clamp(2.5rem, 5vh, 4rem);
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.63);
  z-index: 0;
}

.services__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.section__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.2vw, 1.35rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 2.6rem);
  line-height: 1.28;
  max-width: 920px;
  margin-bottom: clamp(1.8rem, 3vh, 3rem);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 1.5vw, 2rem);
  align-items: stretch;
}

.service-card {
  background: rgba(33,38,45,0.72);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vh, 3rem) clamp(1.6rem, 2vw, 2.6rem);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(33,38,45,0.85);
}

.service-card__icon {
  width: clamp(48px, 4vw, 74px);
  height: clamp(48px, 4vw, 74px);
  object-fit: contain;
  margin-bottom: 1.2rem;
  filter: brightness(0) saturate(100%) invert(43%) sepia(80%) saturate(800%) hue-rotate(340deg) brightness(105%);
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2vw, 2.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.service-card__text {
  font-size: clamp(0.92rem, 1.05vw, 1.1rem);
  line-height: 1.7;
  color: #ffffff;
}

/* CONTACT SECTION */
.contact {
  background-color: var(--dark);
  background-image: url('images/IMGC.JPG');
  background-size: cover;
  background-position: center;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.55);
  z-index: 0;
}

.contact__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.contact__logo {
  width: clamp(170px, 20vw, 420px);
  margin-bottom: 2rem;
}

.contact__tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.contact__tagline em {
  font-style: normal;
  color: var(--accent);
}

.contact__details {
  list-style: none;
  font-size: clamp(1rem, 1.4vw, 1.6rem);
  line-height: 2;
  color: #ffffff;
}

.contact__details li {
  display: flex;
  gap: 0.75rem;
}

.contact__details li strong {
  min-width: 2ch;
  font-weight: 500;
}

/* FOOTER & BACK TO TOP - OPRAVA */
.section-copyright {
  width: 100%;
  height: auto;
  padding: 0.9rem 2rem;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.88rem;
  color: #1a0a00;
  font-weight: 500;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.copyright__logo-bar {
  width: 100%;
  background: #0d0d0d;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 5rem) clamp(2rem, 5vw, 6rem) 0;
  flex-shrink: 0;
}

.copyright__logo-bar img {
  height: clamp(40px, 7vw, 120px);
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.10;
}

@media (max-width: 900px) {
  .copyright__logo-bar {
    padding: 1.5rem 1.5rem 0;
  }
  .copyright__logo-bar img {
    height: clamp(32px, 10vw, 60px);
  }
}

.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  border: none;
  
  /* Upravená průhlednost a čtvercový design */
  background: rgba(255, 81, 38, 0.25);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  
  opacity: 0;
  pointer-events: none;
  
  transition: 
    opacity 0.4s ease, 
    background 0.3s ease,
    transform 0.3s ease;
    
  z-index: 9999;
  cursor: pointer;
}

.back-top:hover {
  background: rgba(255, 81, 38, 0.8);
  transform: translateY(-3px);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .section-full::after,
  .deco-square-outline { display: none !important; }
  .page-wrap { height: auto; overflow: visible; }
  .snap-sections { height: auto; overflow-y: visible; }
  .section-full { height: auto; min-height: 100svh; }
  .hero { min-height: 100svh; }
  .services { padding: 3rem 1.5rem 4rem; }
  .services__inner { height: auto; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .contact { padding: 3rem 2rem 4rem; }
  .contact__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; justify-items: center; }
  .contact__logo { width: clamp(220px, 55vw, 300px); margin: 0 auto 2rem; }
  .contact__tagline { font-size: clamp(1.6rem, 5vw, 2rem); }
  .contact__details { font-size: 1rem; }
  .contact__details li { justify-content: center; }
  .hero, .services, .contact { background-attachment: scroll; }
  
  /* Úprava tlačítka pro mobil */
  .back-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
  .hero__headline { font-size: clamp(3rem, 15vw, 5rem); }
  .section-copyright { padding: 1rem 1.25rem; font-size: 0.8rem; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}