/* ==========================================================================
   Technika i Bezpieczeństwo - arkusz stylów
   ========================================================================== */

/* ---------- Font (hostowany lokalnie, bez Google Fonts / RODO) ---------- */

@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/public-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/public-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/public-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/public-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/public-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/public-sans-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/public-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/public-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/public-sans-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/public-sans-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Zmienne ---------- */

:root {
    --c-bg: #F4F2EE;
    --c-white: #FFFFFF;
    --c-ink: #16181D;
    --c-text: #3A3D44;
    --c-muted: #5E6168;
    --c-muted-dark: #8E8B84;
    --c-on-dark: #C9C6BF;
    --c-line: #DDD9D1;
    --c-red: #D7261E;
    --c-red-dark: #B51D16;
    --c-red-light: #FF6A60;
    --c-green: #0A7D45;
    --c-sand: #EDE9E2;
    --c-paper: #F7F6F3;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 24px;
    --container: 1280px;
    --gutter: 32px;
    --section-y: 96px;
    --header-h: 73px;

    --shadow-hover: 0 16px 32px rgba(22, 24, 29, .16);
    --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Baza ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
a:hover { color: var(--c-red); }

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

h1, h2, h3, p, ol, ul { margin: 0; }

address { font-style: normal; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.text-accent { color: var(--c-red); }

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--c-ink);
    color: var(--c-white);
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; color: var(--c-white); }

/* ---------- Przyciski ---------- */

.btn {
    display: inline-block;
    padding: 16px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
}
.btn--dark  { background: var(--c-ink); color: var(--c-white); }
.btn--dark:hover  { background: var(--c-red); color: var(--c-white); }
.btn--red   { background: var(--c-red); color: var(--c-white); font-weight: 700; }
.btn--red:hover   { background: var(--c-red-dark); color: var(--c-white); }
.btn--light { background: var(--c-white); color: var(--c-ink); font-weight: 700; font-size: 15px; padding: 14px 24px; }
.btn--light:hover { background: var(--c-ink); color: var(--c-white); }
.btn--block { display: block; width: 100%; }

.btn-link {
    padding: 16px 8px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 2px solid var(--c-ink);
}
.btn-link:hover { border-color: var(--c-red); }

/* ---------- Nagłówek ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 40px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { color: var(--c-ink); }
.brand__logo { height: 52px; width: auto; }
.brand__name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-left: auto;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.site-header__phone { font-weight: 700; font-size: 16px; color: var(--c-red); white-space: nowrap; }
.site-header__phone:hover { color: var(--c-ink); }

/* ---------- Hero ---------- */

.hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    padding-top: 56px;
}

.hero__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 24px 48px 56px 0;
}

