/* =========================================================
   Flow Forge — portfolio archive page
   ========================================================= */
:root {
  --bg: #ffffff;
  --ink: #131313;
  --muted: #797979;
  --line: #e6e6e6;
  --accent: #98fe00;
  --font: 'Geist','Geist Placeholder',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --mono: 'Roboto Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

@font-face {
  font-family: "OldEnglishCustom";
  src: url("../assets/fonts/oldenglishtextmt.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KJV1611";
  src: url("../assets/fonts/KJV1611.otf") format("opentype");
  font-weight: 100 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: auto;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
}
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, svg, canvas { display: block; }
.portfolio-page,
.portfolio-page * {
  scroll-snap-type: none !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}

.portfolio-page {
  background: #fff;
  color: var(--ink);
}

.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5.2vw, 72px);
  color: #fff;
  mix-blend-mode: normal;
  pointer-events: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.34s cubic-bezier(.16,1,.3,1), opacity 0.22s ease;
  will-change: transform, opacity;
}

.portfolio-header.is-hidden {
  transform: translateY(-112%);
  opacity: 0;
}

.portfolio-logo,
.portfolio-nav,
.portfolio-burger {
  pointer-events: auto;
}

.portfolio-logo {
  font-family: "OldEnglishCustom", Georgia, serif;
  font-size: clamp(24px, 2vw, 31px);
  line-height: 1;
  letter-spacing: -0.08em;
  color: #fff;
}

.portfolio-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.portfolio-nav a:not(.portfolio-nav__arrow) {
  position: relative;
  opacity: 0.9;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.portfolio-nav a:not(.portfolio-nav__arrow):hover,
.portfolio-nav a.is-active {
  opacity: 1;
}

.portfolio-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(152, 254, 0, 0.65);
}

.portfolio-nav__arrow {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(152, 254, 0, 0.62);
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.portfolio-nav__arrow::before {
  content: "";
  width: 13px;
  height: 13px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.portfolio-nav__arrow:hover {
  transform: translateY(-2px);
  background: rgba(152, 254, 0, 0.08);
}

.portfolio-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.portfolio-burger span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.portfolio-burger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.portfolio-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.portfolio-burger.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* HERO */
.pf-hero {
  position: relative;
  min-height: clamp(360px, 38vw, 520px);
  padding: 116px clamp(22px, 5.2vw, 72px) 70px;
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.pf-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  z-index: 4;
}

.pf-hero__waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.86;
}

.pf-hero__orb {
  position: absolute;
  z-index: 2;
  left: 62%;
  top: 42%;
  width: clamp(150px, 18vw, 260px);
  height: clamp(150px, 18vw, 260px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(152, 254, 0, 0.38) 0%, rgba(152, 254, 0, 0.18) 22%, rgba(152, 254, 0, 0.055) 46%, rgba(152, 254, 0, 0) 70%);
  filter: blur(16px);
  opacity: 0.82;
  transform: translate3d(-50%, -50%, 0);
  animation: pfOrbDrift 15s cubic-bezier(.42,0,.58,1) infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes pfOrbDrift {
  0%   { left: 58%; top: 38%; transform: translate3d(-50%, -50%, 0) scale(0.8); opacity: .68; }
  18%  { left: 78%; top: 29%; transform: translate3d(-50%, -50%, 0) scale(1.08); opacity: .84; }
  38%  { left: 88%; top: 58%; transform: translate3d(-50%, -50%, 0) scale(0.92); opacity: .7; }
  58%  { left: 54%; top: 66%; transform: translate3d(-50%, -50%, 0) scale(1.18); opacity: .9; }
  78%  { left: 30%; top: 48%; transform: translate3d(-50%, -50%, 0) scale(0.86); opacity: .64; }
  100% { left: 58%; top: 38%; transform: translate3d(-50%, -50%, 0) scale(0.8); opacity: .68; }
}

.pf-hero__inner {
  position: relative;
  z-index: 5;
  max-width: 660px;
}

.pf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e8e8e8;
}

.pf-eyebrow--dark {
  color: #fff;
}

.pf-eyebrow::before,
.pf-eyebrow::after {
  color: var(--accent);
}

.pf-hero h1,
.pf-case h2 {
  font-family: "KJV1611", "OldEnglishCustom", Georgia, serif;
  font-weight: 100;
  letter-spacing: 0.04em;
}

.pf-hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(56px, 8.6vw, 118px);
  line-height: 0.92;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.pf-hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.42;
  letter-spacing: -0.02em;
}

