/* =========================================================
   Fubyx s. r. o. — štýly
   Farby prevzaté priamo z loga: modrá #006CC0, červená #FC0000.
   Všetko podstatné sa mení v bloku :root nižšie.
   ========================================================= */

:root {
  /* Značka */
  --blue:       #006cc0;   /* modrá z loga */
  --blue-dk:    #005699;
  --blue-lt:    #e8f2fb;
  --blue-pale:  #6ec1ff;   /* na tmavom podklade */
  --red:        #fc0000;   /* červená z loga */

  /* Neutrály */
  --ink:        #08243f;   /* tmavá námornícka, odvodená z modrej */
  --ink-line:   #1b4571;
  --text:       #17242f;
  --muted:      #5a6875;
  --bg:         #ffffff;
  --bg-alt:     #f3f6f9;
  --line:       #e2e8ef;

  /* Rozmery */
  --wrap:       1140px;
  --radius:     14px;
  --radius-lg:  22px;

  --shadow-sm:  0 1px 2px rgba(8,36,63,.06), 0 2px 8px rgba(8,36,63,.05);
  --shadow-md:  0 4px 14px rgba(8,36,63,.08), 0 12px 32px rgba(8,36,63,.07);
  --shadow-lg:  0 18px 50px rgba(8,36,63,.16);
}

/* ---------- Základ ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.021em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(1.85rem, 3.8vw, 2.85rem); font-weight: 700; letter-spacing: -0.026em; }
h2 { font-size: clamp(1.6rem, 3.3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

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

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 .85em;
}

/* ---------- Hlavička (biela, aby logo vyniklo) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  flex: none;
}
.brand-logo { height: 36px; width: auto; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 9px 15px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: .94rem;
  font-weight: 500;
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover { color: var(--blue); background: var(--blue-lt); }

.header-mail {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.header-mail svg { color: var(--blue); flex: none; }
.header-mail:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-lt); }

/* ---------- Úvod ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(780px 480px at 80% 6%, rgba(0,108,192,.4), transparent 63%),
    linear-gradient(168deg, #08243f 0%, #0e3457 52%, #08243f 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 25%, transparent 78%);
}

.hero-inner {
  padding-block: clamp(76px, 11vw, 132px);
  max-width: 840px;
}

.hero h1 { color: #fff; margin-bottom: .5em; }

.hero .lead {
  font-size: clamp(1.06rem, 1.9vw, 1.22rem);
  color: rgba(255,255,255,.84);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Sekcie ---------- */

.section { padding-block: clamp(64px, 8.5vw, 104px); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: clamp(38px, 5vw, 56px); }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- O nás ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(38px, 6vw, 72px);
  align-items: start;
}
.split-text p { color: var(--muted); }
.split-text p:last-child { margin-bottom: 0; }
.split-text a {
  color: var(--blue-dk);
  font-weight: 600;
  text-underline-offset: 3px;
}

