/* =========================================================================
   Serwis Elektroniki — Sebastian Maciopa
   Dark theme · glassmorphism · animacje CSS · mobile-first
   ========================================================================= */

/* ---------- Zmienne motywu ---------- */
:root {
    --bg: #0f172a;
    --bg-alt: #111c33;
    --surface: rgba(30, 41, 59, 0.55);
    --surface-solid: #1e293b;
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.30);

    --text: #e8eef9;
    --text-muted: #97a6c0;
    --text-soft: #c2cde0;

    --accent: #3b82f6;
    --accent-strong: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.14);
    --accent-glow: rgba(59, 130, 246, 0.45);
    --success: #22c55e;
    --danger: #f87171;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;

    --shadow-sm: 0 4px 14px rgba(2, 6, 23, 0.35);
    --shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
    --shadow-accent: 0 18px 40px rgba(37, 99, 235, 0.35);

    --container: 1160px;
    --header-h: 70px;

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(1100px 600px at 80% -10%, rgba(37, 99, 235, 0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(56, 189, 248, 0.10), transparent 55%);
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }

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

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
.container--narrow { max-width: 760px; }

.section {
    padding-block: clamp(56px, 9vw, 110px);
    position: relative;
    scroll-margin-top: var(--header-h);
}
.section--alt { background: linear-gradient(180deg, rgba(17, 28, 51, 0.6), rgba(15, 23, 42, 0.2)); }

.section-head { max-width: 720px; margin: 0 auto clamp(34px, 5vw, 60px); text-align: center; }
.section-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.text-accent {
    background: linear-gradient(120deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    padding: 0.72em 1.5em;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover { box-shadow: 0 22px 48px rgba(37, 99, 235, 0.5); color: #fff; }

.btn-ghost { background: rgba(148, 163, 184, 0.08); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.16); border-color: var(--border-strong); }

.btn-sm { padding: 0.55em 1.1em; font-size: 0.9rem; }
.btn-lg { padding: 0.9em 1.9em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 18px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    border-radius: 12px;
    box-shadow: var(--shadow-accent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 1.02rem; }
.brand__text small { color: var(--text-muted); font-size: 0.74rem; letter-spacing: 0.04em; }

.site-nav { display: none; margin-left: auto; gap: 26px; }
.site-nav a { color: var(--text-soft); font-size: 0.95rem; font-weight: 500; position: relative; }
.site-nav a::after {
    content: "";
    position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.25s var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { width: 100%; }

.site-header__cta { margin-left: auto; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-block: clamp(72px, 13vw, 150px);
    overflow: hidden;
    isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    animation: float 14s ease-in-out infinite;
}
.hero__orb--1 { width: 420px; height: 420px; top: -120px; right: -80px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.7), transparent 70%); }
.hero__orb--2 { width: 360px; height: 360px; bottom: -140px; left: -100px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45), transparent 70%);
    animation-delay: -7s; }
.hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 40%, transparent 100%);
}

.hero__inner { max-width: 820px; }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 15px;
    margin-bottom: 22px;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); animation: pulse 2.2s ease-in-out infinite; }

.hero__title { font-size: clamp(2.3rem, 6.5vw, 4.4rem); margin-bottom: 0.4em; }
.hero__subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 3rem; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: clamp(20px, 5vw, 48px);
    width: fit-content;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--text); }