/* MAIN */
.pf-shell {
  width: min(100% - clamp(32px, 7vw, 104px), 1320px);
  margin: 0 auto;
}

.pf-archive {
  position: relative;
  padding: clamp(42px, 5.6vw, 78px) 0 clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 82% 47%, rgba(19, 19, 19, 0.035), transparent 32%),
    #fff;
  overflow: hidden;
}

.pf-archive::after {
  content: "Forge";
  position: absolute;
  right: -7vw;
  bottom: 13vw;
  z-index: 0;
  font-family: "OldEnglishCustom", Georgia, serif;
  font-size: clamp(180px, 29vw, 430px);
  line-height: 0.75;
  letter-spacing: -0.1em;
  color: rgba(19, 19, 19, 0.035);
  pointer-events: none;
  user-select: none;
}

.pf-archive > .pf-shell {
  position: relative;
  z-index: 1;
}

.pf-archive__top {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(420px, 1fr);
  align-items: end;
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: 30px;
}

.pf-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #6f6f6f;
  text-transform: uppercase;
}

.pf-section-kicker::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent);
}

.pf-archive h2 {
  margin: 0;
  font-size: clamp(31px, 3.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.pf-filter {
  --dot-x: 27px;
  --dot-y: 24px;
  position: relative;
  justify-self: end;
  display: grid;
  grid-template-columns: .72fr .86fr 1.12fr 1.38fr 1.42fr .66fr;
  align-items: center;
  gap: 2px;
  width: min(100%, 860px);
  overflow: visible;
  padding: 5px;
  border: 1px solid rgba(19, 19, 19, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
}

.pf-filter__dot {
  position: absolute;
  left: var(--dot-x);
  top: var(--dot-y);
  z-index: 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(152, 254, 0, 0.58);
  transform: translate(-50%, -50%);
  transition: left 0.34s cubic-bezier(.16,1,.3,1), top 0.34s cubic-bezier(.16,1,.3,1), opacity 0.22s ease;
  pointer-events: none;
}

.pf-filter button {
  position: relative;
  height: 38px;
  min-width: 0;
  padding: 0 12px 0 31px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3b3b3b;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
  white-space: nowrap;
}

.pf-filter button.is-active {
  background: #fff;
  color: #111;
  box-shadow: inset 0 0 0 1px rgba(19, 19, 19, 0.08), 0 8px 20px rgba(0, 0, 0, 0.035);
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.pf-card {
  min-height: 1px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(19, 19, 19, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.035);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
}

.pf-card.is-hidden {
  display: none;
}

.pf-card:hover {
  transform: translateY(-5px);
  border-color: rgba(19, 19, 19, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.07);
}

.pf-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 18px;
}

.pf-card__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pf-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.pf-card__title-row span {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #858585;
  text-transform: uppercase;
}

.pf-card p {
  margin: 0;
  color: #4c4c4c;
  font-size: 13px;
  line-height: 1.55;
}

/* THUMBNAILS */
.pf-thumb {
  position: relative;
  height: 164px;
  margin: 10px 10px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #060606;
  border: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.pf-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 70% 44%, rgba(152, 254, 0, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 32%),
    #060606;
}

.pf-thumb__bar {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 4px;
}

.pf-thumb__bar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
}

.pf-thumb__label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pf-thumb strong {
  position: absolute;
  z-index: 3;
  left: 20px;
  top: 56px;
  max-width: 160px;
  color: #fff;
  font-size: 17px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.pf-thumb i {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: 24px;
  display: inline-flex;
  height: 25px;
  align-items: center;
  padding: 0 14px;
  border-radius: 5px;
  background: var(--accent);
  color: #101010;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
}

.pf-thumb__car {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 20px;
  width: 132px;
  height: 58px;
  border-radius: 58% 42% 20% 18% / 72% 68% 28% 24%;
  background:
    radial-gradient(circle at 26% 84%, #0a0a0a 0 11px, #d9d9d9 12px 16px, transparent 17px),
    radial-gradient(circle at 75% 84%, #0a0a0a 0 10px, #d9d9d9 11px 15px, transparent 16px),
    linear-gradient(135deg, #f2f2f2, #676767 72%, #1b1b1b);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.44);
}

.pf-thumb--shop::before {
  background: linear-gradient(135deg, #e8e3d9, #cbbf9c 42%, #141414 42%, #0b0b0b);
}

.pf-thumb__chair {
  position: absolute;
  z-index: 2;
  right: 34px;
  bottom: 18px;
  width: 96px;
  height: 86px;
  background:
    linear-gradient(90deg, transparent 0 38%, #212121 38% 42%, transparent 42% 60%, #212121 60% 64%, transparent 64%),
    radial-gradient(circle at 50% 30%, #c7a66d 0 34px, transparent 35px),
    linear-gradient(#a37f48, #c7a66d);
  border-radius: 22px 22px 12px 12px;
  transform: rotate(-2deg);
}

.pf-thumb--analytics::before,
.pf-thumb--support::before,
.pf-thumb--reports::before,
.pf-thumb--crm::before,
.pf-thumb--dashboard::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(30, 133, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 68%, rgba(152, 254, 0, 0.16), transparent 26%),
    linear-gradient(135deg, #0b0d10, #020202);
}

.pf-chart,
.pf-chart--small {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  top: 60px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 16px);
}

.pf-chart i {
  position: absolute;
  bottom: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(152, 254, 0, 0.35);
}

.pf-chart i:nth-child(1){ left: 10%; bottom: 16px; }
.pf-chart i:nth-child(2){ left: 28%; bottom: 38px; }
.pf-chart i:nth-child(3){ left: 48%; bottom: 22px; }
.pf-chart i:nth-child(4){ left: 68%; bottom: 45px; }
.pf-chart i:nth-child(5){ left: 84%; bottom: 30px; }

.pf-lines {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 18px;
  display: grid;
  gap: 7px;
  width: 84px;
}

.pf-lines span,
.pf-chat span,
.pf-bot-ui span,
.pf-order span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.pf-lines span:nth-child(2),
.pf-chat span:nth-child(2),
.pf-bot-ui span:nth-child(2){ width: 72%; }
.pf-lines span:nth-child(3),
.pf-chat span:nth-child(3),
.pf-bot-ui span:nth-child(3){ width: 86%; }

.pf-chat {
  position: absolute;
  z-index: 2;
  left: 22px;
  top: 50px;
  width: 55%;
  display: grid;
  gap: 10px;
}

.pf-chat span {
  height: 12px;
  background: rgba(255,255,255,.12);
}

.pf-gauges {
  position: absolute;
  z-index: 2;
  right: 22px;
  top: 46px;
  display: grid;
  gap: 16px;
}

.pf-gauges i {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid rgba(152, 254, 0, 0.32);
  border-right-color: var(--accent);
  transform: rotate(28deg);
}

.pf-bot-ui {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  top: 54px;
  display: grid;
  gap: 12px;
}

.pf-bot-ui span {
  height: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
}

.pf-product {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 28px;
  width: 78px;
  height: 42px;
  border-radius: 48% 52% 43% 37%;
  background: linear-gradient(135deg, #e7e7e7, #737373 48%, var(--accent) 49% 62%, #151515 63%);
  transform: rotate(-7deg);
}

.pf-order {
  position: absolute;
  z-index: 2;
  right: 22px;
  top: 46px;
  width: 108px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.pf-order i {
  height: 22px;
  border-radius: 5px;
  background: var(--accent);
}

.pf-flow-mini,
.pf-sync {
  position: absolute;
  z-index: 2;
  inset: 45px 20px 22px;
}

.pf-flow-mini span {
  position: absolute;
  width: 54px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.pf-flow-mini span::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 1px;
  top: 50%;
  right: -30px;
  background: var(--accent);
}
.pf-flow-mini span:nth-child(1){ left: 0; top: 8px; }
.pf-flow-mini span:nth-child(2){ left: 78px; top: 8px; }
.pf-flow-mini span:nth-child(3){ left: 156px; top: 8px; }
.pf-flow-mini span:nth-child(4){ right: 0; bottom: 8px; }
.pf-flow-mini span:nth-child(3)::after{ transform: rotate(38deg); right: -43px; width: 52px; top: 44px; }
.pf-flow-mini span:nth-child(4)::after{ display: none; }

.pf-sync span {
  position: absolute;
  width: 100px;
  height: 62px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}
.pf-sync span:nth-child(1){ left: 0; top: 16px; }
.pf-sync span:nth-child(2){ right: 0; top: 16px; }
.pf-sync i {
  position: absolute;
  left: 50%; top: 50%;
  width: 74px; height: 2px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(152,254,0,.5);
}

.pf-thumb--corporate::before {
  background:
    linear-gradient(120deg, rgba(0,0,0,.1), rgba(0,0,0,.78)),
    linear-gradient(135deg, #081018, #2d3338 45%, #090909);
}
.pf-building {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: -18px;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #f1f1f1 0 36%, #8d6f5f 37% 45%, #303030 46% 100%);
  clip-path: polygon(20% 0, 100% 30%, 72% 100%, 0 76%);
  opacity: .78;
}
.pf-bars {
  position: absolute;
  z-index: 2;
  left: 26px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 62px;
}
.pf-bars span {
  width: 11px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(var(--accent), rgba(152,254,0,.34));
}
.pf-bars span:nth-child(1){ height: 25px; }
.pf-bars span:nth-child(2){ height: 48px; }
.pf-bars span:nth-child(3){ height: 34px; }
.pf-bars span:nth-child(4){ height: 58px; }
.pf-bars span:nth-child(5){ height: 40px; }
.pf-chart--small { left: 108px; right: 22px; top: 60px; height: 66px; }

/* METRICS */
.pf-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  color: #1f1f1f;
}

.pf-metrics span {
  display: block;
  min-width: 0;
  padding-left: 11px;
  border-left: 2px solid rgba(114, 214, 0, 0.58);
  color: #565656;
  font-size: 10.5px;
  line-height: 1.25;
}

.pf-metrics span:only-child {
  max-width: 210px;
}

.metric-number {
  display: block;
  margin: 0 0 4px;
  color: #72d600;
  font-size: clamp(20px, 1.45vw, 25px);
  line-height: 0.96;
  letter-spacing: 0.01em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* CASE */
.pf-case {
  background: #fff;
  padding: 0 0 clamp(40px, 6vw, 90px);
}

.pf-case__panel {
  display: block;
  padding: clamp(18px, 2.8vw, 38px) clamp(26px, 3.7vw, 52px) clamp(26px, 3.7vw, 52px);
  border: 1px solid rgba(19, 19, 19, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(152, 254, 0, 0.05), transparent 30%),
    linear-gradient(180deg, #fff, #fdfdfd);
}

.pf-case__text {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(330px, 430px);
  column-gap: clamp(34px, 5.2vw, 86px);
  row-gap: 18px;
  align-items: start;
  margin-bottom: clamp(42px, 4.6vw, 64px);
}

.pf-case__text .pf-section-kicker {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-bottom: 0;
  transform: translateY(-10px);
}

.pf-case__text h2 {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  max-width: 660px;
  font-size: clamp(36px, 3.2vw, 58px);
  line-height: 1.02;
}

.pf-case__text p {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 2px 0 0;
  max-width: 430px;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.pf-flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 86px minmax(210px, 1fr) 86px minmax(210px, 1fr);
  grid-template-rows: auto 84px auto auto;
  gap: 22px 18px;
  align-items: center;
  min-height: 0;
  padding-top: 4px;
}

.pf-flow__item {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 112px;
  padding: 16px 16px 15px;
  border: 1px solid rgba(19, 19, 19, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.025);
}

.pf-flow__item b {
  display: block;
  margin-bottom: 8px;
  color: #151515;
  font-size: 14px;
  line-height: 1.2;
}

.pf-flow__item p {
  margin: 0;
  color: #595959;
  font-size: 11px;
  line-height: 1.42;
}

.pf-flow__num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  color: #72d600;
  font-size: 12px;
  font-weight: 700;
}

.pf-flow__item--user { grid-column: 1; grid-row: 1; }
.pf-flow__item--kb { grid-column: 3; grid-row: 1; }
.pf-flow__item--answer { grid-column: 5; grid-row: 1; }
.pf-flow__item--manager { grid-column: 3; grid-row: 3; }
.pf-flow__item--sheets { grid-column: 5; grid-row: 3; }
.pf-flow__item--ai {
  grid-column: 1 / span 3;
  grid-row: 4;
  align-self: start;
  min-height: 86px;
  padding-left: 54px;
  margin-top: 4px;
}
.pf-flow__item--ai::before {
  content: "✦";
  position: absolute;
  left: 20px;
  top: 24px;
  color: var(--accent);
  font-size: 24px;
}

.pf-flow__line {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  min-height: 30px;
  pointer-events: none;
}

.pf-flow__line--a { grid-column: 2; grid-row: 1; }
.pf-flow__line--b { grid-column: 4; grid-row: 1; }
.pf-flow__line--c { grid-column: 3; grid-row: 2; height: 100%; justify-self: center; }
.pf-flow__line--d { grid-column: 4; grid-row: 3; }
.pf-flow__line--e { display: none; }

.pf-flow__line--a::before,
.pf-flow__line--b::before,
.pf-flow__line--d::before {
  content: "";
  position: absolute;
  left: 0;
  right: 14px;
  top: 50%;
  height: 0;
  border-top: 2px solid #222;
  transform: translateY(-50%);
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}

.pf-flow__line--b::before,
.pf-flow__line--d::before {
  border-top-style: dashed;
}

.pf-flow__line--a::after,
.pf-flow__line--b::after,
.pf-flow__line--d::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #222;
  opacity: 0;
  transform: translate(-5px, -50%);
}

.pf-flow__line--c::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 14px;
  left: 50%;
  width: 0;
  border-left: 2px dashed #222;
  transform: translateX(-50%);
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

.pf-flow__line--c::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #222;
  opacity: 0;
  transform: translate(-50%, -5px);
}

.pf-case__panel.in-view .pf-flow__line--a::before,
.pf-case__panel.in-view .pf-flow__line--b::before,
.pf-case__panel.in-view .pf-flow__line--d::before {
  animation: pfFlowDrawX 1.08s cubic-bezier(.22,.61,.36,1) forwards;
}

.pf-case__panel.in-view .pf-flow__line--c::before {
  animation: pfFlowDrawY 1.08s cubic-bezier(.22,.61,.36,1) forwards;
}

.pf-case__panel.in-view .pf-flow__line--a::after,
.pf-case__panel.in-view .pf-flow__line--b::after,
.pf-case__panel.in-view .pf-flow__line--d::after {
  animation: pfFlowArrow 0.38s cubic-bezier(.22,.61,.36,1) forwards;
}
.pf-case__panel.in-view .pf-flow__line--c::after {
  animation: pfFlowArrowDown 0.38s cubic-bezier(.22,.61,.36,1) forwards;
}
.pf-case__panel.in-view .pf-flow__line--a::before { animation-delay: .10s; }
.pf-case__panel.in-view .pf-flow__line--a::after { animation-delay: 1.03s; }
.pf-case__panel.in-view .pf-flow__line--b::before { animation-delay: .34s; }
.pf-case__panel.in-view .pf-flow__line--b::after { animation-delay: 1.27s; }
.pf-case__panel.in-view .pf-flow__line--c::before { animation-delay: .58s; }
.pf-case__panel.in-view .pf-flow__line--c::after { animation-delay: 1.50s; }
.pf-case__panel.in-view .pf-flow__line--d::before { animation-delay: .88s; }
.pf-case__panel.in-view .pf-flow__line--d::after { animation-delay: 1.80s; }

.pf-flow__note {
  position: relative;
  z-index: 3;
  justify-self: center;
  align-self: start;
  padding: 0;
  background: transparent !important;
  font-size: 11px;
  line-height: 1.15;
  color: #72d600;
  font-weight: 600;
  white-space: nowrap;
}
.pf-flow__note--simple {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  margin-top: 0;
  transform: translateY(22px);
}
.pf-flow__note--hard {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  margin: 0;
  transform: translate(-78px, 5px);
  color: #555;
}

@keyframes pfFlowDrawX { to { clip-path: inset(0 0 0 0); } }
@keyframes pfFlowDrawY { to { clip-path: inset(0 0 0 0); } }
@keyframes pfFlowArrow { to { opacity: 1; transform: translate(0, -50%); } }
@keyframes pfFlowArrowDown { to { opacity: 1; transform: translate(-50%, 0); } }

/* ANIMATIONS */
.pf-card,
.pf-case__panel {
  opacity: 0;
  transform: translateY(18px);
}
.pf-card.in-view,
.pf-case__panel.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1), box-shadow 0.28s ease, border-color 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
  .pf-hero__orb { animation: none; }
  .pf-card,
  .pf-case__panel {
    opacity: 1;
    transform: none;
  }
}

/* RESPONSIVE */
@media (max-width: 1240px) {
  .pf-case__text { grid-template-columns: minmax(320px, .9fr) minmax(300px, 420px); align-items: start; margin-bottom: 46px; column-gap: 44px; }
  .pf-case__text p { max-width: 420px; }
  .pf-flow { grid-template-columns: minmax(160px,1fr) 64px minmax(175px,1fr) 64px minmax(175px,1fr); gap: 18px 12px; }
  .pf-flow__note--hard { transform: translate(-68px, 5px); }
}

@media (max-width: 1180px) {
  .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-archive__top { grid-template-columns: 1fr; align-items: start; }
  .pf-filter { justify-self: stretch; width: 100%; overflow-x: auto; grid-template-columns: .72fr .86fr 1.12fr 1.38fr 1.42fr .66fr; }
}

@media (max-width: 900px) {
  .portfolio-header { height: 68px; padding: 0 20px; }
  .portfolio-burger { display: flex; }
  .portfolio-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 68px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 18px clamp(22px, 6vw, 28px) 26px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .portfolio-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .portfolio-nav a:not(.portfolio-nav__arrow) {
    width: 100%;
    padding: 13px 0;
    font-size: 20px;
    font-weight: 700;
    opacity: 1;
  }
  .portfolio-nav__arrow { display: none; }
  .portfolio-nav a.is-active::after { display: none; }

  .pf-hero { padding-top: 108px; min-height: 430px; }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-case__text { grid-template-columns: 1fr; margin-bottom: 30px; row-gap: 18px; }
  .pf-case__text .pf-section-kicker, .pf-case__text h2, .pf-case__text p { grid-column: 1; grid-row: auto; }
  .pf-case__text p { max-width: 520px; margin-top: 0; }
  .pf-flow {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
    min-height: 0;
    padding-top: 0;
  }
  .pf-flow__item,
  .pf-flow__item--user,
  .pf-flow__item--kb,
  .pf-flow__item--answer,
  .pf-flow__item--manager,
  .pf-flow__item--sheets,
  .pf-flow__item--ai {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    margin-top: 0;
  }
  .pf-flow__line,
  .pf-flow__note { display: none; }
}

@media (max-width: 640px) {
  .pf-shell { width: min(100% - 28px, 1320px); }
  .pf-hero {
    min-height: 410px;
    padding: 104px 18px 58px;
  }
  .pf-hero h1 { font-size: clamp(54px, 18vw, 84px); }
  .pf-hero p br { display: none; }
  .pf-archive { padding-top: 34px; }
  .pf-archive h2 { font-size: 34px; }
  .pf-grid { grid-template-columns: 1fr; gap: 18px; }
  .pf-thumb { height: 178px; }
  .pf-card__body { padding: 16px; }
  .pf-filter { grid-template-columns: repeat(6, max-content); padding: 5px; }
  .pf-filter button { padding-left: 30px; padding-right: 14px; }
  .pf-case__panel { padding: 18px 18px 22px; }
  .pf-case__text .pf-section-kicker { transform: none; margin-top: 16px; }
  .pf-case__text h2 {
    font-size: clamp(20px, 6vw, 36px);
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .pf-case__text p { font-size: 13.5px; }
}

/* =========================================================
   Cookie Consent
   ========================================================= */
.cookie {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--ink);
  border-top: 1px solid #2a2a2a;
  transform: translateY(100%);
  transition: transform .5s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
.cookie.is-visible { transform: translateY(0); }
.cookie__inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(20px,4vw,56px);
  justify-content: space-between;
  max-width: 1480px; margin: 0 auto;
}
.cookie__body {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}
.cookie__icon {
  flex: none; color: var(--accent);
  display: flex; align-items: center;
}
.cookie__text {
  font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,.55);
}
.cookie__btn {
  flex: none;
  font-family: var(--font);
  font-size: 13px; font-weight: 500;
  padding: 10px 22px; height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #233802;
  border: none; cursor: pointer;
  white-space: nowrap; line-height: 1;
  transition: transform .2s ease, opacity .2s ease;
}
.cookie__btn:hover { transform: translateY(-1px); }
@media (max-width: 600px) {
  .cookie__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cookie__btn { align-self: stretch; height: 42px; text-align: center; }
}
