.portfolio-view {
  --pf-ink: #202a24;
  --pf-muted: #536158;
  --pf-line: #d3dad1;
  --pf-paper: #f3f4ee;
  --pf-green: #253f2e;
  --pf-lime: #def59e;
  color: var(--pf-ink);
  background: var(--pf-paper);
}

.top-nav { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2rem); }
.top-nav .profile-link { border: 1px solid #66667d; padding: .45rem .8rem; border-radius: .45rem; white-space: nowrap; }
.portfolio-view .top { background: var(--pf-paper); color: var(--pf-ink); border-bottom: 1px solid var(--pf-line); }
.portfolio-view .top-link { color: var(--pf-ink); }
.portfolio-view .top-link.profile-link { border-color: #9daf9b; }
.portfolio-view .brand-icon { background: var(--pf-green); color: var(--pf-lime); border-radius: .5rem; }
.portfolio-view .brand-period { color: #608245; }
.portfolio-view .footer { color: var(--pf-muted); border-color: var(--pf-line); }
.portfolio-view :focus-visible { outline-color: #54794e; }

.pf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: fit-content;
  padding: .66rem 1.15rem;
  border-radius: .45rem;
  background: var(--pf-green);
  color: #fff;
  font-weight: 700;
}
.pf-button:hover { background: #365b42; }

.pf-hero { border-bottom: 1px solid var(--pf-line); }
.pf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.8rem, 5vw, 5rem);
  padding-block: clamp(2.8rem, 6vw, 5.5rem);
}
.pf-intro h1, .pf-case h1 {
  font-size: clamp(2.55rem, 5.25vw, 4.78rem);
  line-height: 1.045;
  letter-spacing: -.065em;
  font-weight: 850;
}
.pf-intro h1 span { color: #5d7d46; }
.pf-intro p, .pf-case-top p:not(.pf-case-label) {
  font-size: clamp(1rem, 1.75vw, 1.25rem);
  max-width: 38ch;
  color: var(--pf-muted);
  margin-block: 1.2rem 1.54rem;
}
.pf-feature {
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 1.35;
  border-radius: .9rem;
  box-shadow: 0 16px 38px #253f2e28;
  background: #273c2c;
  color: #fff;
}
.pf-feature::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#101b13 0%,#152419d9 13%,transparent 55%); }
.pf-feature img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 57%; transition: transform .32s; }
.pf-feature:hover img { transform: scale(1.035); }
.pf-feature-copy {
  align-self: end;
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: clamp(1rem, 2.8vw, 1.95rem);
}
.pf-feature-copy > div { display: grid; }
.pf-feature-copy > div span { color: #f0f4e7; font-size: .92rem; font-weight: 650; }
.pf-feature-copy strong { font-size: clamp(2.05rem, 3.8vw, 3.35rem); line-height: 1; margin-top: .3rem; letter-spacing: -.06em; }
.pf-feature-action { color: var(--pf-lime); padding: .44rem .63rem; border: 1px solid #dff39dbc; border-radius: .38rem; font-size: .9rem; font-weight: 700; }

.pf-work { padding-block: clamp(2.4rem, 5vw, 4.25rem) .7rem; scroll-margin-top: 1rem; }
.pf-work-header { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.45rem; }
.pf-work h2, .pf-case-check h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.05; font-weight: 850; letter-spacing: -.055em; }
.pf-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.pf-filters button {
  border: 1px solid var(--pf-line);
  color: var(--pf-ink);
  background: transparent;
  min-height: 41px;
  padding: .4rem .75rem;
  border-radius: .4rem;
  font-weight: 650;
}
.pf-filters button:hover { border-color: #849982; }
.pf-filters button[aria-pressed=true] { background: var(--pf-green); border-color: var(--pf-green); color: white; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2.15vw, 1.5rem); }
.pf-card { display: grid; overflow: hidden; background: #fff; border-radius: .75rem; border: 1px solid var(--pf-line); }
.pf-card[hidden] { display: none; }
.pf-card:hover { border-color: #829880; box-shadow: 0 6px 20px #273e2611; }
.pf-card-link { display: flex; flex-direction: column; height: 100%; }
.pf-card-link:focus-visible { outline-offset: -4px; }
.pf-art { position: relative; overflow: hidden; display: grid; place-items: center; aspect-ratio: 1.78; background: #d9e4d7; }
.pf-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
[data-project=motiv] .pf-art img { object-position: center 65%; }
[data-project=lead] .pf-art { background: #e4e6f3; color: #29284a; }
[data-project=flow] .pf-art { background: #26362e; color: #eaf3e1; }
[data-project=bot] .pf-art { background: #d2e9e0; color: #133e33; }
[data-project=support] .pf-art { background: #e7e7cc; color: #2f4533; }
.pf-window { width: 82%; background: #fffffff2; border: 1px solid #15152515; border-radius: .55rem; box-shadow: 0 8px 18px #15152520; overflow: hidden; font-size: clamp(.61rem, 1.2vw, .82rem); }
.pf-window-label { background: #1d342a; color: #fff; font-weight: 740; padding: .52rem .7rem; }
[data-project=lead] .pf-window-label { background: #363353; }
[data-project=flow] .pf-window { background: #1c2b22; border-color: #69816b; }
.pf-sample-board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .3rem; padding: .55rem; }
.pf-sample-board div { display: grid; align-content: start; gap: .28rem; padding: .36rem; min-height: 70px; background: #eeeef6; border-radius: .28rem; }
.pf-sample-board span { background: white; border-radius: .2rem; padding: .17rem .19rem; }
.pf-sample-flow { display: flex; justify-content: space-between; gap: .33rem; padding: .72rem .6rem .35rem; }
.pf-sample-flow b { flex: 1; border-radius: .25rem; text-align: center; padding: .35rem .12rem; color: #e6f4dc; border: 1px solid #688465; }
.pf-sample-log { padding: .38rem .65rem .62rem; }
.pf-sample-log span { display: inline-block; width: .46rem; height: .46rem; margin-inline-end: .24rem; border-radius: 50%; background: #d3efaf; }
.pf-sample-chat { display: grid; gap: .37rem; padding: .55rem .65rem; }
.pf-sample-chat span, .pf-sample-chat b { padding: .22rem .38rem; border-radius: .29rem; width: fit-content; background: #e3efe8; }
.pf-sample-chat span:first-child { justify-self: end; background: #c8e6d5; }
.pf-sample-chat div { display: flex; flex-wrap: wrap; gap: .3rem; }
.pf-card-copy { display: flex; flex: 1; flex-direction: column; padding: clamp(.9rem, 2vw, 1.3rem); }
.pf-card-copy > span { font-size: .9rem; color: #49604c; font-weight: 720; }
.pf-card-copy h3 { margin: .23rem 0; font-size: clamp(1.45rem, 2.55vw, 2.05rem); line-height: 1.15; letter-spacing: -.04em; }
.pf-card-copy p { color: var(--pf-muted); margin-bottom: 1rem; min-height: 2.9em; }
.pf-card-copy small { align-self: start; margin-top: auto; color: #355139; font-size: .88rem; font-weight: 780; border-bottom: 1px solid #95a88f; }

.pf-case { padding-block: 1.9rem .85rem; }
.pf-back { display: inline-block; margin-bottom: 1.05rem; text-decoration: underline; text-underline-offset: .19rem; font-weight: 660; }
.pf-case-top { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1.25rem, 5vw, 4.5rem); }
.pf-case-label { color: #48694a; font-weight: 800; margin-bottom: .65rem; }
.pf-case-top img { width: 100%; height: auto; border-radius: .85rem; }
.pf-case-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; padding-block: clamp(2rem, 5vw, 3.6rem); }
.pf-case-steps article { padding: 1.2rem; border: 1px solid var(--pf-line); border-radius: .65rem; background: #fff; }
.pf-case-steps h2 { font-size: 1.3rem; }
.pf-case-steps p { margin-top: .45rem; color: var(--pf-muted); }
.pf-case-check { background: #dfe9d9; border-radius: .72rem; padding: clamp(1.25rem, 4vw, 2.5rem); }
.pf-case-check p { margin: .8rem 0 1rem; max-width: 58ch; }

.demo-shell { padding-top: clamp(1.45rem,4vw,3.4rem); }
.demo-head { margin-bottom: clamp(1.15rem,3vw,2rem); }
.lead-demo { --accent: #3f4068; --accent-hover: #303151; }
.lead-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .72rem; margin: 0 0 1.25rem; }
.lead-metrics > div { padding: .75rem 1rem; background: #fff; border: 1px solid #dadbed; border-top: 3px solid #777aaf; border-radius: .66rem; }
.lead-metrics > div:nth-child(3) { border-top-color: #b87d4f; }
.lead-metrics > div:nth-child(4) { border-top-color: #4c846a; }
.lead-metrics dt { color: #50526a; font-size: .92rem; font-weight: 650; }
.lead-metrics dd { margin: .25rem 0 0; color: #282941; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 850; }
.lead-demo .lane { min-height: 275px; background: #e9eaf2; border-color: #dadbed; }
.lead-demo .lead-card { padding: .95rem; }
.lead-demo .stage-button { background: #eeedf8; color: #33365b; min-height: 36px; }
.studio-demo .studio-copy { padding: clamp(1.3rem,4.1vw,3.8rem); }
.studio-demo .studio-hero { border-radius: .8rem; background: #eee6da; }
.studio-demo .studio-services .panel, .studio-demo .studio-contact { padding: clamp(1rem,3vw,1.75rem); }
.studio-demo .studio-services p, .studio-demo .studio-contact > p { margin-bottom: .9rem; }
.chat-demo .chat-log, .support-page .support-log { min-height: 300px; }
.chat-demo .chat-heading { padding: 1rem 1.1rem; }
.relay-demo .flow-map { padding: .85rem; }
.relay-demo .flow-step { padding: .82rem; }

@media (max-width: 900px) {
  .pf-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pf-feature { min-height: 265px; }
}
@media (max-width: 650px) {
  .portfolio-view .top-link { font-size: .83rem; }
  .top-nav .profile-link { display: none; }
  .pf-hero-grid, .pf-case-top { grid-template-columns: 1fr; }
  .pf-intro h1, .pf-case h1 { font-size: clamp(2.48rem, 9.5vw, 3.75rem); }
  .pf-feature { min-height: 225px; }
  .pf-grid, .pf-case-steps { grid-template-columns: 1fr; }
  .pf-window { font-size: .77rem; }
  .pf-card-copy p { min-height: auto; }
  .lead-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lead-metrics > div { padding: .65rem .82rem; }
  .lead-demo .lane { min-height: 90px; }
}
