/* ============================================================
   kawalec.pl v4 — "I Bridge Worlds"
   split worlds: paper/serif (human) ↔ ink/mono (machine)
   Fraunces + JetBrains Mono + Mozilla Text
   ============================================================ */

:root {
    --paper: #f4f1ea;
    --paper-soft: #ece8de;
    --ink: #131216;
    --ink-soft: #1b1b20;
    --line-l: rgba(19, 18, 22, 0.14);
    --line-d: rgba(244, 241, 234, 0.14);
    --text-l: #25231f;
    --text-l-dim: #6d6a62;
    --text-d: #ecece8;
    --text-d-dim: #97979e;
    --lime: #ddf160;
    --lime-ink: #87983a;
    --violet: #9f8be7;
    --serif: "Fraunces", Georgia, 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(--ink);
    color: var(--text-d);
    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: #111; }

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; }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em; }
.serif { font-family: var(--serif); }
.serif-it { font-family: var(--serif); font-style: italic; }
.dim { opacity: 0.6; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }

/* ---------- thread ---------- */

.thread {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 15;
    pointer-events: none;
    opacity: 0.38;
}

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

/* ---------- 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: 16px clamp(16px, 3vw, 40px);
    mix-blend-mode: difference;
    color: #fff;
}

.nav-logo img { height: 22px; width: auto; filter: invert(1); }

.nav-links { display: flex; gap: 26px; }
.nav-link { opacity: 0.75; transition: opacity 0.2s ease; }
.nav-link:hover { opacity: 1; }

.nav-twin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px;
}

.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: 920px) { .nav-links { display: none; } }

/* ---------- sections ---------- */

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

.sec { position: relative; padding: clamp(90px, 13vh, 150px) 0; }

.sec-light { background: var(--paper); color: var(--text-l); }
.sec-dark { background: var(--ink); color: var(--text-d); }

.sec-label { margin-bottom: 24px; opacity: 0.65; }
.sec-light .sec-label { color: var(--lime-ink); opacity: 1; }
.sec-dark .sec-label { color: var(--lime); opacity: 1; }

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

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

.sec-hero { padding: 0; }

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 82vh;
    position: relative;
}

.hero-half {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(110px, 16vh, 160px) clamp(28px, 5vw, 90px) clamp(50px, 8vh, 80px);
}

.hero-human { background: var(--paper); color: var(--text-l); align-items: flex-end; text-align: right; }
.hero-machine { background: var(--ink); color: var(--text-d); align-items: flex-start; }

.hero-seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%) skewX(-4deg);
    background: linear-gradient(to bottom, var(--violet), var(--lime));
    z-index: 3;
    box-shadow: 0 0 24px rgba(159, 139, 231, 0.5);
}

.hero-eyebrow { font-size: 16px; margin-bottom: 18px; opacity: 0.75; }
.hero-machine .hero-eyebrow { font-size: 13px; color: var(--lime); opacity: 1; }

.hero-h {
    font-size: clamp(52px, 8.5vw, 124px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-weight: 450;
}

.hero-h-machine { font-weight: 600; color: var(--lime); }

.hero-side-label { margin-top: 22px; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; }

.hero-side-sub { margin-top: 14px; font-size: 16px; opacity: 0.8; line-height: 1.6; }
.hero-machine .hero-side-sub { font-size: 13px; color: var(--text-d-dim); }

/* hero strip */

.hero-strip {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 0;
    border-top: 1px solid var(--line-d);
}

.hero-strip-copy {
    background: var(--paper);
    color: var(--text-l);
    padding: 26px clamp(28px, 5vw, 90px) 8px;
    font-size: 16.5px;
    max-width: 64ch;
}

.hero-strip-copy strong { color: var(--lime-ink); font-weight: 500; }

.hero-actions {
    background: var(--paper);
    padding: 0 clamp(28px, 5vw, 90px) 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-social {
    grid-row: 1 / 3;
    grid-column: 2;
    background: var(--ink);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 26px;
    color: var(--text-d-dim);
}

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

@media (max-width: 860px) {
    .hero-split { grid-template-columns: 1fr; min-height: 0; }
    .hero-human { align-items: flex-start; text-align: left; padding-top: 110px; padding-bottom: 30px; }
    .hero-machine { padding-top: 30px; }
    .hero-seam { left: 0; right: 0; top: auto; bottom: auto; width: auto; height: 3px; transform: none; display: none; }
    .hero-strip { grid-template-columns: 1fr; }
    .hero-social { grid-row: auto; grid-column: 1; justify-content: flex-start; padding: 20px clamp(28px, 5vw, 90px); }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 13px;
    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 30px; font-size: 14px; }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; color: var(--lime); }
.sec-blend .btn-ink, .sec-dark .btn-ink { background: var(--lime); color: #111; }

.btn-ghost { border: 1px solid currentColor; opacity: 0.85; }
.btn-ghost:hover { opacity: 1; border-color: var(--lime-ink); color: var(--lime-ink); }
.sec-blend .btn-ghost:hover, .sec-dark .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, 64px);
    align-items: start;
}

.about-photo {
    background: #fff;
    padding: 12px 12px 16px;
    box-shadow: 0 14px 40px rgba(19, 18, 22, 0.18);
    transform: rotate(-1.6deg);
    position: relative;
}

.about-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.about-photo figcaption { margin-top: 10px; color: var(--text-l-dim); font-size: 12px; text-align: center; }

