/* odfachowca.pl: one stylesheet for every company page. Colours and the font come from
   the variables set on :root by the page (config/sites.php, palettes and fonts). */

:root {
    --bg: #ffffff; --ink: #0a2735; --muted: #45586a; --soft: #f1f5f8;
    --brand: #176f8f; --brand-ink: #ffffff; --accent: #f29a2e; --accent-ink: #0a2735;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.narrow { max-width: 46rem; }
.skip { position: absolute; left: -999rem; top: 0; background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.preview-bar { margin: 0; padding: 0.6rem 1rem; text-align: center; background: #fdebd0; color: #0a2735; font-weight: 600; }

.top { border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding-block: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1875rem; text-decoration: none; margin-right: auto; }
.brand img { width: 2.75rem; height: 2.75rem; object-fit: contain; border-radius: 0.5rem; }
.top nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.top nav a { display: inline-block; padding: 0.6rem 0; text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.6rem 1.4rem; border-radius: 0.625rem;
    font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: currentColor; }
.btn:hover { filter: brightness(0.95); }

.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero-row { display: grid; gap: 2.5rem; align-items: center; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }
.hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1rem; }

.layout-bold .hero { background: var(--brand); color: var(--brand-ink); }
.layout-bold .hero .lead { color: inherit; opacity: 0.92; }
.layout-classic .hero { background: var(--soft); }
.layout-classic .hero-text { text-align: center; margin-inline: auto; }
.layout-classic .hero .lead { margin-inline: auto; }
.layout-classic .actions { justify-content: center; }
@media (min-width: 56rem) { .layout-split .hero-row { grid-template-columns: 1.1fr 0.9fr; } }

.block { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.block-soft { background: var(--soft); }
.block-brand { background: var(--brand); color: var(--brand-ink); }
.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { padding: 1.4rem; border-radius: 0.875rem; background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.card p { color: var(--muted); margin: 0; }
.card .price { margin-top: 0.75rem; font-weight: 700; color: var(--ink); }
.gallery { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.75rem; }
details { border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); padding-block: 0.4rem; }
summary { cursor: pointer; font-weight: 700; padding-block: 0.7rem; }
details p { color: var(--muted); }
.contact { font-style: normal; display: grid; gap: 0.5rem; font-size: 1.1875rem; margin-top: 1rem; }
.contact a { text-underline-offset: 0.2em; padding-block: 0.25rem; width: fit-content; }

.foot { padding-block: 1.75rem; color: var(--muted); font-size: 0.9375rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.foot p { margin: 0; }

.notice-page { display: grid; place-items: center; min-height: 100vh; background: var(--soft); }
.notice { width: min(100% - 2.5rem, 38rem); text-align: center; padding-block: 3rem; }
.notice p { color: var(--muted); }

@media (max-width: 40rem) {
    .top-call { width: 100%; }
    .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* On a brand-coloured band the accent may be the very same colour: buttons there are inverted. */
.layout-bold .hero .btn-accent, .block-brand .btn-accent { background: var(--brand-ink); color: var(--brand); }