.facts {
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 28px;
}
.facts > div {
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt {
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 5px;
}
.facts dd {
  margin: 0;
  font-size: .96rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* ---------- Karty služieb ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 26px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d6e4;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(145deg, #e9f3fc, #d3e6f8);
  color: var(--blue);
  margin-bottom: 20px;
  flex: none;
}

.card > p { color: var(--muted); font-size: .97rem; }

.ticks {
  list-style: none;
  margin: 6px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 27px;
  font-size: .93rem;
  color: var(--text);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 15px;
  height: 9px;
  border-left: 2.2px solid var(--blue);
  border-bottom: 2.2px solid var(--blue);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* ---------- Obrázok v karte ---------- */

.card-media {
  position: relative;
  margin: -34px -30px 24px;          /* na doraz k okrajom karty */
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--blue-lt);
  aspect-ratio: 16 / 10;
}

.card-media img,
.card-media svg {
  position: absolute;
  inset: 0;
  width: 100%;
  /* height:auto by tu nestačilo — obrázky sú absolútne polohované,
     preto výšku určuje inset a object-fit */
  height: 100%;
  object-fit: cover;
  display: block;
}

/* striedanie viacerých fotografií — 4 zábery, každý ~4 s */
.card-media-cycle img {
  opacity: 0;
  animation: cardCycle 16s infinite;
}
.card-media-cycle img:nth-child(1) { animation-delay:   0s; }
.card-media-cycle img:nth-child(2) { animation-delay: -12s; }
.card-media-cycle img:nth-child(3) { animation-delay:  -8s; }
.card-media-cycle img:nth-child(4) { animation-delay:  -4s; }

@keyframes cardCycle {
  0%, 22%  { opacity: 1; }
  27%, 95% { opacity: 0; }
  100%     { opacity: 1; }
}

/* zástupná schéma trasy namiesto fotografie */
.card-media-plan {
  background: linear-gradient(145deg, #f2f7fc, #e2edf8);
}

/* ---------- Postup ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* pevne 4 stĺpce — auto-fit by pri niektorých šírkach nechal 4. krok osamote */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 26px;
}
.steps li { position: relative; padding-top: 8px; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.steps li:last-child .step-num { background: var(--red); }
.steps h3 { margin-bottom: .4em; }
.steps p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- Kontakt ---------- */

.contact { padding-bottom: clamp(72px, 9vw, 112px); }

.contact-card {
  background: var(--ink);
  background-image: radial-gradient(660px 400px at 88% 4%, rgba(0,108,192,.42), transparent 62%);
  color: #fff;
  border-radius: clamp(20px, 3vw, 30px);
  padding: clamp(38px, 5.5vw, 64px);
  box-shadow: var(--shadow-lg);
}

.contact-intro { max-width: 560px; margin-bottom: 38px; }
.contact-intro h2 { color: #fff; }
.contact-intro p { color: rgba(255,255,255,.8); margin: 0; }
.contact-intro .eyebrow { color: var(--blue-pale); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  text-decoration: none;
  color: #fff;
  transition: background-color .2s ease, border-color .2s ease, transform .18s ease;
}
a.contact-item:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(110,193,255,.6);
  transform: translateY(-2px);
}
.contact-icon { color: var(--blue-pale); margin-bottom: 9px; display: flex; }
.contact-label {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  color: rgba(255,255,255,.58);
}
.contact-value { font-weight: 600; font-size: 1.02rem; line-height: 1.42; }
.contact-item-wide .contact-value { font-size: 1.1rem; }

/* ---------- Pätička ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  border-top: 1px solid var(--ink-line);
  font-size: .92rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 40px;
  padding-block: clamp(44px, 6vw, 62px) 34px;
}

/* v tmavej pätičke je logo textové — farebné logo by na tmavom podklade stratilo kontrast */
.footer-wordmark {
  color: #fff;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -.025em;
  display: block;
  margin-bottom: 12px;
  font-style: italic;
}
.footer-wordmark .x { color: var(--red); font-style: normal; }

.footer-brand p { margin: 0 0 .5em; max-width: 42ch; }
.footer-brands a { color: var(--blue-pale); font-weight: 600; text-underline-offset: 3px; }

.footer-legal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px 26px;
  margin: 0;
}
.footer-legal dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  color: rgba(255,255,255,.48);
  margin-bottom: 5px;
}
.footer-legal dd { margin: 0; color: #fff; font-weight: 500; line-height: 1.5; }
.footer-legal dd a { text-decoration: none; }
.footer-legal dd a:hover { color: var(--blue-pale); text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 20px;
  border-top: 1px solid var(--ink-line);
  font-size: .87rem;
  color: rgba(255,255,255,.55);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; transition: color .18s ease; }
.footer-bottom a:hover { color: var(--blue-pale); }

/* =========================================================
   Responzívne správanie
   ========================================================= */

@media (max-width: 1040px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 860px) {
  .nav { display: none; }               /* na mobile ostáva len e-mail */
  .header-inner { min-height: 68px; }
  .brand-logo { height: 30px; }
  html { scroll-padding-top: 78px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .brand-logo { height: 26px; }
  .header-mail span { display: none; }  /* iba ikona obálky */
  .header-mail { padding: 10px 13px; }
  .facts { padding-inline: 22px; }
  .card { padding: 28px 22px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- Tlač ---------- */

@media print {
  .site-header, .skip, .footer-bottom a { display: none; }
  .hero-bg { display: none; }
  .hero, .contact-card, .site-footer { background: #fff !important; color: #000 !important; }
  .hero h1, .contact-intro h2, .footer-wordmark, .footer-legal dd,
  .contact-value, .contact-label { color: #000 !important; }
  .hero .lead, .contact-intro p, .site-footer { color: #333 !important; }
  .contact-item { border-color: #999 !important; background: none !important; }
  .card, .facts { box-shadow: none; break-inside: avoid; }
}

/* ---------- Znížený pohyb ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  /* striedanie fotografií vypneme úplne — inak by sa všetky štyri
     prekryli naraz; necháme len prvú */
  .card-media-cycle img { animation: none !important; opacity: 0; }
  .card-media-cycle img:first-child { opacity: 1; }
}
