/* ==========================================================================
   RESTELmoto – společný základ (rozvržení, komponenty, efekty)
   Používá restelmoto.cz i servis.restelmoto.cz. Vzhled (písma, barvy, tvary)
   určuje vlastní téma každého webu: restelmoto.css / servis.css.
   Ikony: Bootstrap Icons jako SVG sprite (img/icons.svg) – <svg class="ic"><use href="…#nazev"/></svg>
   ========================================================================== */

:root {
  /* barvy */
  --black: #0d0d0e;
  --black-2: #18181a;
  --black-3: #2a2a2d;
  --white: #ffffff;
  --gray: #f3f3f1;
  --line: #e4e4e1;
  --text: #1c1c1e;
  --muted: #5d5f64;
  --on-dark: #e8e8ea;
  --on-dark-muted: #a3a5ab;
  --accent: #ea4a1a;
  --accent-hover: #ff5f2e;
  --on-accent: #ffffff;
  --accent-text: #c23a0e;

  /* písma – přepisuje téma */
  --font-text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --head-weight: 700;
  --head-style: normal;
  --head-spacing: .01em;
  --font-ui: var(--font-head);
  --ui-weight: 700;
  --ui-spacing: .05em;

  /* tvary */
  --radius: 4px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
strong, b { font-weight: 600; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--head-weight); font-style: var(--head-style); letter-spacing: var(--head-spacing); text-transform: uppercase; line-height: 1; margin: 0 0 .5em; color: var(--black); }
h1 { font-size: clamp(2.75rem, 7.5vw, 5.5rem); line-height: .95; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.4rem; }
.hl { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
section[id] { scroll-margin-top: calc(var(--header-h) - 8px); }

/* Ikona – chová se jako <i class="bi">: velikost podle písma, barva podle textu */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; fill: currentColor; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.ui { font-family: var(--font-ui); font-weight: var(--ui-weight); letter-spacing: var(--ui-spacing); text-transform: uppercase; }

/* ---------- Sekce ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--gray { background: var(--gray); }
.section--dark { background: var(--black); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--dark .lead { color: var(--on-dark-muted); }

/* ---------- Tlačítka ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; padding: .7em 1.6em; border: 2px solid transparent; border-radius: var(--radius); font-family: var(--font-ui); font-weight: var(--ui-weight); letter-spacing: var(--ui-spacing); text-transform: uppercase; font-size: 1.05rem; text-decoration: none; line-height: 1; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.btn .ic { font-size: 1.15em; transition: transform .25s var(--ease); }
.btn:hover .ic--move { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--accent); color: var(--white); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.btn-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-light:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--black-3); }
.btn-sm { min-height: 44px; padding: .55em 1.1em; font-size: .98rem; }

/* ---------- Hlavička ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); transition: background-color .3s, height .3s var(--ease), box-shadow .3s; }
.header.is-scrolled, .header.is-open { background: rgba(13,13,14,.96); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header.is-scrolled { height: 64px; }
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo img { height: 44px; width: auto; transition: height .3s var(--ease); }
.header.is-scrolled .header__logo img { height: 38px; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav__link { position: relative; display: block; padding: .5rem .8rem; color: var(--white); text-decoration: none; font-family: var(--font-ui); font-weight: var(--ui-weight); letter-spacing: var(--ui-spacing); text-transform: uppercase; font-size: 1rem; }
.nav__link::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__cta { margin-left: 12px; }
.nav-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--white); font-size: 30px; cursor: pointer; }
@media (max-width: 991px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--black); padding: 16px 20px 32px; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .header.is-scrolled .nav { top: 64px; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 1rem .2rem; font-size: 1.35rem; border-bottom: 1px solid var(--black-3); }
  .nav__link::after { display: none; }
  .nav__cta { margin: 24px 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* ---------- Úvod (hero) ---------- */
.hero { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--header-h) + 40px) 0 56px; color: var(--white); background: var(--black); overflow: hidden; isolation: isolate; }
.hero__media, .hero__media img, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__video { opacity: 0; transition: opacity 1s ease; }
.hero__video.is-playing { opacity: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13,13,14,.7); }
.hero h1 { color: var(--white); }
.hero__lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: #dedfe2; max-width: 600px; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.js .hero .enter { opacity: 0; transform: translateY(24px); animation: enter .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 120ms + 150ms); }
@keyframes enter { to { opacity: 1; transform: none; } }

