/* ============================================================
   kawalec.pl v5 — "The Blueprint"
   technical drawing: blueprint blue, millimeter grid, ice lines
   JetBrains Mono + Funnel Display + Mozilla Text
   ============================================================ */

:root {
    --blue: #0e2236;
    --blue-deep: #0a1929;
    --panel: rgba(15, 38, 60, 0.72);
    --ice: #dbe9f7;
    --ice-dim: #8aa6bf;
    --line: rgba(219, 233, 247, 0.22);
    --line-soft: rgba(219, 233, 247, 0.1);
    --lime: #ddf160;
    --violet: #9f8be7;
    --display: "Funnel Display", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --body: "Mozilla Text", Georgia, serif;
    --wrap: 1160px;
    --pad: clamp(20px, 4vw, 56px);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--blue);
    color: var(--ice);
    font-family: var(--body);
    font-weight: 300;
    font-size: 17.5px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: #15290f; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
table { border-collapse: collapse; width: 100%; }

.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; }
.accent { color: var(--lime); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }

/* ---------- millimeter grid ---------- */

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(219, 233, 247, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(219, 233, 247, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(219, 233, 247, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(219, 233, 247, 0.09) 1px, transparent 1px);
    background-size: 10px 10px, 10px 10px, 100px 100px, 100px 100px;
}

.grid-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 100% at 50% 35%, transparent 55%, rgba(10, 25, 41, 0.7) 100%);
}

/* ---------- corner crosshairs ---------- */

.corners { position: relative; }

.corners::before, .corners::after {
    content: "+";
    position: absolute;
    font-family: var(--mono);
    font-size: 15px;
    color: var(--ice-dim);
    line-height: 1;
}

.corners::before { top: -8px; left: -8px; }
.corners::after { bottom: -8px; right: -8px; }

/* ---------- nav ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px clamp(16px, 3vw, 40px);
    background: rgba(10, 25, 41, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-soft);
}

.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 20px; width: auto; }
.nav-proj { color: var(--ice-dim); font-size: 11px; }

.nav-links { display: flex; gap: 22px; }
.nav-link { color: var(--ice-dim); transition: color 0.2s ease; }
.nav-link:hover { color: var(--lime); }

.nav-twin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(221, 241, 96, 0.45);
    border-radius: 4px;
    color: var(--lime);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-twin:hover { background: var(--lime); color: #15290f; }

.nav-twin-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    animation: twin-pulse 2s ease-in-out infinite;
    flex: none;
}

@keyframes twin-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (max-width: 980px) { .nav-links, .nav-proj { display: none; } }

/* ---------- sheets ---------- */

main { position: relative; z-index: 2; }

.sec { padding: clamp(90px, 13vh, 150px) 0; }
.sec:first-of-type { padding-top: clamp(120px, 17vh, 190px); }

.sheet-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    color: var(--ice-dim);
    border: 1px solid var(--line);
    border-left: 3px solid var(--lime);
    padding: 10px 16px;
    margin-bottom: clamp(34px, 5vh, 56px);
    background: var(--panel);
}

.sheet-head-rev { margin-left: auto; }

.sec-title {
    font-family: var(--display);
    font-weight: 450;
    font-size: clamp(30px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    max-width: 24ch;
    margin-bottom: clamp(40px, 6vh, 70px);
}

/* ---------- hero ---------- */

.hero-frame {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: clamp(28px, 4vw, 64px);
    max-width: 900px;
}

.hero-eyebrow { color: var(--ice-dim); margin-bottom: 14px; }

.hero-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(54px, 9vw, 128px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ice);
    margin-bottom: 26px;
}

.hero-title.is-filled { color: var(--ice); -webkit-text-stroke: 0; transition: color 1s ease; }

.dim-line { width: min(520px, 100%); height: 30px; color: var(--lime); display: block; }
.dim-label { color: var(--lime); margin-bottom: 30px; font-size: 11.5px; }

.hero-sub { font-size: clamp(17px, 1.7vw, 20px); max-width: 54ch; margin-bottom: 14px; }
.hero-sub strong, .hero-note strong { color: var(--lime); font-weight: 500; }
.hero-note { color: var(--ice-dim); max-width: 60ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-social {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
    color: var(--ice-dim);
}

.hero-social a:hover { color: var(--lime); }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 4px;
    font-size: 12.5px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 16px 28px; font-size: 13px; }

.btn-solid { background: var(--lime); color: #15290f; }
.btn-solid:hover { background: #eaff7a; }

.btn-ghost { border: 1px solid var(--line); color: var(--ice); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- about ---------- */

.about-grid {
    display: grid;
    grid-template-columns: minmax(240px, 350px) 1fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: start;
}

.fig {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 14px;
    display: block;
}

.fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(20%) contrast(1.02); }

.fig figcaption, .fig .fig-no { color: var(--ice-dim); }
.fig figcaption { margin-top: 12px; font-size: 11px; }

.notes-head { color: var(--lime); margin-bottom: 18px; }

.notes-list li {
    margin-bottom: 18px;
    max-width: 72ch;
    padding-left: 44px;
    position: relative;
}

.note-no { color: var(--lime); position: absolute; left: 0; top: 5px; }
.notes-list strong { color: var(--ice); font-weight: 500; }
.notes-list .accent { color: var(--lime); }

/* revision table */

.rev-table-wrap { margin-top: clamp(44px, 7vh, 70px); }
.rev-title { color: var(--lime); margin-bottom: 14px; }

.rev-table th, .rev-table td {
    border: 1px solid var(--line);
    padding: 11px 16px;
    text-align: left;
    font-size: 12.5px;
}

.rev-table th { background: rgba(219, 233, 247, 0.07); color: var(--ice-dim); }
.rev-table td { color: var(--ice); background: var(--panel); }

.rev-current td { border-color: rgba(221, 241, 96, 0.55); color: var(--lime); }

/* ---------- approach callouts ---------- */

.callout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(18px, 2.4vw, 34px);
}

.callout {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: clamp(24px, 2.6vw, 38px);
}

.callout-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--lime);
    border-radius: 50%;
    color: var(--lime);
    font-size: 15px;
    margin-bottom: 18px;
}

