/* PLASTIME.CHEMI s.r.o. — styly webu
   Bez externích zdrojů: font je hostovaný lokálně, žádné cookies ani měření. */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #312783;
  --navy-ink: #22204a;
  --text-2: #4b4873;
  --text-3: #3d3a63;
  --muted: #5d5a82;
  --cyan: #009fe3;
  --cyan-ink: #0a5f8c;
  --cyan-ink-2: #0a6fa3;
  --cyan-soft: #e6f6fd;
  --cyan-pale: #eaf7fd;
  --lilac: #d4d0f0;
  --ground: #f2f5f9;
  --chip: #eef2f8;
  --white: #ffffff;
  --gap: 20px;
  --header-offset: 100px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--navy-ink);
  background: var(--ground);
}

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: var(--navy); }
a:hover { color: var(--cyan-ink-2); }
h1, h2, h3 { color: var(--navy); line-height: 1.12; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

section[id] { scroll-margin-top: var(--header-offset); }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--white); }

.eyebrow { margin: 0; font-weight: 700; font-size: 14px; letter-spacing: .04em; color: var(--cyan-ink-2); text-transform: uppercase; }
.section-title { margin: 12px 0 16px; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: #251d6b; color: var(--white); }
.btn-soft { background: var(--chip); color: var(--navy); }
.btn-soft:hover { background: var(--cyan-soft); color: var(--navy); }
.btn-white { background: var(--white); color: var(--navy); }

/* ---------- Hlavička ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 16px 20px 0; }
.site-header .bar {
  max-width: 1240px; margin: 0 auto; background: var(--white); border-radius: 999px;
  box-shadow: 0 6px 24px rgba(49, 39, 131, .08);
  padding: 0 12px 0 28px; min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 20px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; padding: 10px 16px; border-radius: 999px; }
.nav a:hover { background: var(--chip); color: var(--navy); }
.nav .nav-cta { background: var(--navy); color: var(--white); padding: 12px 22px; }
.nav .nav-cta:hover { background: #251d6b; color: var(--white); }
.nav-toggle {
  display: none; width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: var(--chip); color: var(--navy); align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 820px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--white); border-radius: 24px; padding: 12px;
    box-shadow: 0 18px 40px rgba(20, 20, 60, .16); font-size: 17px;
  }
  .js .nav-open .nav { display: flex; }
  .js .nav a { padding: 14px 18px; }
  .js .nav .nav-cta { text-align: center; margin-top: 4px; }
  /* bez JavaScriptu: odkazy zůstanou viditelné a zalomí se */
  .no-js .site-header .bar { flex-wrap: wrap; border-radius: 28px; padding: 12px 16px; }
  .no-js .nav { flex-wrap: wrap; }
}

/* ---------- Úvod ---------- */
.hero { max-width: 1280px; margin: 0 auto; padding: 28px 20px 0; }
.hero-media {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 620px;
  display: flex; align-items: flex-end;
}
.slides { position: absolute; inset: 0; background: #cfd6df; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slides-toggle {
  position: absolute; top: 20px; right: 20px; z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 20, 60, .18);
}
.slides-toggle:hover { background: var(--white); }
.slides-toggle[hidden] { display: none; }
.slides-toggle .i-play { display: none; }
.slides-toggle[aria-pressed="true"] .i-pause { display: none; }
.slides-toggle[aria-pressed="true"] .i-play { display: block; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }
.hero-card {
  position: relative; margin: 24px; background: var(--white); border-radius: 22px;
  padding: 40px 40px 36px; max-width: 600px; box-shadow: 0 20px 60px rgba(20, 20, 60, .18);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--cyan-soft); color: var(--cyan-ink);
  font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.hero h1 { margin: 18px 0 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; }
.hero p { margin: 18px 0 0; font-size: 18px; color: var(--text-2); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 560px) {
  .hero-media { min-height: 0; flex-direction: column; align-items: stretch; background: var(--white); }
  .slides { position: relative; height: 260px; }
  .slides-toggle { top: 12px; right: 12px; }
  .hero-card { margin: 0; box-shadow: none; padding: 24px 22px 28px; border-radius: 0; }
}