/* ---------- Karty ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 991px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.card { position: relative; padding: 36px 30px 34px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s, background-color .35s, color .35s; }
.card__icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 24px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-size: 32px; transition: background-color .3s, color .3s, transform .4s var(--ease); }
.card h3 { margin-bottom: .45em; transition: color .3s; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; transition: color .3s; }

/* ---------- Dvousloupec ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split--media-left .split__media { order: -1; }
@media (max-width: 991px) { .split { grid-template-columns: 1fr; } .split--media-left .split__media { order: 0; } }
.media-frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--black-2); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.media-frame:hover img { transform: scale(1.04); }
.media-plain img { transition: transform .8s var(--ease); }
.media-plain:hover img { transform: scale(1.02); }

.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist .ic { font-size: 1.4rem; color: var(--accent); margin-top: .12em; }

/* ---------- Pruh s fotkou (paralaxa) ---------- */
.band { position: relative; overflow: hidden; color: var(--white); background: var(--black); isolation: isolate; text-align: center; }
.band__media { position: absolute; inset: -12% 0; z-index: -2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13,13,14,.68); }
.band .container { padding-top: clamp(88px, 13vw, 160px); padding-bottom: clamp(88px, 13vw, 160px); }
.band h2 { color: var(--white); font-size: clamp(2.6rem, 7vw, 5rem); }
.band p { max-width: 560px; margin: 0 auto 2rem; color: #dedfe2; font-size: 1.15rem; }

/* ---------- Certifikáty + lightbox ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 991px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
.cert { position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; cursor: zoom-in; }
.cert img { width: 100%; aspect-ratio: 2480 / 3507; object-fit: cover; transition: transform .6s var(--ease); }
.cert__zoom { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13,13,14,.55); color: var(--white); font-size: 34px; opacity: 0; transition: opacity .3s; }
.cert:hover img { transform: scale(1.05); }
.cert:hover .cert__zoom, .cert:focus-visible .cert__zoom { opacity: 1; }
.note { margin-top: 20px; font-size: .95rem; color: var(--muted); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 760px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(10,10,11,.9); }
.lightbox img { max-height: 88vh; width: auto; margin: 0 auto; }
.lightbox__close { position: fixed; top: 16px; right: 16px; width: 52px; height: 52px; display: grid; place-items: center; border: 0; background: var(--accent); color: var(--on-accent); font-size: 22px; cursor: pointer; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
@media (max-width: 991px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 12px; align-content: start; }
.info-item { display: flex; gap: 18px; padding: 20px 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.info-item__icon { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-size: 22px; }
.info-item h3 { font-size: 1.25rem; margin-bottom: .2em; }
.info-item p { margin: 0; color: var(--muted); }
.info-item a { font-weight: 600; text-decoration: none; }
.info-item a:hover { text-decoration: underline; }
.map-frame { overflow: hidden; min-height: 320px; border-radius: var(--radius); background: var(--gray); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.map-frame:hover iframe { filter: none; }

/* ---------- Formulář ---------- */
.form-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 32px; border-radius: var(--radius); background: var(--black); color: var(--on-dark); }
@media (max-width: 575px) { .form-card { grid-template-columns: 1fr; padding: 24px 20px; } }
.form-card h3 { grid-column: 1 / -1; color: var(--white); font-size: 1.8rem; margin: 0; }
.form-card .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: .95rem; font-weight: 600; color: #d5d6da; }
.field input, .field textarea { width: 100%; padding: .8rem .95rem; border: 1px solid #3b3c40; border-radius: var(--radius); background: var(--black-2); color: var(--white); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: #7d7f85; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field textarea { min-height: 140px; resize: vertical; }
.form-card .consent { margin: 0; font-size: .9rem; color: var(--on-dark-muted); }
.form-card .consent a { color: var(--accent); }
.form-status { margin: 0; font-weight: 600; }
.form-status.is-ok { color: #6fd69a; }
.form-status.is-error { color: #ff8f85; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Patička ---------- */
.footer { position: relative; background: var(--black); color: var(--on-dark-muted); border-top: 4px solid var(--accent); padding: 72px 0 26px; font-size: .98rem; line-height: 1.6; }
.footer__top { display: grid; grid-template-columns: 1.5fr .9fr 1.15fr 1.1fr; gap: 40px 48px; }
@media (max-width: 991px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .footer__top { grid-template-columns: 1fr; gap: 36px; } }
.footer__logo { height: 46px; width: auto; margin-bottom: 20px; }
.footer__about { max-width: 36ch; margin: 0; }
.footer h4 { position: relative; color: var(--white); font-size: 1.35rem; margin: 0 0 20px; padding-bottom: 12px; }
.footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; background: var(--accent); }
.footer a { color: var(--white); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer__list li { display: flex; gap: 12px; align-items: flex-start; }
.footer__list .ic { flex: none; margin-top: .2em; font-size: 1.1rem; color: var(--accent); }
.footer__nav a { display: inline-flex; align-items: center; gap: 0; color: #d3d4d8; }
.footer__nav a::before { content: ""; width: 0; height: 2px; background: var(--accent); transition: width .25s var(--ease), margin .25s var(--ease); }
.footer__nav a:hover::before { width: 12px; margin-right: 8px; }
.footer__brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; margin-top: 56px; padding: 28px 0; border-top: 1px solid var(--black-3); }
.footer__brands a { display: flex; align-items: center; opacity: .55; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .3s var(--ease); }
.footer__brands a:hover { opacity: 1; filter: none; transform: translateY(-2px); }
@media (max-width: 575px) { .footer__brands { justify-content: center; gap: 22px 32px; } }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--black-3); font-size: .88rem; }
.footer__brands + .footer__bottom { margin-top: 0; }
.footer__legal a { color: var(--on-dark-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer__legal a:hover { color: var(--white); }
.footer__disclaimer { flex-basis: 100%; margin: 0; font-size: .82rem; color: #808288; }
.footer__credit { display: inline-flex; align-items: center; gap: 10px; color: var(--on-dark-muted) !important; }
.footer__credit span { white-space: nowrap; }
.footer__credit img { height: 16px; width: auto; opacity: .85; transition: opacity .25s, transform .35s var(--ease); }
.footer__credit:hover img { opacity: 1; transform: translateY(-2px); }

/* ---------- Tlačítko nahoru + mobilní lišta ---------- */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-size: 30px; text-decoration: none; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease), visibility .3s, background-color .25s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-hover); }
.callbar { display: none; }
@media (max-width: 767px) {
  .callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(13,13,14,.97); border-top: 1px solid var(--black-3); transform: translateY(110%); transition: transform .35s var(--ease); }
  .callbar.is-visible { transform: none; }
  .callbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .callbar .btn { min-height: 48px; min-width: 0; padding-left: .8em; padding-right: .8em; }
  .to-top { display: none; }            /* na mobilu je spodní lišta */
  .footer { padding-bottom: 104px; }    /* místo pro spodní lištu */
}

/* ---------- Animace při scrollu (skryté jen když běží JS – třídu .js nastaví inline skript v <head>) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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