/* ============================================================
   Przemysław Konstanty — Portfolio
   Faithful rebuild of the Framer template look:
   Satoshi, white/black/gray, pill buttons, gray project cards.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --gray: #ababab;        /* two-tone display gray */
  --gray-2: #7a7a7a;      /* secondary body text */
  --card: #f4f4f4;        /* project card background */
  --card-deep: #ededed;
  --line: #ececec;
  --line-dark: #262626;

  --sans: "Satoshi", -apple-system, "Inter", "Segoe UI", sans-serif;

  --w: 1216px;
  --r-card: 20px;
  --r-pill: 64px;

  --shadow-win: 0 18px 50px -12px rgba(10, 10, 10, 0.18), 0 4px 14px rgba(10, 10, 10, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
}
::selection {
  background: #0a0a0a;
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* gray half of two-tone display text */
.g {
  color: var(--gray);
}

/* small section label, e.g. "Designing Success" */
.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-2);
  letter-spacing: 0.01em;
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  transition: transform 0.3s var(--ease), opacity 0.3s;
  white-space: nowrap;
}
.pill:hover {
  transform: scale(1.045);
}
.pill .arr {
  font-size: 12px;
  transition: transform 0.3s var(--ease);
}
.pill:hover .arr {
  transform: translate(2px, -2px);
}
.pill--light {
  background: #fff;
  color: var(--ink);
}
.pill--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pill--ghost:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}
.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 34px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--gray-2);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(150px, 21vh, 220px) 0 clamp(80px, 10vh, 130px);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-2);
}
.hero h1 {
  margin-top: 28px;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 24ch;
  text-wrap: balance;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  margin-top: 40px;
}

/* ---------- Work grid ---------- */
.work {
  padding: clamp(40px, 7vh, 90px) 0 clamp(90px, 12vh, 150px);
}
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3.5vw, 48px) clamp(24px, 2.6vw, 36px);
  list-style: none;
}
.pcard {
  grid-column: span 1;
}
.pcard--full {
  grid-column: 1 / -1;
}
.pcard a {
  display: block;
}
.thumb {
  background: var(--card);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 3vw, 44px);
  transition: background 0.4s;
}
.pcard--full .thumb {
  padding: clamp(28px, 4vw, 64px) clamp(28px, 5vw, 96px);
}
.thumb img {
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease);
}
.pcard a:hover .thumb {
  background: var(--card-deep);
}
.pcard a:hover .thumb img {
  transform: scale(1.018) translateY(-2px);
}
.pcard .meta {
  padding: 18px 4px 0;
}
.pcard .meta .label {
  display: block;
}
.pcard .meta h3 {
  margin-top: 3px;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.pcard .meta h3 .arr {
  font-size: 13px;
  color: var(--gray);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.pcard a:hover .meta h3 .arr {
  opacity: 1;
  transform: none;
}
.pcard .meta .impact {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--gray-2);
}
.pcard .meta .impact b {
  color: var(--ink);
  font-weight: 500;
}

/* macOS-style window for flat screenshots */
.win {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-win);
  width: 100%;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  background: #fbfbfb;
  border-bottom: 1px solid #efefef;
}
.win-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2e2e2;
}

/* ---------- Split sections (label left / big text right) ---------- */
.split {
  padding: clamp(90px, 13vh, 160px) 0;
}
.split + .split {
  padding-top: 0;
}
.split-inner {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2.6fr) auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.big {
  font-size: clamp(24px, 2.9vw, 40px);
  line-height: 1.38;
  font-weight: 500;
  letter-spacing: -0.004em;
  max-width: 26ch;
  text-wrap: pretty;
}
.split .pill {
  margin-top: 8px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
}
.facts span {
  font-size: 13.5px;
  color: var(--gray-2);
}
.facts b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Dark contact / footer ---------- */
.dark {
  background: var(--ink);
  color: #fff;
  border-radius: 0;
}
.contact-cta {
  padding: clamp(110px, 16vh, 190px) 0 clamp(80px, 11vh, 130px);
}
.contact-cta .label {
  color: #8a8a8a;
}
.contact-cta h2 {
  margin-top: 22px;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 18ch;
}
.contact-cta h2 .g {
  color: #6f6f6f;
}
.contact-cta .pill {
  margin-top: 38px;
}
.foot {
  border-top: 1px solid var(--line-dark);
  padding: 34px 0 44px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  list-style: none;
}
.foot-nav a {
  font-size: 13px;
  color: #8a8a8a;
  transition: color 0.2s;
}
.foot-nav a:hover {
  color: #fff;
}
.foot .copy {
  font-size: 13px;
  color: #6f6f6f;
}

