/* R-PONS s.r.o. — web 2026
   Koncept: výrobní výkres. Zinková šeď, grafit, červená z loga (#FF4949). */

:root {
  --zinc: #E4E6E3;        /* podklad – žárově zinkovaná ocel */
  --zinc-2: #D6D9D5;      /* druhá úroveň podkladu */
  --paper: #F3F4F1;       /* plochy s textem */
  --graphite: #2C3237;    /* tmavé pásy */
  --graphite-2: #3A4147;
  --ink: #1F2428;         /* text */
  --ink-soft: #545C62;    /* sekundární text */
  --line: #B9BEBA;        /* linky výkresu na světlé */
  --line-dark: #5B646B;   /* linky výkresu na tmavé */
  --red: #FF4949;         /* logo – kóty, sváry */
  --red-strong: #D42B2B;  /* tlačítka, odkazy (kontrast AA) */
  --steel-light: #C9CFD2; /* kresba na tmavé */

  --f: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.5rem + 3.6vw, 4.1rem);

  --gut: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--zinc);
  color: var(--ink);
  font-family: var(--f);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* typography */
h1, h2, h3 { font-family: var(--f); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; font-variation-settings: "wdth" 118; }
h2 { font-size: var(--step-3); font-weight: 750; font-variation-settings: "wdth" 115; }
h3 { font-size: var(--step-1); font-weight: 700; font-variation-settings: "wdth" 108; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.narrow { font-variation-settings: "wdth" 70; }
.muted { color: var(--ink-soft); }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { width: 190px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a, .nav button.sub-toggle {
  display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font: inherit;
  font-size: .97rem; font-weight: 600; background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button.sub-toggle:hover, .nav a[aria-current="page"] { color: var(--red-strong); }
.nav button.sub-toggle::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .sub { list-style: none; margin: 0; padding: 8px 0; position: absolute; left: 0; top: 100%; min-width: 280px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--red); display: none; }
.nav li.open > .sub { display: block; }
.nav .sub a { font-weight: 500; padding: 9px 18px; }
.nav .cta-link { margin-left: 10px; }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; font: inherit; font-weight: 700;
  font-variation-settings: "wdth" 108; text-decoration: none; border: 2px solid var(--red-strong);
  background: var(--red-strong); color: #fff; cursor: pointer; border-radius: 2px;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn.small { padding: 9px 16px; font-size: .95rem; }

/* hero */
.hero { background: var(--graphite); color: #fff; position: relative; overflow: hidden; }
.hero::before { /* výkresová mřížka */
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(var(--graphite-2) 1px, transparent 1px), linear-gradient(90deg, var(--graphite-2) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; padding-top: clamp(48px, 7vw, 96px); padding-bottom: 40px; }
.hero h1 { color: #fff; }
.hero .lead { color: var(--steel-light); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-drawing { width: 100%; }
.hero-drawing svg { width: 100%; height: auto; overflow: visible; }

/* razítko (title block) */
.titleblock { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-dark); margin-top: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.titleblock > div { padding: 12px 16px; border-right: 1px solid var(--line-dark); }
.titleblock > div:last-child { border-right: 0; }
.titleblock dt, .tb-k { font-size: .78rem; color: var(--steel-light); font-variation-settings: "wdth" 70; letter-spacing: .02em; }
.titleblock dd, .tb-v { margin: 2px 0 0; font-weight: 700; font-variation-settings: "wdth" 110; line-height: 1.25; }
.titleblock dl { margin: 0; }

/* page header (subpages) */
.page-head { background: var(--graphite); color: #fff; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(var(--graphite-2) 1px, transparent 1px), linear-gradient(90deg, var(--graphite-2) 1px, transparent 1px); background-size: 40px 40px; }
.page-head .wrap { position: relative; padding-top: clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: var(--step-4); color: #fff; max-width: 18ch; }
.page-head .lead { color: var(--steel-light); }
.crumbs { font-size: var(--step--1); color: var(--steel-light); margin-bottom: 18px; font-variation-settings: "wdth" 80; }
.crumbs a { color: var(--steel-light); }
.crumbs a:hover { color: #fff; }
.page-head .titleblock { margin-bottom: 0; transform: translateY(1px); background: var(--graphite); }

/* sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: end; margin-bottom: 40px; }
.sec-head p { margin: 0; color: var(--ink-soft); }
.paper { background: var(--paper); }
.dark { background: var(--graphite); color: #fff; }
.dark .muted, .dark p { color: var(--steel-light); }
.dark a { color: #fff; }

/* výrobní program – řádky */
.program { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.program li { border-bottom: 1px solid var(--line); }
.program a {
  display: grid; grid-template-columns: 120px minmax(0, 4fr) minmax(0, 6fr) 44px; gap: 28px; align-items: center;
  padding: 22px 0; color: var(--ink); text-decoration: none;
}
.program a:hover h3 { color: var(--red-strong); }
.program a:hover .arrow { background: var(--red-strong); border-color: var(--red-strong); color: #fff; }
.program .icon svg { width: 120px; height: 64px; }
.program h3 { margin: 0; font-size: var(--step-2); }
.program p { margin: 0; color: var(--ink-soft); }
.arrow { width: 44px; height: 44px; border: 2px solid var(--ink); display: grid; place-items: center; border-radius: 50%; }
.arrow svg { width: 18px; height: 18px; }

/* postup zakázky */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: s; position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--line-dark); }
.process li { position: relative; padding-right: 16px; counter-increment: s; }
.process li::before {
  content: counter(s); position: relative; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--graphite); border: 2px solid var(--red); border-radius: 50%; font-weight: 800; color: #fff; margin-bottom: 18px;
}
.process h3 { font-size: 1.05rem; margin-bottom: .35em; color: #fff; }
.process p { font-size: .95rem; line-height: 1.5; }

/* reference */
.ref { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; background: var(--paper); border: 1px solid var(--line); }
.ref figure { margin: 0; }
.ref img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.ref .body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.ref dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0 0; font-size: .97rem; }
.ref dt { color: var(--ink-soft); }
.ref dd { margin: 0; font-weight: 600; }

/* certifikace – tabulka */
.cert-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.cert-table th, .cert-table td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cert-table thead th { font-size: .82rem; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid var(--ink); font-variation-settings: "wdth" 75; }
.cert-table td:first-child { font-weight: 700; font-variation-settings: "wdth" 110; white-space: nowrap; }
.cert-table a { font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* cert detail */
.cert { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.cert:first-of-type { border-top: 2px solid var(--ink); }
.cert .doc { display: block; border: 1px solid var(--line); background: #fff; padding: 8px; }
.cert .doc:hover { border-color: var(--red-strong); }
.cert .doc img { width: 100%; }
.cert .doc span { display: block; font-size: .85rem; padding-top: 8px; color: var(--ink-soft); }
.cert h2 { font-size: var(--step-2); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 18px 0 22px; }
.facts dt { color: var(--ink-soft); font-size: .95rem; }
.facts dd { margin: 0; font-weight: 600; }
.scope { margin: 0; padding-left: 1.2em; }
.scope li { margin-bottom: 4px; }
.pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--red-strong); color: var(--red-strong); font-size: .85rem; font-weight: 700; border-radius: 99px; margin-left: 8px; vertical-align: middle; }

/* obsah podstránek */
.content { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.content h2 { font-size: var(--step-2); margin-top: 1.6em; }
.content h2:first-child { margin-top: 0; }
.content ul.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.content ul.ticks li { padding: 8px 0 8px 30px; border-bottom: 1px solid var(--line); position: relative; }
.content ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 6px; border-left: 2px solid var(--red-strong); border-bottom: 2px solid var(--red-strong); transform: rotate(-45deg); }
.aside { position: sticky; top: 100px; }
.drawing-card { background: var(--paper); border: 1px solid var(--line); padding: 20px; }
.drawing-card svg { width: 100%; height: auto; }
.drawing-card figcaption { font-size: .85rem; color: var(--ink-soft); padding-top: 10px; font-variation-settings: "wdth" 80; }
.spec { margin: 24px 0 0; border-top: 2px solid var(--ink); }
.spec div { display: grid; grid-template-columns: 44% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.spec dt { color: var(--ink-soft); }
.spec dd { margin: 0; font-weight: 600; }
.photo-slot { margin-top: 20px; border: 1px dashed var(--line); padding: 18px; font-size: .9rem; color: var(--ink-soft); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,.025) 10px 20px); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* CTA pás */
.cta-band { background: var(--paper); border-top: 1px solid var(--line); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0; max-width: 22ch; }

/* kariéra */
.job { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--paper); }
.job > div { padding: clamp(20px, 3vw, 36px); border-right: 1px solid var(--line); }
.job > div:last-child { border-right: 0; }
.job h3 { margin-bottom: .8em; }
.job ul { margin: 0; padding-left: 1.1em; }
.job li { margin-bottom: 6px; }

/* kontakt */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.person { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.person h3 { margin: 0 0 2px; }
.person .role { color: var(--ink-soft); margin: 0 0 12px; font-size: .95rem; }
.person a { display: block; text-decoration: none; font-weight: 600; }
.addr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.addr h3 { margin-bottom: .4em; }
.addr p { margin: 0 0 .4em; }
form.inquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
form.inquiry .full { grid-column: 1 / -1; }
form.inquiry label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
form.inquiry input, form.inquiry textarea, form.inquiry select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 2px;
}
form.inquiry textarea { min-height: 150px; resize: vertical; }
form.inquiry input:focus, form.inquiry textarea:focus, form.inquiry select:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form-note { font-size: .9rem; color: var(--ink-soft); }
.form-status { font-weight: 600; }

/* footer */
.site-footer { background: var(--graphite); color: var(--steel-light); padding: 56px 0 28px; font-size: .97rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer img { width: 200px; margin-bottom: 16px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--steel-light); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--line-dark); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem; }

/* kresba – animace (jediný orchestrovaný moment) */
.draw { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); animation: draw 2.4s cubic-bezier(.6,.1,.2,1) forwards; }
.draw.d2 { animation-delay: .5s; }
.draw.d3 { animation-delay: 1.1s; animation-duration: 1.4s; }
.fade-in { opacity: 0; animation: fade .8s 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .fade-in { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* responsive */
@media (max-width: 1080px) {
  .process { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 32px; }
  .process::before { display: none; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 2px solid var(--ink); padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer; }
  .nav { position: fixed; inset: 76px 0 0 0; background: var(--paper); display: none; flex-direction: column; align-items: stretch; padding: 12px var(--gut) 32px; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav a, .nav button.sub-toggle { padding: 14px 0; font-size: 1.1rem; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
  .nav .sub { position: static; border: 0; padding: 0 0 8px 16px; min-width: 0; background: transparent; }
  .nav .cta-link { margin: 18px 0 0; }
  .hero .wrap, .sec-head, .content, .ref { grid-template-columns: 1fr; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div { border-bottom: 1px solid var(--line-dark); }
  .titleblock > div:nth-child(2n) { border-right: 0; }
  .program a { grid-template-columns: 84px minmax(0, 1fr) 44px; gap: 16px; }
  .program .icon svg { width: 84px; height: 46px; }
  .program p { grid-column: 2 / 3; grid-row: 2; }
  .program .arrow { grid-column: 3; grid-row: 1 / span 2; }
  .cert { grid-template-columns: 1fr; }
  .cert .doc { max-width: 260px; }
  .job, .addr { grid-template-columns: 1fr; }
  .job > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .aside { position: static; }
}
@media (max-width: 600px) {
  .brand img { width: 150px; }
  .process { grid-template-columns: 1fr 1fr; }
  .people { grid-template-columns: 1fr; }
  form.inquiry { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .program .icon { display: none; }
  .program a { grid-template-columns: minmax(0, 1fr) 44px; }
  .program p { grid-column: 1; }
  .program .arrow { grid-column: 2; }
}

/* výkresy – barvy podle podkladu */
.icon .ann { display: none; }
.icon { color: var(--ink); }
.paper { --bg: var(--paper); }
.drawing-card { --bg: var(--paper); color: var(--ink); }
.hero-drawing { color: var(--steel-light); --bg: var(--graphite); }
.dark { --bg: var(--graphite); }

/* opravy po kontrole */
.nav a.btn { color: #fff; padding: 9px 16px; }
.nav a.btn:hover { color: #fff; }
.hero .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.hero .wrap.tb-wrap { display: block; padding-top: 0; padding-bottom: 0; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 3.7rem); font-variation-settings: "wdth" 112; }
.titleblock dd { overflow-wrap: anywhere; }
svg g > * { vector-effect: non-scaling-stroke; }
svg .draw { vector-effect: none; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
@media (prefers-reduced-motion: reduce) { svg .draw { stroke-dasharray: none; stroke-dashoffset: 0; } }
.nav a.btn { background: var(--red-strong); border-color: var(--red-strong); }
.nav a.btn:hover { background: var(--ink); border-color: var(--ink); }
figure.drawing-card { margin: 0; }
.dark .sec-head .btn { margin-top: 8px; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .ref img { height: auto; }
}
@media (max-width: 600px) {
  .cert-table td:first-child { white-space: normal; }
  .cert-table th:nth-child(2), .cert-table td:nth-child(2) { display: none; }
}

/* mapy – sídlo a provozovna */
.places .wrap { display: grid; gap: clamp(48px, 7vw, 88px); }
.place { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.place-text { border-top: 2px solid var(--ink); padding-top: 22px; }
.place h2 { font-size: var(--step-3); margin-bottom: .5em; }
.place-addr { font-size: var(--step-1); line-height: 1.5; margin-bottom: 1em; }
.place-sub { color: var(--ink-soft); }
.place-contact a, .place-links a { font-weight: 600; }
.place-ids { display: grid; grid-template-columns: max-content 1fr; gap: 4px 20px; margin: 0 0 1em; }
.place-ids dt { color: var(--ink-soft); }
.place-ids dd { margin: 0; font-weight: 600; }
.map { position: relative; min-height: 420px; border: 1px solid var(--line); background: var(--zinc-2); }
.map::after { /* červená značka výrobního výkresu v rohu */
  content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 4px; background: var(--red); pointer-events: none;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 960px) {
  .place { grid-template-columns: 1fr; }
  .map { min-height: 300px; }
}