.hero__title {
    font-size: clamp(40px, 5.6vw, 76px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.hero__lead { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.hero__lead p { font-size: 19px; line-height: 1.6; color: var(--c-text); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    background: #D9D4CB;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.hero__stripes {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}
.hero__stripes span { display: block; height: 10px; background: var(--c-bg); }
.hero__stripes span:nth-child(1) { margin-left: 62%; }
.hero__stripes span:nth-child(2) { margin-left: 48%; }
.hero__stripes span:nth-child(3) { margin-left: 34%; }
.hero__stripes span:nth-child(4) { margin-left: 20%; }
.hero__stripes span:nth-child(5) { margin-left: 6%; }

.hero__badge {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    background: var(--c-red);
    color: var(--c-white);
    border-radius: 14px;
}
.hero__badge strong { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero__badge span { font-size: 14px; }

/* ---------- Sekcje ---------- */

.section { padding: var(--section-y) 0; }
.section--white { background: var(--c-white); }
.section--sand  { background: var(--c-bg); }
.section--dark  { background: var(--c-ink); color: var(--c-white); padding-bottom: 48px; }

.section__stack { display: flex; flex-direction: column; gap: 40px; }

.section__intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 24px 64px;
    align-items: end;
}

.section__title {
    font-size: clamp(32px, 3.8vw, 52px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.section__lead { font-size: 17px; line-height: 1.6; color: var(--c-muted); max-width: 520px; text-wrap: pretty; }

/* ---------- Kafle usług ---------- */

.tiles {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(150px, auto);
    grid-auto-flow: dense;
    gap: 14px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 26px 28px;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.tile--red   { background: var(--c-red);   color: var(--c-white); }
.tile--green { background: var(--c-green); color: var(--c-white); }
.tile--ink   { background: var(--c-ink);   color: var(--c-white); }
.tile--sand  { background: var(--c-sand);  color: var(--c-ink); }
.tile--line  { background: var(--c-paper); color: var(--c-ink); }

.tile__media { margin: -26px -26px 4px; overflow: hidden; }
.tile__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.tile--featured .tile__img { height: 240px; }
.tile:hover .tile__img { transform: scale(1.05); }

.pos-center { object-position: center 45%; }
.pos-top    { object-position: center 30%; }
.pos-low    { object-position: center 60%; }
.pos-left   { object-position: 25% 35%; }

.tile__meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: 13px;
    font-weight: 600;
    opacity: .75;
}
.tile__cat { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; text-align: right; }

.tile__title {
    margin-top: auto;
    max-width: 620px;
    font-size: 20px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.tile--featured .tile__title { font-size: clamp(26px, 2.6vw, 38px); }

.tile__text { max-width: 560px; font-size: 15px; line-height: 1.55; opacity: .9; text-wrap: pretty; }

.tile__list {
    list-style: none;
    padding: 0;
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 8px 24px;
    counter-reset: tile-list;
}
.tile__list li {
    display: flex;
    gap: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, .28);
    font-size: 14.5px;
    line-height: 1.45;
    counter-increment: tile-list;
}
.tile__list li::before { content: counter(tile-list); font-weight: 700; }

.tile__note {
    margin-top: 6px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .14);
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    line-height: 1.5;
    font-weight: 600;
}

/* Tablet: siatka 6 kolumn */
@media (min-width: 624px) {
    .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .md-c3 { grid-column: span 3; } .md-c6 { grid-column: span 6; }
    .md-r1 { grid-row: span 1; } .md-r2 { grid-row: span 2; } .md-r3 { grid-row: span 3; }
    .tile__title { font-size: 24px; }
    .md-r1 .tile__title { font-size: 20px; }
}

/* Desktop: siatka 12 kolumn */
@media (min-width: 1024px) {
    .tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg-c3 { grid-column: span 3; } .lg-c4 { grid-column: span 4; } .lg-c5 { grid-column: span 5; }
    .lg-c6 { grid-column: span 6; } .lg-c7 { grid-column: span 7; }
    .lg-r1 { grid-row: span 1; } .lg-r2 { grid-row: span 2; } .lg-r3 { grid-row: span 3; }
    .lg-r1 .tile__title { font-size: 20px; }
    .lg-r2 .tile__title, .lg-r3 .tile__title { font-size: 24px; }
}

/* ---------- O firmie ---------- */

.about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 40px 56px;
    align-items: start;
}

.about__text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.about__text p { max-width: 720px; font-size: 17px; line-height: 1.65; color: var(--c-text); text-wrap: pretty; }
.about__title {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-wrap: pretty;
}

@media (min-width: 1000px) {
    .about__text { grid-column: span 2; }
}

.about__aside { display: flex; flex-direction: column; gap: 14px; }

.zoom { overflow: hidden; border-radius: var(--radius); }
.zoom img { width: 100%; height: 220px; object-fit: cover; object-position: 30% center; transition: transform .6s var(--ease); }
.zoom:hover img { transform: scale(1.04); }

.cta-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    background: var(--c-red);
    color: var(--c-white);
    border-radius: var(--radius);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.cta-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(22, 24, 29, .14); }
.cta-card p { font-size: 15px; line-height: 1.5; }
.cta-card .cta-card__title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.cta-card .btn { align-self: flex-start; }

.note-card {
    padding: 24px 28px;
    background: var(--c-white);
    border-radius: var(--radius);
    font-size: 15px;
    line-height: 1.55;
    color: var(--c-text);
}

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

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 56px 72px;
}

.contact__info { display: flex; flex-direction: column; gap: 36px; }
.contact__phones { display: flex; flex-direction: column; gap: 8px; }
.contact__phone { font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.contact__phone--muted { color: var(--c-muted-dark); }
.contact__phone:hover { color: var(--c-red-light); }
.contact__address { font-size: 16px; line-height: 1.55; color: var(--c-on-dark); }

.mail-card {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px;
    background: var(--c-white);
    color: var(--c-ink);
    border-radius: var(--radius-lg);
}
.mail-card p { font-size: 16px; line-height: 1.6; color: var(--c-text); text-wrap: pretty; }
.mail-card__title { font-size: 22px; font-weight: 700; }
.mail-card__email {
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

/* ---------- Stopka ---------- */

.site-footer { background: var(--c-ink); color: var(--c-muted-dark); }
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px 32px;
    padding-top: 28px;
    padding-bottom: 36px;
    border-top: 1px solid #2C2F36;
    font-size: 14px;
}
.site-footer img { height: 40px; width: auto; }

/* ---------- Strona 404 ---------- */

.error-page { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-height: 50vh; }
.error-page__code { font-size: 96px; font-weight: 800; line-height: 1; color: var(--c-red); letter-spacing: -0.04em; }

/* ---------- Mniejsze ekrany ---------- */

@media (max-width: 640px) {
    :root { --gutter: 20px; --section-y: 64px; }
    .brand__name { font-size: 16px; }
    .site-nav { margin-left: 0; gap: 20px; }
    .hero__content { padding-right: 0; }
    .hero__media { min-height: 340px; }
}

/* ---------- Ograniczenie animacji ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
    .tile:hover, .cta-card:hover { transform: none; }
    .tile:hover .tile__img, .zoom:hover img { transform: none; }
}