/* ============================================================
   Case study pages
   ============================================================ */
.c-hero {
  padding: clamp(140px, 19vh, 200px) 0 clamp(46px, 7vh, 70px);
}
.c-hero .label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12.5px;
}
.c-hero h1 {
  margin-top: 24px;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 20ch;
  text-wrap: balance;
}
.c-hero .lede {
  margin-top: 24px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--gray-2);
  max-width: 60ch;
}
.c-hero .lede a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 3vw, 40px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  margin: clamp(40px, 6vw, 60px) 0;
}
.meta-row h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 7px;
}
.meta-row p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.meta-row p b {
  font-weight: 700;
}

.c-body {
  padding-bottom: clamp(90px, 13vh, 150px);
}

/* figures: gray card like work thumbs */
.fig {
  margin: clamp(40px, 6vw, 64px) 0;
}
.fig .thumb {
  padding: clamp(24px, 3.4vw, 56px) clamp(24px, 4vw, 72px);
}
.fig figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-2);
  line-height: 1.55;
  max-width: 70ch;
}

.prose-col {
  max-width: 780px;
}
.prose-col h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.004em;
  line-height: 1.25;
  margin: clamp(56px, 8vw, 88px) 0 18px;
}
.prose-col h2:first-child {
  margin-top: 0;
}
.prose-col h2 .g {
  color: var(--gray);
}
.prose-col p {
  color: var(--gray-2);
  font-size: 16.5px;
  margin: 0 0 16px;
}
.prose-col p strong,
.prose-col li strong {
  color: var(--ink);
  font-weight: 500;
}
.prose-col ul {
  list-style: none;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.prose-col ul li {
  position: relative;
  padding-left: 24px;
  color: var(--gray-2);
  font-size: 16.5px;
}
.prose-col ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 10px;
  height: 2px;
  background: var(--ink);
}

/* stat trio — gray cards, black numbers */
.stats3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: clamp(40px, 6vw, 56px) 0;
}
.stats3 .cell {
  background: var(--card);
  border-radius: 16px;
  padding: 28px 26px 24px;
}
.stats3 b {
  display: block;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stats3 span {
  display: block;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--gray-2);
  line-height: 1.5;
}

/* big two-tone pull statement */
.statement {
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.42;
  font-weight: 500;
  max-width: 30ch;
  margin: clamp(44px, 6vw, 64px) 0;
  text-wrap: pretty;
}

/* next case — dark band */
.next-case {
  background: var(--ink);
  color: #fff;
  padding: clamp(70px, 10vh, 110px) 0;
}
.next-case .label {
  color: #8a8a8a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12.5px;
}
.next-case a.title {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.next-case a.title .arr {
  transition: transform 0.3s var(--ease);
  color: #8a8a8a;
}
.next-case a.title:hover .arr {
  transform: translateX(8px);
  color: #fff;
}

/* ---------- Reveal (hidden only when JS runs) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .thumb img,
  .pill {
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px clamp(20px, 4vw, 48px) 18px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 13px 4px;
    font-size: 17px;
    color: var(--ink);
  }
  .nav-burger {
    display: inline-flex;
  }
  .nav-cta {
    display: none;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .pcard {
    grid-column: 1 / -1;
  }
  .split-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .stats3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .hero .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .meta-row {
    grid-template-columns: 1fr;
  }
}
