/* JetBrains Mono (SIL Open Font License), served from our own server */
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f6f3;
  --fg: #141414;
  --muted: #55554f;
  --line: #e0e0da;
  --dim: #a8a8a1;
  --accent: #3d8500;
  --on-accent: #fff;
  --pad: clamp(24px, 7vw, 112px);
}


* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { padding-inline: var(--pad); max-width: 1440px; margin-inline: auto; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* Header */
.header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-block: 36px;
}
.logo { font-size: 15px; font-weight: 500; }
.nav { display: flex; gap: 36px; font-size: 14px; margin-left: auto; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a span { color: var(--dim); margin-right: 4px; }
.nav a:hover { color: var(--fg); }
.langs { display: flex; gap: 2px; font-size: 12px; text-transform: uppercase; }
.langs a { padding: 4px 6px; border-radius: 4px; color: var(--muted); transition: color .2s, background-color .2s; }
.langs a:hover { color: var(--fg); }
.langs a[aria-current] { color: var(--bg); background: var(--fg); }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 110px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 80px 120px;
}
.hero__content { position: relative; width: 100%; pointer-events: none; }
.hero__content * { pointer-events: auto; }
#life {
  position: absolute; inset: 0;
  display: block;
  /* fade out behind the text and towards the edges */
  -webkit-mask-image: linear-gradient(to right, transparent 25%, rgba(0,0,0,.25) 50%, #000 85%), linear-gradient(to bottom, transparent, #000 15%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 25%, rgba(0,0,0,.25) 50%, #000 85%), linear-gradient(to bottom, transparent, #000 15%, #000 80%, transparent);
          mask-composite: intersect;
}
.prompt { font-size: 15px; margin-bottom: 40px; }
.caret {
  display: inline-block;
  width: .6em; height: 1.15em;
  margin-left: 2px;
  vertical-align: -.2em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
  font-size: clamp(36px, 6.2vw, 92px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.08;
}
.lead {
  margin-top: 36px; max-width: 34em;
  font-size: 17px; color: var(--muted);
}

/* Sections */
.section {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
  padding-block: 110px;
  border-top: 1px solid var(--line);
}
.label {
  font-size: 14px; font-weight: 400;
  color: var(--muted);
  padding-top: 4px;
}
.label span { color: var(--accent); }

.rows li {
  display: grid;
  grid-template-columns: 64px 1.3fr 1fr;
  gap: 24px;
  align-items: baseline;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  transition: color .2s;
}
.rows li:first-child { padding-top: 0; }
.idx { font-size: 13px; color: var(--muted); transition: color .2s; }
.name { font-size: clamp(18px, 1.8vw, 24px); font-weight: 400; letter-spacing: -.02em; }
.meta { font-size: 14px; color: var(--muted); }
.rows li:hover .idx { color: var(--accent); }

/* Projects */
.projects li { grid-template-columns: 64px 1fr; }
.project { display: flex; flex-direction: column; gap: 10px; max-width: 52em; }
.project .name { align-self: flex-start; }
a.name { transition: color .2s; }
a.name:hover { color: var(--accent); }
.ext { font-size: .7em; color: var(--dim); transition: color .2s; }
a.name:hover .ext { color: var(--accent); }
.desc { font-size: 15px; color: var(--muted); line-height: 1.7; }
.desc em { font-style: normal; color: var(--fg); }
.quote { font-size: clamp(17px, 1.6vw, 21px); color: var(--fg); }
.tags { font-size: 13px; color: var(--accent); }
.sublabel {
  margin: 64px 0 24px;
  font-size: 14px; font-weight: 400; color: var(--muted);
}
.sublabel::before { content: "// "; color: var(--accent); }

.contact-text, .intro { font-size: clamp(18px, 1.8vw, 24px); font-weight: 400; letter-spacing: -.02em; }
.intro { margin-bottom: 36px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  margin-top: 48px;
}

.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 13px; color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--fg);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { font-size: 12px; color: var(--muted); max-width: 46em; }
.btn {
  align-self: flex-start;
  font: inherit; font-size: 15px; font-weight: 500;
  color: var(--bg); background: var(--fg);
  border: 0; border-radius: 6px;
  padding: 12px 22px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn .accent { color: #9fe05a; }
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: default; }
.form-status { font-size: 14px; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #b3261e; }

.company { font-style: normal; font-size: 15px; line-height: 1.8; }
.company p + p { margin-top: 12px; }
.company__name { font-weight: 500; }
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-block: 36px;
  font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Mobile */
@media (max-width: 760px) {
  .header { padding-block: 24px; flex-wrap: wrap; }
  .logo { font-size: 14px; }
  .nav { gap: 16px; font-size: 13px; }
  .nav a span { display: none; }
  .langs { order: 3; width: 100%; margin-left: -6px; }
  .nav { margin-left: 0; }
  .contact-text br { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; padding-block: 60px 80px; }
  #life {
    -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.5) 35%, transparent 60%);
            mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.5) 35%, transparent 60%);
  }
  .section { grid-template-columns: 1fr; gap: 28px; padding-block: 72px; }
  .rows li { grid-template-columns: 44px 1fr; gap: 4px 12px; }
  .meta { grid-column: 2; }
  .projects li { grid-template-columns: 44px 1fr; }
}