.about-copy p { margin-bottom: 18px; max-width: 62ch; }
.about-copy strong { font-weight: 500; }

.chip {
    display: inline-block;
    background: var(--ink);
    color: var(--lime);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11.5px;
    margin: 2px 2px 2px 0;
    white-space: nowrap;
}

/* crossings (zigzag timeline) */

.crossings {
    margin-top: clamp(48px, 8vh, 80px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.crossings::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, var(--violet), var(--lime-ink));
}

.crossing {
    width: calc(50% - 30px);
    background: #fff;
    border: 1px solid var(--line-l);
    border-radius: 14px;
    padding: 18px 22px;
    position: relative;
}

.crossing.side-m {
    margin-left: auto;
    background: var(--ink);
    color: var(--text-d);
    border-color: var(--line-d);
}

.crossing-dot {
    position: absolute;
    top: 26px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--violet);
}

.crossing.side-h .crossing-dot { right: -35px; }
.crossing.side-m .crossing-dot { left: -35px; background: var(--lime); }

.crossing-tag { display: block; opacity: 0.55; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }

.crossing h3 { font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.crossing p { font-size: 13px; opacity: 0.65; }

.crossing-now { border-color: rgba(221, 241, 96, 0.6); }
.crossing-now .crossing-tag { color: var(--lime); opacity: 1; }

@media (max-width: 760px) {
    .crossings::before { left: 4px; }
    .crossing, .crossing.side-m { width: auto; margin-left: 22px; }
    .crossing .crossing-dot { left: -22px !important; right: auto; }
}

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

.approach-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.approach-card {
    border-radius: 16px;
    padding: clamp(22px, 2.2vw, 32px);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.approach-card:hover { transform: translateY(-6px); }

.approach-num { opacity: 0.55; margin-bottom: auto; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; }

.approach-card h3 { font-size: 21px; font-weight: 500; line-height: 1.2; margin: 24px 0 12px; }
.approach-card p { font-size: 14.5px; line-height: 1.6; opacity: 0.8; }

.card-paper { background: var(--paper); color: var(--text-l); }
.card-ink { background: var(--ink-soft); color: var(--text-d); border: 1px solid var(--line-d); }
.card-violet { background: var(--violet); color: #17101e; }
.card-lime { background: var(--lime); color: #1c1d0a; }

@media (max-width: 1000px) { .approach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .approach-grid { grid-template-columns: 1fr; } .approach-card { min-height: 0; } }

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

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

.service {
    display: grid;
    grid-template-columns: 1fr 56px 1.1fr;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
    background: #fff;
    border: 1px solid var(--line-l);
    border-radius: 16px;
    padding: clamp(18px, 2.2vw, 28px) clamp(18px, 2.4vw, 34px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(19, 18, 22, 0.12); }

.service-human p { font-size: clamp(17px, 1.8vw, 22px); line-height: 1.4; color: var(--text-l); }

.service-bridge {
    font-size: 22px;
    color: var(--violet);
    text-align: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.service:hover .service-bridge { transform: scale(1.3); color: var(--lime-ink); }

.service-machine {
    background: var(--ink);
    color: var(--text-d);
    border-radius: 10px;
    padding: 14px 18px;
}

.service-machine h3 { font-size: 15px; font-weight: 600; color: var(--lime); margin-bottom: 6px; }
.service-machine p { font-size: 12px; color: var(--text-d-dim); line-height: 1.6; }

@media (max-width: 760px) {
    .service { grid-template-columns: 1fr; }
    .service-bridge { transform: rotate(90deg); }
    .service:hover .service-bridge { transform: rotate(90deg) scale(1.3); }
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(22px, 3vw, 40px);
}

.project {
    background: var(--ink-soft);
    border: 1px solid var(--line-d);
    border-radius: 18px;
    padding: clamp(16px, 1.8vw, 24px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: block;
}

.project:hover { transform: translateY(-6px); border-color: rgba(221, 241, 96, 0.5); }

.project-eq { margin-bottom: 14px; font-size: 13px; color: var(--text-d-dim); }
.eq-h { color: var(--violet); }
.eq-m { color: var(--lime); }
.eq-r { color: var(--text-d); font-weight: 600; }

.project-img {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line-d);
    background: #0d0d10;
}

.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.project:hover .project-img img { transform: scale(1.04); }

.project-meta { margin: 14px 0 8px; color: var(--text-d-dim); font-size: 12px; }

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

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

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

.other-work {
    margin-top: clamp(44px, 7vh, 70px);
    border-top: 1px dashed var(--line-d);
    padding-top: 26px;
}

.other-work-title { color: var(--text-d-dim); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }
.other-work-line { font-size: 15px; line-height: 2; color: var(--text-d); max-width: 100ch; }
.other-work-line .mono { font-size: 11.5px; }

/* ---------- contact (blend) ---------- */

.sec-blend {
    background: linear-gradient(to bottom, var(--ink) 0%, var(--ink) 46%, #4a4456 62%, var(--paper) 86%);
    color: var(--text-d);
    text-align: center;
    padding-bottom: 0;
}

.sec-blend .sec-label { color: var(--lime); }

.contact-title {
    font-size: clamp(36px, 5.6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    font-weight: 450;
    margin-bottom: 20px;
}

.contact-title .mono { font-size: 0.86em; color: var(--lime); }

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

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

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

.footer { margin-top: clamp(80px, 13vh, 150px); padding: 26px 0 46px; color: var(--text-l); }

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

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

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

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