.hero__stats span { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Cards (wspólne) ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
                border-color 0.3s var(--ease);
}
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.icon { width: 26px; height: 26px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--services { grid-template-columns: 1fr; }
.grid--why { grid-template-columns: 1fr; }
.grid--reviews { grid-template-columns: 1fr; }

/* ---------- Service cards ---------- */
.service-card { padding: 28px 26px; }
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}
.service-card__icon {
    display: grid; place-items: center;
    width: 56px; height: 56px;
    margin-bottom: 18px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 14px;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.service-card:hover .service-card__icon {
    transform: scale(1.08) rotate(-4deg);
    background: var(--accent);
    color: #fff;
}
.service-card__title { font-size: 1.15rem; }
.service-card__desc { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.section-cta { text-align: center; margin-top: clamp(34px, 5vw, 54px); }
.section-cta__note { margin-top: 12px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Why cards ---------- */
.why-card { display: flex; gap: 18px; padding: 26px 24px; }
.why-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.why-card__icon {
    flex: 0 0 auto;
    display: grid; place-items: center;
    width: 50px; height: 50px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 13px;
}
.why-card__title { font-size: 1.1rem; margin-bottom: 0.3em; }
.why-card__desc { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* ---------- About ---------- */
.about { display: grid; gap: clamp(30px, 5vw, 60px); align-items: center; }
.about__content .about__lead { font-size: 1.15rem; color: var(--text-soft); }
.about__points { display: grid; gap: 12px; margin: 22px 0 28px; }
.about__points li { display: flex; align-items: center; gap: 12px; color: var(--text-soft); }
.li-icon { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }

.about__media { position: relative; display: grid; place-items: center; min-height: 260px; }
.about__badge {
    position: relative;
    z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    padding: 42px 38px;
    text-align: center;
    color: var(--text-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.about__badge-icon { width: 54px; height: 54px; color: var(--accent); }
.about__glow {
    position: absolute; inset: 10% 18%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    filter: blur(60px);
    z-index: 0;
}

/* ---------- Reviews ---------- */
.review-card { display: flex; flex-direction: column; gap: 16px; padding: 28px 26px; margin: 0; }
.review-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.review-card__stars { display: flex; gap: 3px; color: #fbbf24; }
.star-icon { width: 20px; height: 20px; fill: #fbbf24; stroke: #fbbf24; }
.review-card__text { margin: 0; color: var(--text-soft); font-size: 1rem; font-style: italic; }
.review-card__author { display: flex; flex-direction: column; }
.review-card__author strong { color: var(--text); }
.review-card__author span { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 28px; align-items: start; }

.contact__list { display: grid; gap: 8px; margin-bottom: 22px; }
.contact__list li { display: flex; gap: 14px; align-items: center; padding: 12px 14px;
    border-radius: var(--radius-sm); transition: background 0.2s var(--ease); }
.contact__list li:hover { background: rgba(148, 163, 184, 0.07); }
.contact__icon {
    display: grid; place-items: center;
    width: 44px; height: 44px; flex: 0 0 auto;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
}
.contact__list small { display: block; color: var(--text-muted); font-size: 0.78rem; }
.contact__list a, .contact__list address { color: var(--text); font-weight: 600; }
.contact__list a:hover { color: var(--accent); }

.contact__hours { margin-top: 22px; padding: 22px 22px 14px; }
.contact__hours-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 12px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours-table th, .hours-table td { padding: 9px 0; text-align: left; border-bottom: 1px solid var(--border); }
.hours-table td { text-align: right; color: var(--text-soft); }
.hours-table th { font-weight: 500; color: var(--text-muted); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table tr.is-closed td { color: var(--danger); }

/* ---------- Contact form ---------- */
.contact-form { padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; }
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; gap: 7px; }
.form-row label { font-size: 0.9rem; font-weight: 600; color: var(--text-soft); }
.form-row label span { color: var(--accent); }

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #64748b; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.contact-form select option { color: #0f172a; }

/* Honeypot — niewidoczne dla ludzi, dostępne dla botów. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.form-check { display: flex; gap: 12px; align-items: flex-start; }
.form-check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.form-check label { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }
.form-check a { color: var(--accent); text-decoration: underline; }

.form-note { margin: 0; font-size: 0.82rem; color: var(--text-muted); }

.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    animation: fadeInUp 0.5s var(--ease) both;
}
.alert--success { color: #bbf7d0; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); }
.alert--success .li-icon { color: var(--success); }
.alert--error { color: #fecaca; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(11, 18, 33, 0.6); }
.site-footer__inner {
    display: grid; gap: 36px;
    padding-block: clamp(40px, 6vw, 64px);
}
.site-footer__brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 14px; max-width: 320px; }
.site-footer h3 { font-size: 0.95rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.site-footer__nav, .site-footer__contact { display: grid; gap: 10px; align-content: start; }
.site-footer__nav a, .site-footer__contact a, .site-footer__contact address { color: var(--text-soft); font-size: 0.95rem; }
.site-footer__nav a:hover, .site-footer__contact a:hover { color: var(--accent); }

.site-footer__bottom { border-top: 1px solid var(--border); }
.site-footer__bottom-inner {
    display: flex; flex-wrap: wrap; gap: 12px;
    justify-content: space-between; align-items: center;
    padding-block: 20px;
    color: var(--text-muted); font-size: 0.88rem;
}
.site-footer__bottom a:hover { color: var(--accent); }

/* ---------- Legal page ---------- */
.legal h2 { font-size: 1.2rem; margin-top: 1.8em; color: var(--text); }
.legal p { color: var(--text-soft); }
.legal__back { display: inline-block; margin-bottom: 24px; color: var(--accent); font-weight: 600; }
.legal__note { margin-top: 2em; padding: 16px; font-size: 0.9rem; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ---------- Animacje ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50%      { transform: translateY(-26px) translateX(14px); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Wejście elementów: fade-in / reveal (czyste CSS — działają bez JS). */
.fade-in { opacity: 0; animation: fadeInUp 0.7s var(--ease) forwards; }
.fade-in--1 { animation-delay: 0.08s; }
.fade-in--2 { animation-delay: 0.18s; }
.fade-in--3 { animation-delay: 0.30s; }
.fade-in--4 { animation-delay: 0.44s; }

.reveal { opacity: 0; animation: fadeInUp 0.7s var(--ease) forwards; animation-delay: 0.1s; }

/* ---------- Responsive (mobile-first → większe ekrany) ---------- */
@media (min-width: 600px) {
    .grid--services { grid-template-columns: repeat(2, 1fr); }
    .grid--why { grid-template-columns: repeat(2, 1fr); }
    .grid--reviews { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 900px) {
    .site-nav { display: flex; }
    .site-header__cta { margin-left: 0; }
    .grid--services { grid-template-columns: repeat(3, 1fr); }
    .grid--why { grid-template-columns: repeat(3, 1fr); }
    .grid--reviews { grid-template-columns: repeat(3, 1fr); }
    .about { grid-template-columns: 0.85fr 1.15fr; }
    .contact { grid-template-columns: 0.9fr 1.1fr; }
}

/* ---------- Dostępność: ograniczenie ruchu ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    /* Elementy startujące z opacity:0 muszą pozostać widoczne. */
    .fade-in, .reveal { opacity: 1 !important; transform: none !important; }
    .hero__orb { animation: none; }
}