.callout h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 21px;
    margin-bottom: 10px;
}

.callout p { font-size: 15px; color: var(--ice-dim); line-height: 1.65; }

.general-note {
    margin-top: clamp(36px, 5vh, 56px);
    color: var(--ice-dim);
    border-left: 3px solid var(--violet);
    padding-left: 16px;
    max-width: 90ch;
    line-height: 1.8;
    font-size: 11.5px;
}

@media (max-width: 720px) { .callout-grid { grid-template-columns: 1fr; } }

/* ---------- services schedule ---------- */

.schedule-wrap { overflow-x: auto; }

.schedule th, .schedule td {
    border: 1px solid var(--line);
    padding: 16px 18px;
    text-align: left;
    font-size: 13px;
    vertical-align: top;
}

.schedule th { background: rgba(219, 233, 247, 0.07); color: var(--ice-dim); white-space: nowrap; }
.schedule td { background: var(--panel); color: var(--ice-dim); }
.schedule td:first-child { color: var(--lime); white-space: nowrap; }

.schedule td a {
    font-family: var(--display);
    font-size: 19px;
    font-weight: 500;
    color: var(--ice);
    letter-spacing: 0;
    transition: color 0.2s ease;
}

.schedule-row:hover td { background: rgba(219, 233, 247, 0.05); }
.schedule-row:hover td a { color: var(--lime); }

/* ---------- projects figs ---------- */

.figs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(24px, 3vw, 44px);
}

.fig-project { transition: transform 0.3s ease, border-color 0.3s ease; }
.fig-project:hover { transform: translateY(-5px); border-color: rgba(221, 241, 96, 0.55); }

.fig-img { overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line-soft); }

.fig-img img {
    width: 100%; height: 100%; object-fit: cover;
    aspect-ratio: auto;
    filter: grayscale(45%) sepia(18%) hue-rotate(175deg) saturate(0.9) brightness(0.92);
    transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fig-project:hover .fig-img img, .fig-project.in-view .fig-img img { filter: none; transform: scale(1.03); }

.fig-project figcaption { padding: 14px 4px 6px; }
.fig-no { display: block; margin-bottom: 8px; font-size: 11px; }

.fig-project h3 {
    font-family: var(--display);
    font-weight: 450;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.32;
    color: var(--ice);
    transition: color 0.25s ease;
}

.fig-project:hover h3 { color: var(--lime); }

@media (max-width: 760px) { .figs-grid { grid-template-columns: 1fr; } }

.appendix { margin-top: clamp(44px, 7vh, 70px); border-top: 1px dashed var(--line); padding-top: 24px; }
.appendix-title { color: var(--lime); margin-bottom: 14px; }

.appendix-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 28px; }
.appendix-list li { color: var(--ice-dim); font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }

/* ---------- contact / approval ---------- */

.approval {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: clamp(30px, 5vw, 70px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(36px, 5.6vw, 78px);
    line-height: 1;
    letter-spacing: 0.005em;
    margin-bottom: 20px;
}

.contact-sub { color: var(--ice-dim); max-width: 54ch; margin: 0 auto 40px; }

.stamp {
    position: absolute;
    top: clamp(16px, 4vw, 56px);
    right: clamp(-30px, 1vw, 56px);
    border: 3px solid var(--lime);
    color: var(--lime);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    transform: rotate(12deg);
    opacity: 0.9;
    text-align: center;
    line-height: 1.5;
    pointer-events: none;
}

.sign-table { max-width: 640px; margin: 0 auto 40px; }

.sign-table td {
    border: 1px solid var(--line);
    padding: 10px 16px;
    font-size: 12px;
    color: var(--ice-dim);
    text-align: left;
}

.sign-table td:nth-child(even) { color: var(--ice); }
.sign-you td { border-color: rgba(221, 241, 96, 0.5); }
.sign-blank { color: var(--lime) !important; font-style: italic; }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 30px;
}

.contact-mail { color: var(--ice-dim); font-size: 15.5px; }
.contact-mail .accent { border-bottom: 1px solid rgba(221, 241, 96, 0.4); }

/* footer */

.footer { margin-top: clamp(70px, 11vh, 120px); }

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding: 22px 0 70px;
    color: var(--ice-dim);
    font-size: 11px;
}

.footer-left { display: inline-flex; align-items: center; gap: 12px; }
.footer-logo { height: 17px; width: auto; }
.footer-links { display: inline-flex; gap: 20px; }
.footer-links a:hover { color: var(--lime); }

/* ---------- title block (fixed) ---------- */

.titleblock {
    position: fixed;
    right: clamp(12px, 2vw, 28px);
    bottom: clamp(12px, 2vw, 24px);
    z-index: 45;
    border: 1px solid var(--line);
    background: rgba(10, 25, 41, 0.92);
    min-width: 250px;
}

.tb-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 10.5px;
    color: var(--ice-dim);
}

.tb-row:last-child { border-bottom: 0; }
.tb-row strong { color: var(--ice); font-weight: 500; text-align: right; }
#tb-sheet { color: var(--lime); }

@media (max-width: 1100px) { .titleblock { display: none; } }

/* ---------- modes ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .nav-twin-dot { animation: none; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