/* ---------- Fakta ---------- */
.facts { padding-top: 56px; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.facts li { background: var(--white); border-radius: 20px; padding: 28px; }
.facts .label { display: block; font-size: 14px; font-weight: 700; color: var(--cyan-ink); }
.facts .value { display: block; margin-top: 8px; font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.3; letter-spacing: -.01em; }

/* ---------- O nás ---------- */
.about { padding-top: 120px; padding-bottom: 120px; }
.about .cols { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.about .text { flex: 1 1 460px; min-width: 0; }
.about .text h2 { margin: 12px 0 24px; }
.about .text p { margin: 0 0 16px; }
.about .media { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.about .media img { width: 100%; object-fit: cover; border-radius: 20px; }
.about .media > picture { height: 100%; }
.about .media .tall { aspect-ratio: 3 / 4; height: 100%; }
.about .stack { display: flex; flex-direction: column; gap: 16px; }
.about .stack img { aspect-ratio: 1 / 1; }
.about .note { background: var(--navy); color: var(--white); border-radius: 20px; padding: 22px; flex-grow: 1; }
.about .note strong { display: block; font-size: 20px; font-weight: 800; line-height: 1.3; }
.about .note span { display: block; font-size: 14px; color: var(--lilac); margin-top: 6px; }

/* ---------- Výrobní program ---------- */
.services { background: var(--white); border-radius: 40px 40px 0 0; }
.services .wrap { padding-top: 112px; padding-bottom: 112px; }
.services .intro { text-align: center; max-width: 720px; margin: 0 auto; }
.services .intro p { margin: 0; color: var(--text-2); }

.sg {
  margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap); position: relative; overflow: hidden;
}
/* skryté přepínače: díky position:fixed je prohlížeč při fokusu neroluje */
.rb { position: fixed; top: 50%; left: 0; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }

.tl { background: var(--ground); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: var(--header-offset); }
.tl img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 22px 22px 0 0; }
.tl-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.tl h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.tl p { margin: 0 0 16px; font-size: 15px; color: var(--text-2); flex-grow: 1; }
.tl-btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--white); color: var(--navy); font-weight: 700; font-size: 15px;
  cursor: pointer; user-select: none;
}
.tl-btn:hover { background: var(--cyan-soft); }
.tl .less { display: none; }
.ptop { position: absolute; left: 0; top: -100px; width: 1px; height: 100px; pointer-events: none; }

.cta-tile {
  background: var(--navy); color: var(--white); border-radius: 22px; padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
}
.cta-tile h3 { margin: 0 0 8px; font-size: 24px; color: var(--white); }
.cta-tile p { margin: 0; font-size: 15px; color: var(--lilac); }
.cta-tile .btn { align-self: flex-start; min-height: 48px; padding: 0 24px; }