@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* ---------- Case study pages (realizacje/*.html) ---------- */
.cs-hero { padding-block: 72px 56px; }
.cs-hero .prompt { margin-bottom: 28px; }
.cs-hero h1 {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 400; letter-spacing: -.04em; line-height: 1.05;
}
.cs-hero .lead { max-width: 44em; margin-top: 28px; font-size: 18px; color: var(--muted); }
.cs-hero .lead strong { color: var(--fg); font-weight: 400; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0; margin-top: 48px;
  border-top: 1px solid var(--line);
}
.facts div { padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.facts dd { font-size: 15px; }
.facts a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.facts a:hover { border-color: var(--accent); }

.cs-body p { font-size: 16px; line-height: 1.75; max-width: 46em; }
.cs-body p + p { margin-top: 16px; }
.cs-body h3 {
  font-size: 15px; font-weight: 500;
  margin: 40px 0 14px;
}
.cs-body h3:first-child { margin-top: 0; }
.cs-body h3::before { content: "> "; color: var(--accent); }

.list { display: grid; gap: 10px; max-width: 52em; }
.list li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.list li::before { content: "–"; position: absolute; left: 0; color: var(--dim); }
.list li strong { color: var(--fg); font-weight: 400; }
.list.cols { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }

.challenges { display: grid; gap: 0; border-top: 1px solid var(--line); }
.challenges li { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.challenges h4 { font-size: 16px; font-weight: 500; }
.challenges p { font-size: 15px; color: var(--muted); line-height: 1.7; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.stats div { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.stats b { display: block; font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; }
.stats span { font-size: 13px; color: var(--muted); }

.cs-nav {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-block: 48px; border-top: 1px solid var(--line);
  font-size: 15px;
}
.cs-nav a { color: var(--muted); transition: color .2s; }
.cs-nav a:hover { color: var(--accent); }

.cs-cta { font-size: clamp(18px, 1.8vw, 24px); }
.cs-cta a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.cs-cta a:hover { border-color: var(--accent); }

/* project list on the home page */
.more { font-size: 14px; color: var(--accent); align-self: flex-start; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  .cs-hero { padding-block: 40px 32px; }
  .list.cols { grid-template-columns: 1fr; }
  .challenges li { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- "also available in your language" bar ---------- */
.lang-offer {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px;
  padding: 10px var(--pad);
  background: var(--fg); color: var(--bg);
  font-size: 13px;
}
.lang-offer a { color: #9fe05a; border-bottom: 1px solid currentColor; }
.lang-offer button {
  font: inherit; font-size: 18px; line-height: 1; color: var(--bg);
  background: none; border: 0; cursor: pointer; padding: 0 4px; opacity: .7;
}
.lang-offer button:hover { opacity: 1; }