.pnl {
  display: none; grid-column: 1 / -1; position: relative; z-index: 2;
  background: var(--ground); border-radius: 22px; padding: 26px 40px 36px;
  animation: pnlPour .38s cubic-bezier(.2, .7, .2, 1) both;
}
.pend { position: absolute; left: 0; bottom: -34px; width: 1px; height: 34px; pointer-events: none; }
.pin { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; animation: pnlText .3s ease-out .12s both; }
.ptx { flex: 1 1 480px; min-width: 0; font-size: 16px; color: var(--text-3); }
.ptx p { margin: 0 0 12px; }
.ptx p:last-child { margin-bottom: 0; }
.ptx ul { margin: 0; padding-left: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 32px; row-gap: 4px; }
.pac { flex: 0 1 auto; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pac .btn { min-height: 48px; padding: 0 24px; white-space: nowrap; }
@media (max-width: 400px) { .pac .btn { white-space: normal; text-align: left; } }
.px {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--white); color: var(--navy); font-weight: 700; font-size: 15px; cursor: pointer;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes pnlPour { from { clip-path: inset(0 0 100% 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
@keyframes pnlText { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes bridgePour { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .pnl, .pin, .tl::after { animation: none !important; }
}

/* Výběr dlaždice: panel se otevře pod řadou a dlaždice do něj „přeteče“ */
#r0:checked ~ .p0, #r1:checked ~ .p1, #r2:checked ~ .p2, #r3:checked ~ .p3, #r4:checked ~ .p4, #r5:checked ~ .p5,
#r6:checked ~ .p6, #r7:checked ~ .p7, #r8:checked ~ .p8, #r9:checked ~ .p9, #r10:checked ~ .p10 { display: block; }

#r0:checked ~ .t0 .more, #r1:checked ~ .t1 .more, #r2:checked ~ .t2 .more, #r3:checked ~ .t3 .more, #r4:checked ~ .t4 .more, #r5:checked ~ .t5 .more,
#r6:checked ~ .t6 .more, #r7:checked ~ .t7 .more, #r8:checked ~ .t8 .more, #r9:checked ~ .t9 .more, #r10:checked ~ .t10 .more { display: none; }

#r0:checked ~ .t0 .less, #r1:checked ~ .t1 .less, #r2:checked ~ .t2 .less, #r3:checked ~ .t3 .less, #r4:checked ~ .t4 .less, #r5:checked ~ .t5 .less,
#r6:checked ~ .t6 .less, #r7:checked ~ .t7 .less, #r8:checked ~ .t8 .less, #r9:checked ~ .t9 .less, #r10:checked ~ .t10 .less { display: inline-flex; }

#r0:focus-visible ~ .t0 .more, #r1:focus-visible ~ .t1 .more, #r2:focus-visible ~ .t2 .more, #r3:focus-visible ~ .t3 .more,
#r4:focus-visible ~ .t4 .more, #r5:focus-visible ~ .t5 .more, #r6:focus-visible ~ .t6 .more, #r7:focus-visible ~ .t7 .more,
#r8:focus-visible ~ .t8 .more, #r9:focus-visible ~ .t9 .more, #r10:focus-visible ~ .t10 .more,
#r0:focus-visible ~ .t0 .less, #r1:focus-visible ~ .t1 .less, #r2:focus-visible ~ .t2 .less, #r3:focus-visible ~ .t3 .less,
#r4:focus-visible ~ .t4 .less, #r5:focus-visible ~ .t5 .less, #r6:focus-visible ~ .t6 .less, #r7:focus-visible ~ .t7 .less,
#r8:focus-visible ~ .t8 .less, #r9:focus-visible ~ .t9 .less, #r10:focus-visible ~ .t10 .less { outline: 3px solid var(--cyan); outline-offset: 3px; }

#r0:checked ~ .t0, #r1:checked ~ .t1, #r2:checked ~ .t2, #r3:checked ~ .t3, #r4:checked ~ .t4, #r5:checked ~ .t5,
#r6:checked ~ .t6, #r7:checked ~ .t7, #r8:checked ~ .t8, #r9:checked ~ .t9, #r10:checked ~ .t10 {
  position: relative; z-index: 1; overflow: visible; border-radius: 22px 22px 0 0;
}
/* most přes mezeru mezi dlaždicí a panelem */
#r0:checked ~ .t0::after, #r1:checked ~ .t1::after, #r2:checked ~ .t2::after, #r3:checked ~ .t3::after, #r4:checked ~ .t4::after, #r5:checked ~ .t5::after,
#r6:checked ~ .t6::after, #r7:checked ~ .t7::after, #r8:checked ~ .t8::after, #r9:checked ~ .t9::after, #r10:checked ~ .t10::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -42px; height: 42px; background: var(--ground);
  transform-origin: top; animation: bridgePour .18s ease-out both;
}
/* vyduté oblouky v místě napojení */
#r0:checked ~ .t0 .tl-body::before, #r1:checked ~ .t1 .tl-body::before, #r2:checked ~ .t2 .tl-body::before, #r3:checked ~ .t3 .tl-body::before,
#r4:checked ~ .t4 .tl-body::before, #r5:checked ~ .t5 .tl-body::before, #r6:checked ~ .t6 .tl-body::before, #r7:checked ~ .t7 .tl-body::before,
#r8:checked ~ .t8 .tl-body::before, #r9:checked ~ .t9 .tl-body::before, #r10:checked ~ .t10 .tl-body::before {
  content: ""; position: absolute; left: -20px; bottom: -20px; width: 20px; height: 20px;
  background: radial-gradient(circle at 0 0, transparent 19.5px, var(--ground) 20px);
}
#r0:checked ~ .t0 .tl-body::after, #r1:checked ~ .t1 .tl-body::after, #r2:checked ~ .t2 .tl-body::after, #r3:checked ~ .t3 .tl-body::after,
#r4:checked ~ .t4 .tl-body::after, #r5:checked ~ .t5 .tl-body::after, #r6:checked ~ .t6 .tl-body::after, #r7:checked ~ .t7 .tl-body::after,
#r8:checked ~ .t8 .tl-body::after, #r9:checked ~ .t9 .tl-body::after, #r10:checked ~ .t10 .tl-body::after {
  content: ""; position: absolute; right: -20px; bottom: -20px; width: 20px; height: 20px;
  background: radial-gradient(circle at 100% 0, transparent 19.5px, var(--ground) 20px);
}

/* Pořadí v mřížce: dlaždice 0,10,20…; panel jde vždy za konec své řady */
.t0{order:0}.t1{order:10}.t2{order:20}.t3{order:30}.t4{order:40}.t5{order:50}.t6{order:60}.t7{order:70}.t8{order:80}.t9{order:90}.t10{order:100}.cta-tile{order:110}
.p0,.p1,.p2,.p3{order:35}.p4,.p5,.p6,.p7{order:75}.p8,.p9,.p10{order:115}
@media (max-width: 1100px) {
  .sg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p0,.p1,.p2{order:25}.p3,.p4,.p5{order:55}.p6,.p7,.p8{order:85}.p9,.p10{order:115}
}
@media (max-width: 820px) {
  .sg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p0,.p1{order:15}.p2,.p3{order:35}.p4,.p5{order:55}.p6,.p7{order:75}.p8,.p9{order:95}.p10{order:115}
  .pnl { padding: 26px 24px 28px; }
}
@media (max-width: 560px) {
  .sg { grid-template-columns: minmax(0, 1fr); }
  .p0{order:5}.p1{order:15}.p2{order:25}.p3{order:35}.p4{order:45}.p5{order:55}.p6{order:65}.p7{order:75}.p8{order:85}.p9{order:95}.p10{order:105}
}

/* ---------- Realizace ---------- */
.refs { background: var(--white); }
.refs .wrap { padding-bottom: 120px; }
.refs .box { background: var(--cyan-pale); border-radius: 32px; padding: 56px 40px; }
.refs .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.refs .eyebrow { color: var(--cyan-ink); }
.refs h2 { margin: 12px 0 0; font-size: clamp(28px, 3vw, 40px); font-weight: 800; }
.refs .head a { font-weight: 700; }
.refs .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.refs figure { margin: 0; background: var(--white); border-radius: 20px; overflow: hidden; }
.refs figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.refs figcaption { padding: 18px 20px; font-weight: 700; color: var(--navy); }
@media (max-width: 560px) { .refs .box { padding: 36px 20px; border-radius: 24px; } }

/* ---------- Kontakt ---------- */
.contact { padding-top: 112px; padding-bottom: 40px; }
.contact .cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.contact .card { flex: 1 1 400px; min-width: 0; background: var(--navy); color: var(--white); border-radius: 28px; padding: 48px 40px; }
.contact .card h2 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: var(--white); }
.contact .card .lead { margin: 0 0 32px; color: var(--lilac); }
.contact address { font-style: normal; display: flex; flex-direction: column; gap: 18px; }
.contact .row { display: flex; gap: 14px; align-items: flex-start; }
.contact .row svg { flex-shrink: 0; margin-top: 3px; }
.contact .card a { color: var(--white); }
.contact .card .muted { color: var(--lilac); }
.contact .ids { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 15px; color: var(--lilac); }
.map { flex: 1.3 1 440px; min-width: 0; position: relative; display: block; border-radius: 28px; overflow: hidden; min-height: 380px; background: #dfe6ee; }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 35%; }
.map .pill {
  position: absolute; left: 20px; bottom: 20px; background: var(--white); color: var(--navy); font-weight: 700;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.map .credit { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: #333; background: rgba(255, 255, 255, .85); padding: 2px 6px; border-radius: 4px; }
@media (max-width: 560px) { .contact .card { padding: 36px 24px; } .map { min-height: 280px; } }

.people { margin-top: 24px; background: var(--white); border-radius: 28px; padding: 36px 40px; }
.people h3 { margin: 0 0 20px; font-size: 22px; font-weight: 800; }
.people ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; font-size: 14px; line-height: 1.5; }
.people li { background: var(--ground); border-radius: 18px; padding: 16px 16px; }
.people .role { display: block; font-size: 13px; font-weight: 700; color: var(--cyan-ink); }
.people .name { display: block; font-weight: 800; color: var(--navy); margin-top: 2px; }
.people a { overflow-wrap: anywhere; }
@media (max-width: 560px) { .people { padding: 28px 20px; } }

/* ---------- Patička ---------- */
.site-footer { padding: 40px 20px 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); padding: 0; }
.site-footer img { height: 16px; width: auto; }

@media (max-width: 560px) {
  .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .facts li { padding: 18px 16px; }
  .facts .value { font-size: 16px; }
  .about { padding-top: 80px; padding-bottom: 80px; }
  .services .wrap { padding-top: 80px; padding-bottom: 80px; }
  .contact { padding-top: 80px; }
  .services { border-radius: 28px 28px 0 0; }
}
